122 std::vector<TimestampedValueType>
ReadQueue();
NetworkTables publisher.
Definition: Topic.h:351
NetworkTables subscriber.
Definition: Topic.h:296
NT_Subscriber m_subHandle
Definition: Topic.h:347
NetworkTables Topic.
Definition: Topic.h:30
NetworkTables unit-typed entry.
Definition: UnitTopic.h:192
void Unpublish()
Stops publishing the entry if it's published.
Definition: UnitTopic.inc:86
NT_Entry GetHandle() const
Gets the native handle for the entry.
Definition: UnitTopic.h:225
TopicType GetTopic() const
Get the corresponding topic.
Definition: UnitTopic.inc:81
UnitTopic< T > TopicType
Definition: UnitTopic.h:196
NetworkTables unit-typed publisher.
Definition: UnitTopic.h:141
void Set(ParamType value, int64_t time=0)
Publish a new value.
Definition: UnitTopic.inc:62
void SetDefault(ParamType value)
Publish a default value.
Definition: UnitTopic.inc:67
TopicType GetTopic() const
Get the corresponding topic.
Definition: UnitTopic.inc:72
T ParamType
Definition: UnitTopic.h:145
T ValueType
Definition: UnitTopic.h:144
NetworkTables unit-typed subscriber.
Definition: UnitTopic.h:58
TopicType GetTopic() const
Get the corresponding topic.
Definition: UnitTopic.inc:53
TimestampedValueType GetAtomic() const
Get the last published value along with its timestamp If no value has been published,...
Definition: UnitTopic.inc:32
ValueType Get() const
Get the last published value.
Definition: UnitTopic.inc:22
std::vector< TimestampedValueType > ReadQueue()
Get an array of all value changes since the last call to ReadQueue.
Definition: UnitTopic.inc:43
T ValueType
Definition: UnitTopic.h:61
T ParamType
Definition: UnitTopic.h:62
NetworkTables unit-typed topic.
Definition: UnitTopic.h:249
UnitEntry< T > EntryType
Definition: UnitTopic.h:253
bool IsMatchingUnit() const
Verify the topic has a matching unit type (if the topic is published).
Definition: UnitTopic.inc:91
PublisherType Publish(const PubSubOptions &options=kDefaultPubSubOptions)
Create a new publisher to the topic.
Definition: UnitTopic.inc:110
SubscriberType Subscribe(ParamType defaultValue, const PubSubOptions &options=kDefaultPubSubOptions)
Create a new subscriber to the topic.
Definition: UnitTopic.inc:96
static constexpr std::string_view kTypeString
The default type string for this topic type.
Definition: UnitTopic.h:258
PublisherType PublishEx(std::string_view typeString, const wpi::json &properties, const PubSubOptions &options=kDefaultPubSubOptions)
Create a new publisher to the topic, with type string and initial properties.
Definition: UnitTopic.inc:116
T ValueType
Definition: UnitTopic.h:254
UnitTopic(NT_Topic handle)
Construct from a topic handle.
Definition: UnitTopic.h:267
SubscriberType SubscribeEx(std::string_view typeString, ParamType defaultValue, const PubSubOptions &options=kDefaultPubSubOptions)
Create a new subscriber to the topic, with specific type string.
Definition: UnitTopic.inc:103
UnitTopic(Topic topic)
Construct from a generic topic.
Definition: UnitTopic.h:274
UnitSubscriber< T > SubscriberType
Definition: UnitTopic.h:251
T ParamType
Definition: UnitTopic.h:255
EntryType GetEntryEx(std::string_view typeString, ParamType defaultValue, const PubSubOptions &options=kDefaultPubSubOptions)
Create a new entry for the topic, with specific type string.
Definition: UnitTopic.inc:133
EntryType GetEntry(ParamType defaultValue, const PubSubOptions &options=kDefaultPubSubOptions)
Create a new entry for the topic.
Definition: UnitTopic.inc:126
UnitPublisher< T > PublisherType
Definition: UnitTopic.h:252
a class to store JSON values
Definition: json.h:2655
basic_string_view< char > string_view
Definition: core.h:520
NT_Handle NT_Topic
Definition: ntcore_c.h:38
NT_Handle NT_Subscriber
Definition: ntcore_c.h:39
NT_Handle NT_Publisher
Definition: ntcore_c.h:40
NT_Handle NT_Entry
Definition: ntcore_c.h:33
constexpr PubSubOptions kDefaultPubSubOptions
Default publish/subscribe options.
Definition: ntcore_cpp.h:381
::int64_t int64_t
Definition: Meta.h:59
NetworkTables (ntcore) namespace.
Definition: Topic.inc:15
Definition: AprilTagFieldLayout.h:18
NetworkTables publish/subscribe options.
Definition: ntcore_cpp.h:304
Timestamped unit.
Definition: UnitTopic.h:31
int64_t time
Time in local time base.
Definition: UnitTopic.h:39
int64_t serverTime
Time in server time base.
Definition: UnitTopic.h:44
TimestampedUnit(int64_t time, int64_t serverTime, T value)
Definition: UnitTopic.h:33
TimestampedUnit()=default