WPILibC++ 2023.4.3
|
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. More... | |
void | Set (ParamType value) |
Publish a new value. More... | |
bool | SetBoolean (bool value, int64_t time=0) |
Sets the entry's value. More... | |
bool | SetInteger (int64_t value, int64_t time=0) |
Sets the entry's value. More... | |
bool | SetFloat (float value, int64_t time=0) |
Sets the entry's value. More... | |
bool | SetDouble (double value, int64_t time=0) |
Sets the entry's value. More... | |
bool | SetString (std::string_view value, int64_t time=0) |
Sets the entry's value. More... | |
bool | SetRaw (std::span< const uint8_t > value, int64_t time=0) |
Sets the entry's value. More... | |
bool | SetBooleanArray (std::span< const bool > value, int64_t time=0) |
Sets the entry's value. More... | |
bool | SetBooleanArray (std::span< const int > value, int64_t time=0) |
Sets the entry's value. More... | |
bool | SetIntegerArray (std::span< const int64_t > value, int64_t time=0) |
Sets the entry's value. More... | |
bool | SetFloatArray (std::span< const float > value, int64_t time=0) |
Sets the entry's value. More... | |
bool | SetDoubleArray (std::span< const double > value, int64_t time=0) |
Sets the entry's value. More... | |
bool | SetStringArray (std::span< const std::string > value, int64_t time=0) |
Sets the entry's value. More... | |
void | SetDefault (ParamType value) |
Publish a default value. More... | |
bool | SetDefaultBoolean (bool defaultValue) |
Sets the entry's value if it does not exist. More... | |
bool | SetDefaultInteger (int64_t defaultValue) |
Sets the entry's value if it does not exist. More... | |
bool | SetDefaultFloat (float defaultValue) |
Sets the entry's value if it does not exist. More... | |
bool | SetDefaultDouble (double defaultValue) |
Sets the entry's value if it does not exist. More... | |
bool | SetDefaultString (std::string_view defaultValue) |
Sets the entry's value if it does not exist. More... | |
bool | SetDefaultRaw (std::span< const uint8_t > defaultValue) |
Sets the entry's value if it does not exist. More... | |
bool | SetDefaultBooleanArray (std::span< const int > defaultValue) |
Sets the entry's value if it does not exist. More... | |
bool | SetDefaultIntegerArray (std::span< const int64_t > defaultValue) |
Sets the entry's value if it does not exist. More... | |
bool | SetDefaultFloatArray (std::span< const float > defaultValue) |
Sets the entry's value if it does not exist. More... | |
bool | SetDefaultDoubleArray (std::span< const double > defaultValue) |
Sets the entry's value if it does not exist. More... | |
bool | SetDefaultStringArray (std::span< const std::string > defaultValue) |
Sets the entry's value if it does not exist. 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 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()) |