![]() |
WPILibC++ 2025.3.2
|
NetworkTables protobuf-encoded value publisher. More...
#include <networktables/ProtobufTopic.h>
Public Types | |
| using | TopicType = ProtobufTopic<T> |
| using | ValueType = T |
| using | ParamType = const T& |
| using | TimestampedValueType = Timestamped<T> |
Public Member Functions | |
| ProtobufPublisher ()=default | |
| ProtobufPublisher (NT_Publisher handle, wpi::ProtobufMessage< T > msg) | |
| Construct from a publisher handle; recommended to use ProtobufTopic::Publish() instead. | |
| ProtobufPublisher (const ProtobufPublisher &)=delete | |
| ProtobufPublisher & | operator= (const ProtobufPublisher &)=delete |
| ProtobufPublisher (ProtobufPublisher &&rhs) | |
| ProtobufPublisher & | operator= (ProtobufPublisher &&rhs) |
| 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 protobuf-encoded value publisher.
| using nt::ProtobufPublisher< T >::ParamType = const T& |
| using nt::ProtobufPublisher< T >::TimestampedValueType = Timestamped<T> |
| using nt::ProtobufPublisher< T >::TopicType = ProtobufTopic<T> |
| using nt::ProtobufPublisher< T >::ValueType = T |
|
default |
|
inlineexplicit |
Construct from a publisher handle; recommended to use ProtobufTopic::Publish() instead.
| handle | Native handle |
| msg | Protobuf message |
|
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 default value.
On reconnect, a default value will never be used in preference to a published value.
| value | value |