![]() |
WPILibC++ 2025.3.2
|
NetworkTables struct-encoded value publisher. More...
#include <networktables/StructTopic.h>
Public Types | |
| using | TopicType = StructTopic<T, I...> |
| using | ValueType = T |
| using | ParamType = const T& |
| using | TimestampedValueType = Timestamped<T> |
Public Member Functions | |
| StructPublisher ()=default | |
| StructPublisher (const StructPublisher &)=delete | |
| StructPublisher & | operator= (const StructPublisher &)=delete |
| StructPublisher (StructPublisher &&rhs) | |
| StructPublisher & | operator= (StructPublisher &&rhs) |
| StructPublisher (NT_Publisher handle, I... info) | |
| Construct from a publisher handle; recommended to use StructTopic::Publish() instead. | |
| void | Set (const T &value, int64_t time=0) |
| Publish a new value. | |
| void | SetDefault (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::Publisher | |
| Publisher ()=default | |
| Publisher (NT_Publisher handle) | |
Protected Attributes inherited from nt::Publisher | |
| NT_Publisher | m_pubHandle {0} |
| NetworkTables handle. | |
NetworkTables struct-encoded value publisher.
| using nt::StructPublisher< T, I >::ParamType = const T& |
| using nt::StructPublisher< T, I >::TimestampedValueType = Timestamped<T> |
| using nt::StructPublisher< T, I >::TopicType = StructTopic<T, I...> |
| using nt::StructPublisher< T, I >::ValueType = T |
|
default |
|
delete |
|
inline |
|
inlineexplicit |
Construct from a publisher handle; recommended to use StructTopic::Publish() instead.
| handle | Native handle |
| info | optional struct type info |
|
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 default value.
On reconnect, a default value will never be used in preference to a published value.
| value | value |