146 std::vector<TimestampedValueType>
ReadQueue();
NetworkTables publisher.
Definition: Topic.h:364
NetworkTables String entry.
Definition: StringTopic.h:214
void Unpublish()
Stops publishing the entry if it's published.
Definition: StringTopic.inc:90
TopicType GetTopic() const
Get the corresponding topic.
Definition: StringTopic.inc:86
StringTopic TopicType
Definition: StringTopic.h:218
NT_Entry GetHandle() const
Gets the native handle for the entry.
Definition: StringTopic.h:250
NetworkTables String publisher.
Definition: StringTopic.h:162
void SetDefault(ParamType value)
Publish a default value.
Definition: StringTopic.inc:73
std::string_view SmallRetType
Definition: StringTopic.h:168
StringPublisher()=default
std::string_view ParamType
Definition: StringTopic.h:166
TopicType GetTopic() const
Get the corresponding topic.
Definition: StringTopic.inc:77
std::string ValueType
Definition: StringTopic.h:165
void Set(ParamType value, int64_t time=0)
Publish a new value.
Definition: StringTopic.inc:68
char SmallElemType
Definition: StringTopic.h:169
NetworkTables String subscriber.
Definition: StringTopic.h:34
StringSubscriber()=default
char SmallElemType
Definition: StringTopic.h:42
ValueType Get() const
Get the last published value.
Definition: StringTopic.inc:22
TopicType GetTopic() const
Get the corresponding topic.
Definition: StringTopic.inc:61
std::string_view ParamType
Definition: StringTopic.h:38
std::string ValueType
Definition: StringTopic.h:37
TimestampedValueType GetAtomic() const
Get the last published value along with its timestamp If no value has been published,...
Definition: StringTopic.inc:39
std::vector< TimestampedValueType > ReadQueue()
Get an array of all value changes since the last call to ReadQueue.
Definition: StringTopic.inc:57
std::string_view SmallRetType
Definition: StringTopic.h:41
NetworkTables String topic.
Definition: StringTopic.h:268
StringTopic(Topic topic)
Construct from a generic topic.
Definition: StringTopic.h:294
SubscriberType SubscribeEx(std::string_view typeString, ParamType defaultValue, const PubSubOptions &options=kDefaultPubSubOptions)
Create a new subscriber to the topic, with specific type string.
Definition: StringTopic.inc:101
PublisherType Publish(const PubSubOptions &options=kDefaultPubSubOptions)
Create a new publisher to the topic.
Definition: StringTopic.inc:109
EntryType GetEntry(ParamType defaultValue, const PubSubOptions &options=kDefaultPubSubOptions)
Create a new entry for the topic.
Definition: StringTopic.inc:122
StringTopic(NT_Topic handle)
Construct from a topic handle; recommended to use NetworkTableInstance::GetStringTopic() instead.
Definition: StringTopic.h:287
static constexpr std::string_view kTypeString
The default type string for this topic type.
Definition: StringTopic.h:277
EntryType GetEntryEx(std::string_view typeString, ParamType defaultValue, const PubSubOptions &options=kDefaultPubSubOptions)
Create a new entry for the topic, with specific type string.
Definition: StringTopic.inc:129
StringPublisher PublisherType
Definition: StringTopic.h:271
SubscriberType Subscribe(ParamType defaultValue, const PubSubOptions &options=kDefaultPubSubOptions)
Create a new subscriber to the topic.
Definition: StringTopic.inc:94
std::string_view ParamType
Definition: StringTopic.h:274
StringSubscriber SubscriberType
Definition: StringTopic.h:270
StringEntry EntryType
Definition: StringTopic.h:272
std::string ValueType
Definition: StringTopic.h:273
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: StringTopic.inc:115
NetworkTables subscriber.
Definition: Topic.h:309
NT_Subscriber m_subHandle
Definition: Topic.h:360
NetworkTables Topic.
Definition: Topic.h:28
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: SmallVector.h:579
basic_string_view< char > string_view
Definition: core.h:501
NT_Handle NT_Topic
Definition: ntcore_c.h:40
NT_Handle NT_Subscriber
Definition: ntcore_c.h:41
NT_Handle NT_Publisher
Definition: ntcore_c.h:42
NT_Handle NT_Entry
Definition: ntcore_c.h:35
Timestamped< std::string > TimestampedString
Timestamped String.
Definition: ntcore_cpp_types.h:371
Timestamped< std::string_view > TimestampedStringView
Timestamped String view (for SmallVector-taking functions).
Definition: ntcore_cpp_types.h:377
constexpr PubSubOptions kDefaultPubSubOptions
Default publish/subscribe options.
Definition: ntcore_cpp.h:390
NetworkTables (ntcore) namespace.
Definition: ntcore_cpp.h:36
Definition: ntcore_cpp.h:26
NetworkTables publish/subscribe options.
Definition: ntcore_cpp.h:305
Timestamped value.
Definition: ntcore_cpp_types.h:30