WPILibC++ 2024.3.2
|
NetworkTables struct-encoded value array entry. More...
#include <networktables/StructArrayTopic.h>
Public Types | |
using | SubscriberType = StructArraySubscriber< T, I... > |
using | PublisherType = StructArrayPublisher< T, I... > |
using | TopicType = StructArrayTopic< T, I... > |
using | ValueType = std::vector< T > |
using | ParamType = std::span< const T > |
using | TimestampedValueType = Timestamped< ValueType > |
Public Types inherited from nt::StructArraySubscriber< T, I... > | |
using | TopicType = StructArrayTopic< T, I... > |
using | ValueType = std::vector< T > |
using | ParamType = std::span< const T > |
using | TimestampedValueType = Timestamped< ValueType > |
Public Types inherited from nt::StructArrayPublisher< T, I... > | |
using | TopicType = StructArrayTopic< T, I... > |
using | ValueType = std::vector< T > |
using | ParamType = std::span< const T > |
using | TimestampedValueType = Timestamped< ValueType > |
Public Member Functions | |
StructArrayEntry ()=default | |
template<typename U > | |
StructArrayEntry (NT_Entry handle, U &&defaultValue, const I &... info) | |
Construct from an entry handle; recommended to use StructTopic::GetEntry() instead. More... | |
operator bool () const | |
Determines if the native handle is valid. More... | |
NT_Entry | GetHandle () const |
Gets the native handle for the entry. More... | |
TopicType | GetTopic () const |
Get the corresponding topic. More... | |
void | Unpublish () |
Stops publishing the entry if it's published. More... | |
Public Member Functions inherited from nt::StructArraySubscriber< T, I... > | |
StructArraySubscriber ()=default | |
StructArraySubscriber (NT_Subscriber handle, U &&defaultValue, I... info) | |
Construct from a subscriber handle; recommended to use StructTopic::Subscribe() instead. More... | |
ValueType | Get () const |
Get the last published value. More... | |
ValueType | Get (U &&defaultValue) const |
Get the last published value. More... | |
ValueType | Get (std::span< const T > defaultValue) const |
Get the last published value. More... | |
TimestampedValueType | GetAtomic () const |
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. More... | |
TimestampedValueType | GetAtomic (U &&defaultValue) const |
Get the last published value along with its timestamp. More... | |
TimestampedValueType | GetAtomic (std::span< const T > defaultValue) const |
Get the last published value along with its timestamp. More... | |
std::vector< TimestampedValueType > | ReadQueue () |
Get an array of all valid value changes since the last call to ReadQueue. More... | |
TopicType | GetTopic () const |
Get the corresponding topic. More... | |
Public Member Functions inherited from nt::Subscriber | |
virtual | ~Subscriber () |
Subscriber (const Subscriber &)=delete | |
Subscriber & | operator= (const Subscriber &)=delete |
Subscriber (Subscriber &&) | |
Subscriber & | operator= (Subscriber &&) |
operator bool () const | |
Determines if the native handle is valid. More... | |
NT_Subscriber | GetHandle () const |
Gets the native handle for the subscriber. More... | |
bool | Exists () const |
Determines if the topic is currently being published. More... | |
int64_t | GetLastChange () const |
Gets the last time the value was changed. More... | |
Topic | GetTopic () const |
Gets the subscribed-to topic. More... | |
Public Member Functions inherited from nt::StructArrayPublisher< T, I... > | |
StructArrayPublisher ()=default | |
StructArrayPublisher (NT_Publisher handle, I... info) | |
Construct from a publisher handle; recommended to use StructTopic::Publish() instead. More... | |
StructArrayPublisher (const StructArrayPublisher &)=delete | |
StructArrayPublisher (StructArrayPublisher &&rhs) | |
StructArrayPublisher & | operator= (const StructArrayPublisher &)=delete |
StructArrayPublisher & | operator= (StructArrayPublisher &&rhs) |
void | Set (U &&value, int64_t time=0) |
Publish a new value. More... | |
void | Set (std::span< const T > value, int64_t time=0) |
Publish a new value. More... | |
void | SetDefault (U &&value) |
Publish a default value. More... | |
void | SetDefault (std::span< const T > value) |
Publish a default value. More... | |
TopicType | GetTopic () const |
Get the corresponding topic. More... | |
Public Member Functions inherited from nt::Publisher | |
virtual | ~Publisher () |
Publisher (const Publisher &)=delete | |
Publisher & | operator= (const Publisher &)=delete |
Publisher (Publisher &&) | |
Publisher & | operator= (Publisher &&) |
operator bool () const | |
Determines if the native handle is valid. More... | |
NT_Publisher | GetHandle () const |
Gets the native handle for the publisher. More... | |
Topic | GetTopic () const |
Gets the published-to topic. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from nt::Subscriber | |
Subscriber ()=default | |
Subscriber (NT_Subscriber handle) | |
Protected Member Functions inherited from nt::Publisher | |
Publisher ()=default | |
Publisher (NT_Publisher handle) | |
Protected Attributes inherited from nt::Subscriber | |
NT_Subscriber | m_subHandle {0} |
Protected Attributes inherited from nt::Publisher | |
NT_Publisher | m_pubHandle {0} |
NetworkTables handle. More... | |
NetworkTables struct-encoded value array entry.
using nt::StructArrayEntry< T, I >::ParamType = std::span<const T> |
using nt::StructArrayEntry< T, I >::PublisherType = StructArrayPublisher<T, I...> |
using nt::StructArrayEntry< T, I >::SubscriberType = StructArraySubscriber<T, I...> |
using nt::StructArrayEntry< T, I >::TimestampedValueType = Timestamped<ValueType> |
using nt::StructArrayEntry< T, I >::TopicType = StructArrayTopic<T, I...> |
using nt::StructArrayEntry< T, I >::ValueType = std::vector<T> |
|
default |
|
inline |
Construct from an entry handle; recommended to use StructTopic::GetEntry() instead.
handle | Native handle |
defaultValue | Default value |
info | optional struct type info |
|
inline |
Gets the native handle for the entry.
|
inline |
Get the corresponding topic.
|
inlineexplicit |
Determines if the native handle is valid.
|
inline |
Stops publishing the entry if it's published.