WPILibC++ 2024.3.2
|
NetworkTables struct-encoded value array publisher. More...
#include <networktables/StructArrayTopic.h>
Public Types | |
using | TopicType = StructArrayTopic< T, I... > |
using | ValueType = std::vector< T > |
using | ParamType = std::span< const T > |
using | TimestampedValueType = Timestamped< ValueType > |
Public Member Functions | |
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 & | operator= (const StructArrayPublisher &)=delete |
StructArrayPublisher (StructArrayPublisher &&rhs) | |
StructArrayPublisher & | operator= (StructArrayPublisher &&rhs) |
template<typename U > | |
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... | |
template<typename U > | |
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::Publisher | |
Publisher ()=default | |
Publisher (NT_Publisher handle) | |
Protected Attributes inherited from nt::Publisher | |
NT_Publisher | m_pubHandle {0} |
NetworkTables handle. More... | |
NetworkTables struct-encoded value array publisher.
using nt::StructArrayPublisher< T, I >::ParamType = std::span<const T> |
using nt::StructArrayPublisher< T, I >::TimestampedValueType = Timestamped<ValueType> |
using nt::StructArrayPublisher< T, I >::TopicType = StructArrayTopic<T, I...> |
using nt::StructArrayPublisher< T, I >::ValueType = std::vector<T> |
|
default |
|
inlineexplicit |
Construct from a publisher handle; recommended to use StructTopic::Publish() instead.
handle | Native handle |
info | optional struct type info |
|
delete |
|
inline |
|
inline |
Get the corresponding topic.
|
delete |
|
inline |
|
inline |
Publish a new value.
value | value to publish |
time | timestamp; 0 indicates current NT time should be used |
|
inline |
Publish a new value.
value | value to publish |
time | timestamp; 0 indicates current NT time should be used |
|
inline |
Publish a default value.
On reconnect, a default value will never be used in preference to a published value.
value | value |
|
inline |
Publish a default value.
On reconnect, a default value will never be used in preference to a published value.
value | value |