|
RobotCore 1.0
WPILib port to raspberry Pi
|
Public Member Functions | |
| boolean | isValid () |
| int | getHandle () |
| NetworkTableInstance | getInstance () |
| String | getName () |
| NetworkTableType | getType () |
| String | getTypeString () |
| TopicInfo | getInfo () |
| void | setPersistent (boolean persistent) |
| boolean | isPersistent () |
| void | setRetained (boolean retained) |
| boolean | isRetained () |
| void | setCached (boolean cached) |
| boolean | isCached () |
| boolean | exists () |
| String | getProperty (String name) |
| void | setProperty (String name, String value) |
| void | deleteProperty (String name) |
| String | getProperties () |
| void | setProperties (String properties) |
| GenericSubscriber | genericSubscribe (PubSubOption... options) |
| GenericSubscriber | genericSubscribe (String typeString, PubSubOption... options) |
| GenericPublisher | genericPublish (String typeString, PubSubOption... options) |
| GenericPublisher | genericPublishEx (String typeString, String properties, PubSubOption... options) |
| GenericEntry | getGenericEntry (PubSubOption... options) |
| GenericEntry | getGenericEntry (String typeString, PubSubOption... options) |
| boolean | equals (Object other) |
| int | hashCode () |
Protected Attributes | |
| final NetworkTableInstance | m_inst |
| final int | m_handle |
NetworkTables Topic.
Definition at line 8 of file Topic.java.
| void org.wpilib.networktables.Topic.deleteProperty | ( | String | name | ) |
Deletes a property. Has no effect if the property does not exist.
| name | property name |
Definition at line 174 of file Topic.java.
| boolean org.wpilib.networktables.Topic.equals | ( | Object | other | ) |
Definition at line 323 of file Topic.java.
| boolean org.wpilib.networktables.Topic.exists | ( | ) |
Determines if the topic is currently being published.
Definition at line 144 of file Topic.java.
| GenericPublisher org.wpilib.networktables.Topic.genericPublish | ( | String | typeString, |
| PubSubOption... | options ) |
Create a new publisher to the topic.
The publisher is only active as long as the returned object is not closed.
It is not possible to publish two different data types to the same topic. Conflicts between publishers are typically resolved by the server on a first-come, first-served basis. Any published values that do not match the topic's data type are dropped (ignored). To determine if the data type matches, use the appropriate Topic functions.
| typeString | type string |
| options | publish options |
Definition at line 245 of file Topic.java.
| GenericPublisher org.wpilib.networktables.Topic.genericPublishEx | ( | String | typeString, |
| String | properties, | ||
| PubSubOption... | options ) |
Create a new publisher to the topic, with type string and initial properties.
The publisher is only active as long as the returned object is not closed.
It is not possible to publish two different data types to the same topic. Conflicts between publishers are typically resolved by the server on a first-come, first-served basis. Any published values that do not match the topic's data type are dropped (ignored). To determine if the data type matches, use the appropriate Topic functions.
| typeString | type string |
| properties | JSON properties |
| options | publish options |
| IllegalArgumentException | if properties is not a JSON object |
Definition at line 268 of file Topic.java.
| GenericSubscriber org.wpilib.networktables.Topic.genericSubscribe | ( | PubSubOption... | options | ) |
Create a new subscriber to the topic.
The subscriber is only active as long as the returned object is not closed.
| options | subscribe options |
Definition at line 208 of file Topic.java.
| GenericSubscriber org.wpilib.networktables.Topic.genericSubscribe | ( | String | typeString, |
| PubSubOption... | options ) |
Create a new subscriber to the topic.
The subscriber is only active as long as the returned object is not closed.
Subscribers that do not match the published data type do not return any values. To determine if the data type matches, use the appropriate Topic functions.
| typeString | type string |
| options | subscribe options |
Definition at line 224 of file Topic.java.
| GenericEntry org.wpilib.networktables.Topic.getGenericEntry | ( | PubSubOption... | options | ) |
Create a new generic entry for the topic.
Entries act as a combination of a subscriber and a weak publisher. The subscriber is active as long as the entry is not closed. The publisher is created when the entry is first written to, and remains active until either unpublish() is called or the entry is closed.
It is not possible to publish two different data types to the same topic. Conflicts between publishers are typically resolved by the server on a first-come, first-served basis. Any published values that do not match the topic's data type are dropped (ignored). To determine if the data type matches, use the appropriate Topic functions.
| options | publish and/or subscribe options |
Definition at line 295 of file Topic.java.
| GenericEntry org.wpilib.networktables.Topic.getGenericEntry | ( | String | typeString, |
| PubSubOption... | options ) |
Create a new generic entry for the topic.
Entries act as a combination of a subscriber and a weak publisher. The subscriber is active as long as the entry is not closed. The publisher is created when the entry is first written to, and remains active until either unpublish() is called or the entry is closed.
It is not possible to publish two different data types to the same topic. Conflicts between publishers are typically resolved by the server on a first-come, first-served basis. Any published values that do not match the topic's data type are dropped (ignored). To determine if the data type matches, use the appropriate Topic functions.
| typeString | type string |
| options | publish and/or subscribe options |
Definition at line 315 of file Topic.java.
| int org.wpilib.networktables.Topic.getHandle | ( | ) |
Gets the native handle for the topic.
Definition at line 34 of file Topic.java.
| TopicInfo org.wpilib.networktables.Topic.getInfo | ( | ) |
Gets combined information about the topic.
Definition at line 80 of file Topic.java.
| NetworkTableInstance org.wpilib.networktables.Topic.getInstance | ( | ) |
| String org.wpilib.networktables.Topic.getName | ( | ) |
| String org.wpilib.networktables.Topic.getProperties | ( | ) |
Gets all topic properties as a JSON object string. Each key in the object is the property name, and the corresponding value is the property value.
Definition at line 184 of file Topic.java.
| String org.wpilib.networktables.Topic.getProperty | ( | String | name | ) |
Gets the current value of a property (as a JSON string).
| name | property name |
Definition at line 154 of file Topic.java.
| NetworkTableType org.wpilib.networktables.Topic.getType | ( | ) |
| String org.wpilib.networktables.Topic.getTypeString | ( | ) |
Gets the type string of the topic. This may have more information than the numeric type (especially for raw values).
Definition at line 71 of file Topic.java.
| int org.wpilib.networktables.Topic.hashCode | ( | ) |
Definition at line 328 of file Topic.java.
| boolean org.wpilib.networktables.Topic.isCached | ( | ) |
Returns whether the topic's last value is stored.
Definition at line 135 of file Topic.java.
| boolean org.wpilib.networktables.Topic.isPersistent | ( | ) |
Returns whether the value is persistent through server restarts.
Definition at line 98 of file Topic.java.
| boolean org.wpilib.networktables.Topic.isRetained | ( | ) |
Returns whether the topic is retained by server when there are no publishers.
Definition at line 116 of file Topic.java.
| boolean org.wpilib.networktables.Topic.isValid | ( | ) |
Determines if the native handle is valid.
Definition at line 25 of file Topic.java.
| void org.wpilib.networktables.Topic.setCached | ( | boolean | cached | ) |
Allow storage of the topic's last value, allowing the value to be read (and not just accessed through event queues and listeners).
| cached | True for cached, false for not cached. |
Definition at line 126 of file Topic.java.
| void org.wpilib.networktables.Topic.setPersistent | ( | boolean | persistent | ) |
Make value persistent through server restarts.
| persistent | True for persistent, false for not persistent. |
Definition at line 89 of file Topic.java.
| void org.wpilib.networktables.Topic.setProperties | ( | String | properties | ) |
Updates multiple topic properties. Each key in the passed-in object is the name of the property to add/update, and the corresponding value is the property value to set for that property. Null values result in deletion of the corresponding property.
| properties | JSON object string with keys to add/update/delete |
| IllegalArgumentException | if properties is not a JSON object |
Definition at line 196 of file Topic.java.
| void org.wpilib.networktables.Topic.setProperty | ( | String | name, |
| String | value ) |
Sets a property value.
| name | property name |
| value | property value (JSON string) |
| IllegalArgumentException | if properties is not parseable as JSON |
Definition at line 165 of file Topic.java.
| void org.wpilib.networktables.Topic.setRetained | ( | boolean | retained | ) |
Make the server retain the topic even when there are no publishers.
| retained | True for retained, false for not retained. |
Definition at line 107 of file Topic.java.
|
protected |
NetworkTables handle.
Definition at line 336 of file Topic.java.
|
protected |
NetworkTables instance.
Definition at line 333 of file Topic.java.