Package edu.wpi.first.networktables
Interface GenericPublisher
- All Superinterfaces:
AutoCloseable,Consumer<NetworkTableValue>,Publisher,PubSub
- All Known Subinterfaces:
GenericEntry
NetworkTables generic publisher.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaccept(NetworkTableValue value) getTopic()Get the corresponding topic.booleanset(NetworkTableValue value) Publish a new value.default booleansetBoolean(boolean value) Publish a new value.booleansetBoolean(boolean value, long time) Publish a new value.default booleansetBooleanArray(boolean[] value) Publish a new value.booleansetBooleanArray(boolean[] value, long time) Publish a new value.default booleansetBooleanArray(Boolean[] value) Publish a new value.booleansetBooleanArray(Boolean[] value, long time) Publish a new value.booleansetDefault(NetworkTableValue defaultValue) Sets the entry's value if it does not exist.booleansetDefaultBoolean(boolean defaultValue) Sets the entry's value if it does not exist.booleansetDefaultBooleanArray(boolean[] defaultValue) Sets the entry's value if it does not exist.booleansetDefaultBooleanArray(Boolean[] defaultValue) Sets the entry's value if it does not exist.booleansetDefaultDouble(double defaultValue) Sets the entry's value if it does not exist.booleansetDefaultDoubleArray(double[] defaultValue) Sets the entry's value if it does not exist.booleansetDefaultDoubleArray(Double[] defaultValue) Sets the entry's value if it does not exist.booleansetDefaultFloat(float defaultValue) Sets the entry's value if it does not exist.booleansetDefaultFloatArray(float[] defaultValue) Sets the entry's value if it does not exist.booleansetDefaultFloatArray(Float[] defaultValue) Sets the entry's value if it does not exist.booleansetDefaultInteger(long defaultValue) Sets the entry's value if it does not exist.booleansetDefaultIntegerArray(long[] defaultValue) Sets the entry's value if it does not exist.booleansetDefaultIntegerArray(Long[] defaultValue) Sets the entry's value if it does not exist.default booleansetDefaultRaw(byte[] defaultValue) Sets the entry's value if it does not exist.booleansetDefaultRaw(byte[] defaultValue, int start, int len) Sets the entry's value if it does not exist.default booleansetDefaultRaw(ByteBuffer defaultValue) Sets the entry's value if it does not exist.booleansetDefaultRaw(ByteBuffer defaultValue, int start, int len) Sets the entry's value if it does not exist.booleansetDefaultString(String defaultValue) Sets the entry's value if it does not exist.booleansetDefaultStringArray(String[] defaultValue) Sets the entry's value if it does not exist.booleansetDefaultValue(Object defaultValue) Sets the entry's value if it does not exist.default booleansetDouble(double value) Publish a new value.booleansetDouble(double value, long time) Publish a new value.default booleansetDoubleArray(double[] value) Publish a new value.booleansetDoubleArray(double[] value, long time) Publish a new value.default booleansetDoubleArray(Double[] value) Publish a new value.booleansetDoubleArray(Double[] value, long time) Publish a new value.default booleansetFloat(float value) Publish a new value.booleansetFloat(float value, long time) Publish a new value.default booleansetFloatArray(float[] value) Publish a new value.booleansetFloatArray(float[] value, long time) Publish a new value.default booleansetFloatArray(Float[] value) Publish a new value.booleansetFloatArray(Float[] value, long time) Publish a new value.default booleansetInteger(long value) Publish a new value.booleansetInteger(long value, long time) Publish a new value.default booleansetIntegerArray(long[] value) Publish a new value.booleansetIntegerArray(long[] value, long time) Publish a new value.default booleansetIntegerArray(Long[] value) Publish a new value.booleansetIntegerArray(Long[] value, long time) Publish a new value.default booleansetRaw(byte[] value) Publish a new value.default booleansetRaw(byte[] value, int start, int len) Publish a new value.booleansetRaw(byte[] value, int start, int len, long time) Publish a new value.default booleansetRaw(byte[] value, long time) Publish a new value.default booleansetRaw(ByteBuffer value) Publish a new value.default booleansetRaw(ByteBuffer value, int start, int len) Publish a new value.booleansetRaw(ByteBuffer value, int start, int len, long time) Publish a new value.default booleansetRaw(ByteBuffer value, long time) Publish a new value.default booleanPublish a new value.booleanPublish a new value.default booleansetStringArray(String[] value) Publish a new value.booleansetStringArray(String[] value, long time) Publish a new value.default booleanPublish a new value.booleanPublish a new value.
-
Method Details
-
getTopic
Get the corresponding topic. -
set
Publish a new value.- Parameters:
value- value to publish- Returns:
- False if the topic already exists with a different type
-
setValue
Publish a new value.- Parameters:
value- value to publish- Returns:
- False if the topic already exists with a different type
- Throws:
IllegalArgumentException- if the value is not a known type
-
setValue
Publish a new value.- Parameters:
value- value to publishtime- timestamp; 0 indicates current NT time should be used- Returns:
- False if the topic already exists with a different type
- Throws:
IllegalArgumentException- if the value is not a known type
-
setBoolean
Publish a new value.- Parameters:
value- value to publish- Returns:
- False if the topic already exists with a different type
-
setBoolean
Publish a new value.- Parameters:
value- value to publishtime- timestamp; 0 indicates current NT time should be used- Returns:
- False if the topic already exists with a different type
-
setInteger
Publish a new value.- Parameters:
value- value to publish- Returns:
- False if the topic already exists with a different type
-
setInteger
Publish a new value.- Parameters:
value- value to publishtime- timestamp; 0 indicates current NT time should be used- Returns:
- False if the topic already exists with a different type
-
setFloat
Publish a new value.- Parameters:
value- value to publish- Returns:
- False if the topic already exists with a different type
-
setFloat
Publish a new value.- Parameters:
value- value to publishtime- timestamp; 0 indicates current NT time should be used- Returns:
- False if the topic already exists with a different type
-
setDouble
Publish a new value.- Parameters:
value- value to publish- Returns:
- False if the topic already exists with a different type
-
setDouble
Publish a new value.- Parameters:
value- value to publishtime- timestamp; 0 indicates current NT time should be used- Returns:
- False if the topic already exists with a different type
-
setString
Publish a new value.- Parameters:
value- value to publish- Returns:
- False if the topic already exists with a different type
-
setString
Publish a new value.- Parameters:
value- value to publishtime- timestamp; 0 indicates current NT time should be used- Returns:
- False if the topic already exists with a different type
-
setRaw
Publish a new value.- Parameters:
value- value to publish- Returns:
- False if the topic already exists with a different type
-
setRaw
Publish a new value.- Parameters:
value- value to publish- Returns:
- False if the topic already exists with a different type
-
setRaw
Publish a new value.- Parameters:
value- value to publishtime- timestamp; 0 indicates current NT time should be used- Returns:
- False if the topic already exists with a different type
-
setRaw
Publish a new value.- Parameters:
value- value to publish; will send from value.position() to value.limit()time- timestamp; 0 indicates current NT time should be used- Returns:
- False if the topic already exists with a different type
-
setRaw
Publish a new value.- Parameters:
value- value to publishstart- Start position of data (in buffer)len- Length of data (must be less than or equal to value.length - start)- Returns:
- False if the topic already exists with a different type
-
setRaw
Publish a new value.- Parameters:
value- value to publishstart- Start position of data (in buffer)len- Length of data (must be less than or equal to value.length - start)time- timestamp; 0 indicates current NT time should be used- Returns:
- False if the topic already exists with a different type
-
setRaw
Publish a new value.- Parameters:
value- value to publishstart- Start position of data (in buffer)len- Length of data (must be less than or equal to value.capacity() - start)- Returns:
- False if the topic already exists with a different type
-
setRaw
Publish a new value.- Parameters:
value- value to publishstart- Start position of data (in buffer)len- Length of data (must be less than or equal to value.capacity() - start)time- timestamp; 0 indicates current NT time should be used- Returns:
- False if the topic already exists with a different type
-
setBooleanArray
Publish a new value.- Parameters:
value- value to publish- Returns:
- False if the topic already exists with a different type
-
setBooleanArray
Publish a new value.- Parameters:
value- value to publishtime- timestamp; 0 indicates current NT time should be used- Returns:
- False if the topic already exists with a different type
-
setBooleanArray
Publish a new value.- Parameters:
value- value to publish- Returns:
- False if the topic already exists with a different type
-
setBooleanArray
Publish a new value.- Parameters:
value- value to publishtime- timestamp; 0 indicates current NT time should be used- Returns:
- False if the topic already exists with a different type
-
setIntegerArray
Publish a new value.- Parameters:
value- value to publish- Returns:
- False if the topic already exists with a different type
-
setIntegerArray
Publish a new value.- Parameters:
value- value to publishtime- timestamp; 0 indicates current NT time should be used- Returns:
- False if the topic already exists with a different type
-
setIntegerArray
Publish a new value.- Parameters:
value- value to publish- Returns:
- False if the topic already exists with a different type
-
setIntegerArray
Publish a new value.- Parameters:
value- value to publishtime- timestamp; 0 indicates current NT time should be used- Returns:
- False if the topic already exists with a different type
-
setFloatArray
Publish a new value.- Parameters:
value- value to publish- Returns:
- False if the topic already exists with a different type
-
setFloatArray
Publish a new value.- Parameters:
value- value to publishtime- timestamp; 0 indicates current NT time should be used- Returns:
- False if the topic already exists with a different type
-
setFloatArray
Publish a new value.- Parameters:
value- value to publish- Returns:
- False if the topic already exists with a different type
-
setFloatArray
Publish a new value.- Parameters:
value- value to publishtime- timestamp; 0 indicates current NT time should be used- Returns:
- False if the topic already exists with a different type
-
setDoubleArray
Publish a new value.- Parameters:
value- value to publish- Returns:
- False if the topic already exists with a different type
-
setDoubleArray
Publish a new value.- Parameters:
value- value to publishtime- timestamp; 0 indicates current NT time should be used- Returns:
- False if the topic already exists with a different type
-
setDoubleArray
Publish a new value.- Parameters:
value- value to publish- Returns:
- False if the topic already exists with a different type
-
setDoubleArray
Publish a new value.- Parameters:
value- value to publishtime- timestamp; 0 indicates current NT time should be used- Returns:
- False if the topic already exists with a different type
-
setStringArray
Publish a new value.- Parameters:
value- value to publish- Returns:
- False if the topic already exists with a different type
-
setStringArray
Publish a new value.- Parameters:
value- value to publishtime- timestamp; 0 indicates current NT time should be used- Returns:
- False if the topic already exists with a different type
-
setDefault
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to set- Returns:
- False if the entry exists with a different type
-
setDefaultValue
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to set- Returns:
- False if the entry exists with a different type
- Throws:
IllegalArgumentException- if the value is not a known type
-
setDefaultBoolean
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to set- Returns:
- False if the entry exists with a different type
-
setDefaultInteger
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to set- Returns:
- False if the entry exists with a different type
-
setDefaultFloat
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to set- Returns:
- False if the entry exists with a different type
-
setDefaultDouble
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to set- Returns:
- False if the entry exists with a different type
-
setDefaultString
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to set- Returns:
- False if the entry exists with a different type
-
setDefaultRaw
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to set- Returns:
- False if the entry exists with a different type
-
setDefaultRaw
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to set; will send from defaultValue.position() to defaultValue.limit()- Returns:
- False if the entry exists with a different type
-
setDefaultRaw
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to setstart- Start position of data (in buffer)len- Length of data (must be less than or equal to value.length - start)- Returns:
- False if the entry exists with a different type
-
setDefaultRaw
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to setstart- Start position of data (in buffer)len- Length of data (must be less than or equal to value.capacity() - start)- Returns:
- False if the entry exists with a different type
-
setDefaultBooleanArray
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to set- Returns:
- False if the entry exists with a different type
-
setDefaultBooleanArray
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to set- Returns:
- False if the entry exists with a different type
-
setDefaultIntegerArray
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to set- Returns:
- False if the entry exists with a different type
-
setDefaultIntegerArray
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to set- Returns:
- False if the entry exists with a different type
-
setDefaultFloatArray
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to set- Returns:
- False if the entry exists with a different type
-
setDefaultFloatArray
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to set- Returns:
- False if the entry exists with a different type
-
setDefaultDoubleArray
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to set- Returns:
- False if the entry exists with a different type
-
setDefaultDoubleArray
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to set- Returns:
- False if the entry exists with a different type
-
setDefaultStringArray
Sets the entry's value if it does not exist.- Parameters:
defaultValue- the default value to set- Returns:
- False if the entry exists with a different type
-
accept
- Specified by:
acceptin interfaceConsumer<NetworkTableValue>
-