57 return ::wpi::nt::GetBoolean(
m_subHandle, defaultValue);
68 return ::wpi::nt::GetInteger(
m_subHandle, defaultValue);
79 return ::wpi::nt::GetFloat(
m_subHandle, defaultValue);
90 return ::wpi::nt::GetDouble(
m_subHandle, defaultValue);
100 std::string
GetString(std::string_view defaultValue)
const {
101 return ::wpi::nt::GetString(
m_subHandle, defaultValue);
111 std::vector<uint8_t>
GetRaw(std::span<const uint8_t> defaultValue)
const {
112 return ::wpi::nt::GetRaw(
m_subHandle, defaultValue);
130 return ::wpi::nt::GetBooleanArray(
m_subHandle, defaultValue);
144 std::span<const int64_t> defaultValue)
const {
145 return ::wpi::nt::GetIntegerArray(
m_subHandle, defaultValue);
158 std::vector<float>
GetFloatArray(std::span<const float> defaultValue)
const {
159 return ::wpi::nt::GetFloatArray(
m_subHandle, defaultValue);
173 std::span<const double> defaultValue)
const {
174 return ::wpi::nt::GetDoubleArray(
m_subHandle, defaultValue);
188 std::span<const std::string> defaultValue)
const {
189 return ::wpi::nt::GetStringArray(
m_subHandle, defaultValue);
294 bool SetString(std::string_view value, int64_t time = 0) {
305 bool SetRaw(std::span<const uint8_t> value, int64_t time = 0) {
Value TimestampedValueType
Definition GenericEntry.hpp:518
NT_Entry GetHandle() const
Gets the native handle for the entry.
Definition GenericEntry.hpp:543
GenericSubscriber SubscriberType
Definition GenericEntry.hpp:513
Topic TopicType
Definition GenericEntry.hpp:515
const Value & ParamType
Definition GenericEntry.hpp:517
TopicType GetTopic() const
Get the corresponding topic.
Definition GenericEntry.hpp:550
Value ValueType
Definition GenericEntry.hpp:516
GenericPublisher PublisherType
Definition GenericEntry.hpp:514
void Unpublish()
Stops publishing the entry if it's published.
Definition GenericEntry.hpp:557
GenericEntry(NT_Entry handle)
Construct from an entry handle; recommended to use RawTopic::GetEntry() instead.
Definition GenericEntry.hpp:528
bool SetStringArray(std::span< const std::string > value, int64_t time=0)
Sets the entry's value.
Definition GenericEntry.hpp:371
bool SetDefaultFloatArray(std::span< const float > defaultValue)
Sets the entry's value if it does not exist.
Definition GenericEntry.hpp:472
TopicType GetTopic() const
Get the corresponding topic.
Definition GenericEntry.hpp:501
Value TimestampedValueType
Definition GenericEntry.hpp:224
void SetDefault(ParamType value)
Publish a default value.
Definition GenericEntry.hpp:382
bool SetFloat(float value, int64_t time=0)
Sets the entry's value.
Definition GenericEntry.hpp:272
GenericPublisher(NT_Publisher handle)
Construct from a publisher handle; recommended to use Topic::GenericPublish() instead.
Definition GenericEntry.hpp:234
bool SetDefaultDoubleArray(std::span< const double > defaultValue)
Sets the entry's value if it does not exist.
Definition GenericEntry.hpp:482
GenericPublisher()=default
bool SetDouble(double value, int64_t time=0)
Sets the entry's value.
Definition GenericEntry.hpp:283
bool SetBooleanArray(std::span< const int > value, int64_t time=0)
Sets the entry's value.
Definition GenericEntry.hpp:327
Topic TopicType
Definition GenericEntry.hpp:221
bool SetBooleanArray(std::span< const bool > value, int64_t time=0)
Sets the entry's value.
Definition GenericEntry.hpp:316
bool SetRaw(std::span< const uint8_t > value, int64_t time=0)
Sets the entry's value.
Definition GenericEntry.hpp:305
bool SetInteger(int64_t value, int64_t time=0)
Sets the entry's value.
Definition GenericEntry.hpp:261
bool SetString(std::string_view value, int64_t time=0)
Sets the entry's value.
Definition GenericEntry.hpp:294
void Set(ParamType value)
Publish a new value.
Definition GenericEntry.hpp:241
Value ValueType
Definition GenericEntry.hpp:222
const Value & ParamType
Definition GenericEntry.hpp:223
bool SetDefaultString(std::string_view defaultValue)
Sets the entry's value if it does not exist.
Definition GenericEntry.hpp:432
bool SetDefaultDouble(double defaultValue)
Sets the entry's value if it does not exist.
Definition GenericEntry.hpp:422
bool SetFloatArray(std::span< const float > value, int64_t time=0)
Sets the entry's value.
Definition GenericEntry.hpp:349
bool SetBoolean(bool value, int64_t time=0)
Sets the entry's value.
Definition GenericEntry.hpp:250
bool SetDoubleArray(std::span< const double > value, int64_t time=0)
Sets the entry's value.
Definition GenericEntry.hpp:360
bool SetDefaultIntegerArray(std::span< const int64_t > defaultValue)
Sets the entry's value if it does not exist.
Definition GenericEntry.hpp:462
bool SetDefaultInteger(int64_t defaultValue)
Sets the entry's value if it does not exist.
Definition GenericEntry.hpp:402
bool SetDefaultFloat(float defaultValue)
Sets the entry's value if it does not exist.
Definition GenericEntry.hpp:412
bool SetDefaultRaw(std::span< const uint8_t > defaultValue)
Sets the entry's value if it does not exist.
Definition GenericEntry.hpp:442
bool SetIntegerArray(std::span< const int64_t > value, int64_t time=0)
Sets the entry's value.
Definition GenericEntry.hpp:338
bool SetDefaultBoolean(bool defaultValue)
Sets the entry's value if it does not exist.
Definition GenericEntry.hpp:392
bool SetDefaultStringArray(std::span< const std::string > defaultValue)
Sets the entry's value if it does not exist.
Definition GenericEntry.hpp:492
bool SetDefaultBooleanArray(std::span< const int > defaultValue)
Sets the entry's value if it does not exist.
Definition GenericEntry.hpp:452
std::vector< std::string > GetStringArray(std::span< const std::string > defaultValue) const
Gets the entry's value as a string array.
Definition GenericEntry.hpp:187
const Value & ParamType
Definition GenericEntry.hpp:28
std::vector< TimestampedValueType > ReadQueue()
Get an array of all value changes since the last call to ReadQueue.
Definition GenericEntry.hpp:202
std::string GetString(std::string_view defaultValue) const
Gets the entry's value as a string.
Definition GenericEntry.hpp:100
GenericSubscriber(NT_Subscriber handle)
Construct from a subscriber handle; recommended to use Topic::GenericSubscribe() instead.
Definition GenericEntry.hpp:39
Value ValueType
Definition GenericEntry.hpp:27
std::vector< double > GetDoubleArray(std::span< const double > defaultValue) const
Gets the entry's value as a double array.
Definition GenericEntry.hpp:172
bool GetBoolean(bool defaultValue) const
Gets the entry's value as a boolean.
Definition GenericEntry.hpp:56
int64_t GetInteger(int64_t defaultValue) const
Gets the entry's value as a integer.
Definition GenericEntry.hpp:67
GenericSubscriber()=default
Topic TopicType
Definition GenericEntry.hpp:26
Value TimestampedValueType
Definition GenericEntry.hpp:29
double GetDouble(double defaultValue) const
Gets the entry's value as a double.
Definition GenericEntry.hpp:89
TopicType GetTopic() const
Get the corresponding topic.
Definition GenericEntry.hpp:211
std::vector< int64_t > GetIntegerArray(std::span< const int64_t > defaultValue) const
Gets the entry's value as a integer array.
Definition GenericEntry.hpp:143
std::vector< float > GetFloatArray(std::span< const float > defaultValue) const
Gets the entry's value as a float array.
Definition GenericEntry.hpp:158
ValueType Get() const
Get the last published value.
Definition GenericEntry.hpp:47
std::vector< uint8_t > GetRaw(std::span< const uint8_t > defaultValue) const
Gets the entry's value as a raw.
Definition GenericEntry.hpp:111
float GetFloat(float defaultValue) const
Gets the entry's value as a float.
Definition GenericEntry.hpp:78
std::vector< int > GetBooleanArray(std::span< const int > defaultValue) const
Gets the entry's value as a boolean array.
Definition GenericEntry.hpp:129
Publisher(const Publisher &)=delete
NT_Publisher m_pubHandle
NetworkTables handle.
Definition Topic.hpp:440
Subscriber(const Subscriber &)=delete
NT_Subscriber m_subHandle
Definition Topic.hpp:385
NetworkTables Topic.
Definition Topic.hpp:27
A network table entry value.
Definition NetworkTableValue.hpp:35
static Value MakeBooleanArray(std::span< const bool > value, int64_t time=0)
Creates a boolean array entry value.
bool SetDefaultBoolean(NT_Handle pubentry, bool defaultValue)
Publish a default value.
bool SetBoolean(NT_Handle pubentry, bool value, int64_t time=0)
Publish a new value.
bool SetDefaultBooleanArray(NT_Handle pubentry, std::span< const int > defaultValue)
Publish a default value.
bool SetBooleanArray(NT_Handle pubentry, std::span< const int > value, int64_t time=0)
Publish a new value.
bool SetDefaultDouble(NT_Handle pubentry, double defaultValue)
Publish a default value.
bool SetDouble(NT_Handle pubentry, double value, int64_t time=0)
Publish a new value.
bool SetDefaultDoubleArray(NT_Handle pubentry, std::span< const double > defaultValue)
Publish a default value.
bool SetDoubleArray(NT_Handle pubentry, std::span< const double > value, int64_t time=0)
Publish a new value.
bool SetDefaultFloat(NT_Handle pubentry, float defaultValue)
Publish a default value.
bool SetFloat(NT_Handle pubentry, float value, int64_t time=0)
Publish a new value.
bool SetDefaultFloatArray(NT_Handle pubentry, std::span< const float > defaultValue)
Publish a default value.
bool SetFloatArray(NT_Handle pubentry, std::span< const float > value, int64_t time=0)
Publish a new value.
bool SetInteger(NT_Handle pubentry, int64_t value, int64_t time=0)
Publish a new value.
bool SetDefaultInteger(NT_Handle pubentry, int64_t defaultValue)
Publish a default value.
bool SetDefaultIntegerArray(NT_Handle pubentry, std::span< const int64_t > defaultValue)
Publish a default value.
bool SetIntegerArray(NT_Handle pubentry, std::span< const int64_t > value, int64_t time=0)
Publish a new value.
bool SetRaw(NT_Handle pubentry, std::span< const uint8_t > value, int64_t time=0)
Publish a new value.
bool SetDefaultRaw(NT_Handle pubentry, std::span< const uint8_t > defaultValue)
Publish a default value.
bool SetDefaultString(NT_Handle pubentry, std::string_view defaultValue)
Publish a default value.
bool SetString(NT_Handle pubentry, std::string_view value, int64_t time=0)
Publish a new value.
bool SetDefaultStringArray(NT_Handle pubentry, std::span< const std::string > defaultValue)
Publish a default value.
bool SetStringArray(NT_Handle pubentry, std::span< const std::string > value, int64_t time=0)
Publish a new value.
NT_Handle NT_Subscriber
Definition ntcore_c.h:43
NT_Handle NT_Publisher
Definition ntcore_c.h:44
NT_Handle NT_Entry
Definition ntcore_c.h:37
bool SetEntryValue(NT_Entry entry, const Value &value)
Set Entry Value.
bool SetDefaultEntryValue(NT_Entry entry, const Value &value)
Set Default Entry Value.
NT_Topic GetTopicFromHandle(NT_Handle pubsubentry)
Gets the topic handle from an entry/subscriber/publisher handle.
void Unpublish(NT_Handle pubentry)
Stops publisher.
NetworkTables (ntcore) namespace.
Definition NTSendable.hpp:9