![]() |
WPILibC++ 2027.0.0-alpha-2
|
NetworkTables unit-typed publisher. More...
#include <networktables/UnitTopic.h>
Public Types | |
| using | TopicType = UnitTopic<T> |
| using | ValueType = T |
| using | ParamType = T |
| using | TimestampedValueType = TimestampedUnit<T> |
Public Member Functions | |
| UnitPublisher ()=default | |
| UnitPublisher (NT_Publisher handle) | |
| Construct from a publisher handle; recommended to use UnitTopic::Publish() instead. | |
| void | Set (ParamType value, int64_t time=0) |
| Publish a new value. | |
| void | SetDefault (ParamType 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 unit-typed publisher.
| T | unit type, e.g. units::meter_t |
| using nt::UnitPublisher< T >::ParamType = T |
| using nt::UnitPublisher< T >::TimestampedValueType = TimestampedUnit<T> |
| using nt::UnitPublisher< T >::TopicType = UnitTopic<T> |
| using nt::UnitPublisher< T >::ValueType = T |
|
default |
|
inlineexplicit |
Construct from a publisher handle; recommended to use UnitTopic::Publish() instead.
| handle | Native handle |
|
inline |
Get the corresponding topic.
|
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 |