24class DoubleArrayTopic;
141 std::vector<TimestampedValueType>
ReadQueue();
NetworkTables DoubleArray entry.
Definition: DoubleArrayTopic.h:209
DoubleArrayEntry()=default
DoubleArrayTopic TopicType
Definition: DoubleArrayTopic.h:213
TopicType GetTopic() const
Get the corresponding topic.
Definition: DoubleArrayTopic.inc:82
void Unpublish()
Stops publishing the entry if it's published.
Definition: DoubleArrayTopic.inc:86
NT_Entry GetHandle() const
Gets the native handle for the entry.
Definition: DoubleArrayTopic.h:245
DoubleArrayEntry(NT_Entry handle, ParamType defaultValue)
Construct from an entry handle; recommended to use DoubleArrayTopic::GetEntry() instead.
NetworkTables DoubleArray publisher.
Definition: DoubleArrayTopic.h:157
TopicType GetTopic() const
Get the corresponding topic.
Definition: DoubleArrayTopic.inc:73
DoubleArrayPublisher()=default
void Set(ParamType value, int64_t time=0)
Publish a new value.
Definition: DoubleArrayTopic.inc:64
std::span< double > SmallRetType
Definition: DoubleArrayTopic.h:163
double SmallElemType
Definition: DoubleArrayTopic.h:164
void SetDefault(ParamType value)
Publish a default value.
Definition: DoubleArrayTopic.inc:69
std::vector< double > ValueType
Definition: DoubleArrayTopic.h:160
std::span< const double > ParamType
Definition: DoubleArrayTopic.h:161
NetworkTables DoubleArray subscriber.
Definition: DoubleArrayTopic.h:29
std::vector< double > ValueType
Definition: DoubleArrayTopic.h:32
TimestampedValueViewType GetAtomic(wpi::SmallVectorImpl< SmallElemType > &buf, ParamType defaultValue) const
Get the last published value along with its timestamp.
ValueType Get() const
Get the last published value.
Definition: DoubleArrayTopic.inc:18
ValueType Get(ParamType defaultValue) const
Get the last published value.
std::vector< TimestampedValueType > ReadQueue()
Get an array of all value changes since the last call to ReadQueue.
Definition: DoubleArrayTopic.inc:53
TopicType GetTopic() const
Get the corresponding topic.
Definition: DoubleArrayTopic.inc:57
DoubleArraySubscriber(NT_Subscriber handle, ParamType defaultValue)
Construct from a subscriber handle; recommended to use DoubleArrayTopic::Subscribe() instead.
SmallRetType Get(wpi::SmallVectorImpl< SmallElemType > &buf, ParamType defaultValue) const
Get the last published value.
double SmallElemType
Definition: DoubleArrayTopic.h:37
std::span< double > SmallRetType
Definition: DoubleArrayTopic.h:36
std::span< const double > ParamType
Definition: DoubleArrayTopic.h:33
TimestampedValueType GetAtomic(ParamType defaultValue) const
Get the last published value along with its timestamp.
DoubleArraySubscriber()=default
TimestampedValueType GetAtomic() const
Get the last published value along with its timestamp If no value has been published,...
Definition: DoubleArrayTopic.inc:35
NetworkTables DoubleArray topic.
Definition: DoubleArrayTopic.h:263
EntryType GetEntryEx(std::string_view typeString, ParamType defaultValue, const PubSubOptions &options=kDefaultPubSubOptions)
Create a new entry for the topic, with specific type string.
Definition: DoubleArrayTopic.inc:125
EntryType GetEntry(ParamType defaultValue, const PubSubOptions &options=kDefaultPubSubOptions)
Create a new entry for the topic.
Definition: DoubleArrayTopic.inc:118
DoubleArrayEntry EntryType
Definition: DoubleArrayTopic.h:267
static constexpr std::string_view kTypeString
The default type string for this topic type.
Definition: DoubleArrayTopic.h:272
SubscriberType Subscribe(ParamType defaultValue, const PubSubOptions &options=kDefaultPubSubOptions)
Create a new subscriber to the topic.
Definition: DoubleArrayTopic.inc:90
std::span< const double > ParamType
Definition: DoubleArrayTopic.h:269
DoubleArrayTopic(Topic topic)
Construct from a generic topic.
Definition: DoubleArrayTopic.h:289
SubscriberType SubscribeEx(std::string_view typeString, ParamType defaultValue, const PubSubOptions &options=kDefaultPubSubOptions)
Create a new subscriber to the topic, with specific type string.
Definition: DoubleArrayTopic.inc:97
DoubleArrayTopic()=default
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: DoubleArrayTopic.inc:111
PublisherType Publish(const PubSubOptions &options=kDefaultPubSubOptions)
Create a new publisher to the topic.
Definition: DoubleArrayTopic.inc:105
DoubleArrayPublisher PublisherType
Definition: DoubleArrayTopic.h:266
std::vector< double > ValueType
Definition: DoubleArrayTopic.h:268
DoubleArraySubscriber SubscriberType
Definition: DoubleArrayTopic.h:265
DoubleArrayTopic(NT_Topic handle)
Construct from a topic handle; recommended to use NetworkTableInstance::GetDoubleArrayTopic() instead...
Definition: DoubleArrayTopic.h:282
NetworkTables publisher.
Definition: Topic.h:345
NetworkTables subscriber.
Definition: Topic.h:290
NT_Subscriber m_subHandle
Definition: Topic.h:341
NetworkTables Topic.
Definition: Topic.h:30
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: SmallVector.h:557
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: ntcore_cpp.h:35
/file This file defines the SmallVector class.
Definition: AprilTagFieldLayout.h:18
NetworkTables publish/subscribe options.
Definition: ntcore_cpp.h:304
Timestamped DoubleArray.
Definition: ntcore_cpp_types.h:1070
Timestamped DoubleArray view (for SmallVector-taking functions).
Definition: ntcore_cpp_types.h:1095