![]() |
WPILibC++ 2027.0.0-alpha-2
|
NetworkTables generic publisher. More...
#include <networktables/GenericEntry.h>
Public Types | |
| using | TopicType = Topic |
| using | ValueType = Value |
| using | ParamType = const Value& |
| using | TimestampedValueType = Value |
Public Member Functions | |
| GenericPublisher ()=default | |
| GenericPublisher (NT_Publisher handle) | |
| Construct from a publisher handle; recommended to use Topic::GenericPublish() instead. | |
| void | Set (ParamType value) |
| Publish a new value. | |
| bool | SetBoolean (bool value, int64_t time=0) |
| Sets the entry's value. | |
| bool | SetInteger (int64_t value, int64_t time=0) |
| Sets the entry's value. | |
| bool | SetFloat (float value, int64_t time=0) |
| Sets the entry's value. | |
| bool | SetDouble (double value, int64_t time=0) |
| Sets the entry's value. | |
| bool | SetString (std::string_view value, int64_t time=0) |
| Sets the entry's value. | |
| bool | SetRaw (std::span< const uint8_t > value, int64_t time=0) |
| Sets the entry's value. | |
| bool | SetBooleanArray (std::span< const bool > value, int64_t time=0) |
| Sets the entry's value. | |
| bool | SetBooleanArray (std::span< const int > value, int64_t time=0) |
| Sets the entry's value. | |
| bool | SetIntegerArray (std::span< const int64_t > value, int64_t time=0) |
| Sets the entry's value. | |
| bool | SetFloatArray (std::span< const float > value, int64_t time=0) |
| Sets the entry's value. | |
| bool | SetDoubleArray (std::span< const double > value, int64_t time=0) |
| Sets the entry's value. | |
| bool | SetStringArray (std::span< const std::string > value, int64_t time=0) |
| Sets the entry's value. | |
| void | SetDefault (ParamType value) |
| Publish a default value. | |
| bool | SetDefaultBoolean (bool defaultValue) |
| Sets the entry's value if it does not exist. | |
| bool | SetDefaultInteger (int64_t defaultValue) |
| Sets the entry's value if it does not exist. | |
| bool | SetDefaultFloat (float defaultValue) |
| Sets the entry's value if it does not exist. | |
| bool | SetDefaultDouble (double defaultValue) |
| Sets the entry's value if it does not exist. | |
| bool | SetDefaultString (std::string_view defaultValue) |
| Sets the entry's value if it does not exist. | |
| bool | SetDefaultRaw (std::span< const uint8_t > defaultValue) |
| Sets the entry's value if it does not exist. | |
| bool | SetDefaultBooleanArray (std::span< const int > defaultValue) |
| Sets the entry's value if it does not exist. | |
| bool | SetDefaultIntegerArray (std::span< const int64_t > defaultValue) |
| Sets the entry's value if it does not exist. | |
| bool | SetDefaultFloatArray (std::span< const float > defaultValue) |
| Sets the entry's value if it does not exist. | |
| bool | SetDefaultDoubleArray (std::span< const double > defaultValue) |
| Sets the entry's value if it does not exist. | |
| bool | SetDefaultStringArray (std::span< const std::string > defaultValue) |
| Sets the entry's value if it does not exist. | |
| 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 generic publisher.
| using nt::GenericPublisher::ParamType = const Value& |
| using nt::GenericPublisher::TopicType = Topic |
| using nt::GenericPublisher::ValueType = Value |
|
default |
|
inlineexplicit |
Construct from a publisher handle; recommended to use Topic::GenericPublish() instead.
| handle | Native handle |
|
inline |
Publish a new value.
| value | value to publish |
|
inline |
Sets the entry's value.
| value | the value to set |
| time | the timestamp to set (0 = nt::Now()) |
|
inline |
Sets the entry's value.
| value | the value to set |
| time | the timestamp to set (0 = nt::Now()) |
|
inline |
Sets the entry's value.
| value | the value to set |
| time | the timestamp to set (0 = nt::Now()) |
|
inline |
Publish a default value.
On reconnect, a default value will never be used in preference to a published value.
| value | value |
|
inline |
Sets the entry's value if it does not exist.
| defaultValue | the default value to set |
|
inline |
Sets the entry's value if it does not exist.
| defaultValue | the default value to set |
|
inline |
Sets the entry's value if it does not exist.
| defaultValue | the default value to set |
|
inline |
Sets the entry's value if it does not exist.
| defaultValue | the default value to set |
|
inline |
Sets the entry's value if it does not exist.
| defaultValue | the default value to set |
|
inline |
Sets the entry's value if it does not exist.
| defaultValue | the default value to set |
|
inline |
Sets the entry's value if it does not exist.
| defaultValue | the default value to set |
|
inline |
Sets the entry's value if it does not exist.
| defaultValue | the default value to set |
|
inline |
Sets the entry's value if it does not exist.
| defaultValue | the default value to set |
|
inline |
Sets the entry's value if it does not exist.
| defaultValue | the default value to set |
|
inline |
Sets the entry's value if it does not exist.
| defaultValue | the default value to set |
|
inline |
Sets the entry's value.
| value | the value to set |
| time | the timestamp to set (0 = nt::Now()) |
|
inline |
Sets the entry's value.
| value | the value to set |
| time | the timestamp to set (0 = nt::Now()) |
|
inline |
Sets the entry's value.
| value | the value to set |
| time | the timestamp to set (0 = nt::Now()) |
|
inline |
Sets the entry's value.
| value | the value to set |
| time | the timestamp to set (0 = nt::Now()) |
|
inline |
Sets the entry's value.
| value | the value to set |
| time | the timestamp to set (0 = nt::Now()) |
|
inline |
Sets the entry's value.
| value | the value to set |
| time | the timestamp to set (0 = nt::Now()) |
|
inline |
Sets the entry's value.
| value | the value to set |
| time | the timestamp to set (0 = nt::Now()) |
|
inline |
Sets the entry's value.
| value | the value to set |
| time | the timestamp to set (0 = nt::Now()) |
|
inline |
Sets the entry's value.
| value | the value to set |
| time | the timestamp to set (0 = nt::Now()) |