WPILibC++ 2025.2.1
|
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 |
using | ValueType |
using | ParamType |
using | TimestampedValueType |
Public Types inherited from nt::StructArrayPublisher< T, I... > | |
using | TopicType |
using | ValueType |
using | ParamType |
using | TimestampedValueType |
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. | |
operator bool () const | |
Determines if the native handle is valid. | |
NT_Entry | GetHandle () const |
Gets the native handle for the entry. | |
TopicType | GetTopic () const |
Get the corresponding topic. | |
void | Unpublish () |
Stops publishing the entry if it's published. | |
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. | |
ValueType | Get () const |
Get the last published value. | |
ValueType | Get (U &&defaultValue) const |
Get the last published value. | |
ValueType | Get (std::span< const T > defaultValue) const |
Get the last published value. | |
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. | |
TimestampedValueType | GetAtomic (U &&defaultValue) const |
Get the last published value along with its timestamp. | |
TimestampedValueType | GetAtomic (std::span< const T > defaultValue) const |
Get the last published value along with its timestamp. | |
std::vector< TimestampedValueType > | ReadQueue () |
Get an array of all valid value changes since the last call to ReadQueue. | |
TopicType | GetTopic () const |
Get the corresponding topic. | |
Public Member Functions inherited from nt::Subscriber | |
virtual | ~Subscriber () |
Subscriber (const Subscriber &)=delete | |
Subscriber & | operator= (const Subscriber &)=delete |
Subscriber (Subscriber &&rhs) | |
Subscriber & | operator= (Subscriber &&rhs) |
operator bool () const | |
Determines if the native handle is valid. | |
NT_Subscriber | GetHandle () const |
Gets the native handle for the subscriber. | |
bool | Exists () const |
Determines if the topic is currently being published. | |
int64_t | GetLastChange () const |
Gets the last time the value was changed. | |
Topic | GetTopic () const |
Gets the subscribed-to topic. | |
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. | |
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. | |
void | Set (std::span< const T > value, int64_t time=0) |
Publish a new value. | |
void | SetDefault (U &&value) |
Publish a default value. | |
void | SetDefault (std::span< const T > value) |
Publish a default value. | |
TopicType | GetTopic () const |
Get the corresponding topic. | |
Public Member Functions inherited from nt::Publisher | |
virtual | ~Publisher () |
Publisher (const Publisher &)=delete | |
Publisher & | operator= (const Publisher &)=delete |
Publisher (Publisher &&rhs) | |
Publisher & | operator= (Publisher &&rhs) |
operator bool () const | |
Determines if the native handle is valid. | |
NT_Publisher | GetHandle () const |
Gets the native handle for the publisher. | |
Topic | GetTopic () const |
Gets the published-to topic. | |
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. | |
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.