NetworkTables struct-encoded value array subscriber.
More...
#include <networktables/StructArrayTopic.h>
NetworkTables struct-encoded value array subscriber.
◆ ParamType
◆ TimestampedValueType
◆ TopicType
◆ ValueType
◆ StructArraySubscriber() [1/2]
◆ StructArraySubscriber() [2/2]
Construct from a subscriber handle; recommended to use StructTopic::Subscribe() instead.
- Parameters
-
handle | Native handle |
defaultValue | Default value |
◆ Get() [1/3]
Get the last published value.
If no value has been published or the value cannot be unpacked, returns the stored default value.
- Returns
- value
◆ Get() [2/3]
Get the last published value.
If no value has been published or the value cannot be unpacked, returns the passed defaultValue.
- Parameters
-
defaultValue | default value to return if no value has been published |
- Returns
- value
◆ Get() [3/3]
Get the last published value.
If no value has been published or the value cannot be unpacked, returns the passed defaultValue.
- Parameters
-
defaultValue | default value to return if no value has been published |
- Returns
- value
◆ GetAtomic() [1/3]
Get the last published value along with its timestamp If no value has been published or the value cannot be unpacked, returns the stored default value and a timestamp of 0.
- Returns
- timestamped value
◆ GetAtomic() [2/3]
Get the last published value along with its timestamp.
If no value has been published or the value cannot be unpacked, returns the passed defaultValue and a timestamp of 0.
- Parameters
-
defaultValue | default value to return if no value has been published |
- Returns
- timestamped value
◆ GetAtomic() [3/3]
Get the last published value along with its timestamp.
If no value has been published or the value cannot be unpacked, returns the passed defaultValue and a timestamp of 0.
- Parameters
-
defaultValue | default value to return if no value has been published |
- Returns
- timestamped value
◆ GetTopic()
Get the corresponding topic.
- Returns
- Topic
◆ ReadQueue()
Get an array of all valid value changes since the last call to ReadQueue.
Also provides a timestamp for each value. Values that cannot be unpacked are dropped.
- Note
- The "poll storage" subscribe option can be used to set the queue depth.
- Returns
- Array of timestamped values; empty array if no valid new changes have been published since the previous call.
The documentation for this class was generated from the following file: