20class NetworkTableInstance;
 
   50  explicit operator bool()
 const { 
return m_handle != 0; }
 
  155  std::string 
GetString(std::string_view defaultValue)
 const {
 
 
  166  std::vector<uint8_t> 
GetRaw(std::span<const uint8_t> defaultValue)
 const {
 
 
  199      std::span<const int64_t> defaultValue)
 const {
 
 
  213  std::vector<float> 
GetFloatArray(std::span<const float> defaultValue)
 const {
 
 
  228      std::span<const double> defaultValue)
 const {
 
 
  243      std::span<const std::string> defaultValue)
 const {
 
 
  438  bool SetString(std::string_view value, int64_t time = 0) {
 
 
  449  bool SetRaw(std::span<const uint8_t> value, int64_t time = 0) {
 
 
 
NetworkTables Entry.
Definition NetworkTableEntry.h:31
 
NetworkTableType GetType() const
Gets the type of the entry.
Definition NetworkTableEntry.h:85
 
bool SetBooleanArray(std::span< const int > value, int64_t time=0)
Sets the entry's value.
Definition NetworkTableEntry.h:471
 
std::vector< int > GetBooleanArray(std::span< const int > defaultValue) const
Gets the entry's value as a boolean array.
Definition NetworkTableEntry.h:184
 
std::string GetName() const
Gets the name of the entry (the key).
Definition NetworkTableEntry.h:78
 
bool SetDouble(double value, int64_t time=0)
Sets the entry's value.
Definition NetworkTableEntry.h:427
 
void Unpublish()
Stops publishing the entry if it's been published.
Definition NetworkTableEntry.h:545
 
NetworkTableEntry(NT_Entry handle)
Construct from native handle.
Definition NetworkTableEntry.h:43
 
std::vector< float > GetFloatArray(std::span< const float > defaultValue) const
Gets the entry's value as a float array.
Definition NetworkTableEntry.h:213
 
void ClearPersistent()
Stop making value persistent through program restarts.
Definition NetworkTableEntry.h:529
 
std::vector< std::string > GetStringArray(std::span< const std::string > defaultValue) const
Gets the entry's value as a string array.
Definition NetworkTableEntry.h:242
 
void SetPersistent()
Make value persistent through program restarts.
Definition NetworkTableEntry.h:522
 
bool SetString(std::string_view value, int64_t time=0)
Sets the entry's value.
Definition NetworkTableEntry.h:438
 
float GetFloat(float defaultValue) const
Gets the entry's value as a float.
Definition NetworkTableEntry.h:133
 
bool SetDefaultValue(const Value &defaultValue)
Sets the entry's value if it does not exist.
Definition NetworkTableEntry.h:265
 
Topic GetTopic() const
Gets the entry's topic.
 
bool SetDefaultFloat(float defaultValue)
Sets the entry's value if it does not exist.
Definition NetworkTableEntry.h:295
 
bool SetBoolean(bool value, int64_t time=0)
Sets the entry's value.
Definition NetworkTableEntry.h:394
 
int64_t GetLastChange() const
Gets the last time the entry's value was changed.
Definition NetworkTableEntry.h:94
 
bool SetDefaultFloatArray(std::span< const float > defaultValue)
Sets the entry's value if it does not exist.
Definition NetworkTableEntry.h:355
 
std::vector< double > GetDoubleArray(std::span< const double > defaultValue) const
Gets the entry's value as a double array.
Definition NetworkTableEntry.h:227
 
bool SetDefaultRaw(std::span< const uint8_t > defaultValue)
Sets the entry's value if it does not exist.
Definition NetworkTableEntry.h:325
 
bool IsPersistent() const
Returns whether the value is persistent through program restarts.
Definition NetworkTableEntry.h:538
 
bool SetValue(const Value &value)
Sets the entry's value.
Definition NetworkTableEntry.h:385
 
bool SetDoubleArray(std::span< const double > value, int64_t time=0)
Sets the entry's value.
Definition NetworkTableEntry.h:504
 
double GetDouble(double defaultValue) const
Gets the entry's value as a double.
Definition NetworkTableEntry.h:144
 
std::vector< uint8_t > GetRaw(std::span< const uint8_t > defaultValue) const
Gets the entry's value as a raw.
Definition NetworkTableEntry.h:166
 
NetworkTableEntry()=default
Construct invalid instance.
 
bool SetDefaultString(std::string_view defaultValue)
Sets the entry's value if it does not exist.
Definition NetworkTableEntry.h:315
 
bool SetFloatArray(std::span< const float > value, int64_t time=0)
Sets the entry's value.
Definition NetworkTableEntry.h:493
 
bool SetInteger(int64_t value, int64_t time=0)
Sets the entry's value.
Definition NetworkTableEntry.h:405
 
bool SetFloat(float value, int64_t time=0)
Sets the entry's value.
Definition NetworkTableEntry.h:416
 
int64_t GetInteger(int64_t defaultValue) const
Gets the entry's value as a integer.
Definition NetworkTableEntry.h:122
 
bool Exists() const
Determines if the entry currently exists.
Definition NetworkTableEntry.h:71
 
bool SetDefaultDouble(double defaultValue)
Sets the entry's value if it does not exist.
Definition NetworkTableEntry.h:305
 
bool SetDefaultDoubleArray(std::span< const double > defaultValue)
Sets the entry's value if it does not exist.
Definition NetworkTableEntry.h:365
 
Value GetValue() const
Gets the entry's value.
Definition NetworkTableEntry.h:102
 
NetworkTableInstance GetInstance() const
Gets the instance for the entry.
 
bool SetDefaultBooleanArray(std::span< const int > defaultValue)
Sets the entry's value if it does not exist.
Definition NetworkTableEntry.h:335
 
std::vector< NetworkTableValue > ReadQueue()
Get an array of all value changes since the last call to ReadQueue.
Definition NetworkTableEntry.h:255
 
bool operator==(const NetworkTableEntry &) const =default
Equality operator.
 
NT_Entry m_handle
Definition NetworkTableEntry.h:562
 
bool SetRaw(std::span< const uint8_t > value, int64_t time=0)
Sets the entry's value.
Definition NetworkTableEntry.h:449
 
NT_Entry GetHandle() const
Gets the native handle for the entry.
Definition NetworkTableEntry.h:57
 
bool GetBoolean(bool defaultValue) const
Gets the entry's value as a boolean.
Definition NetworkTableEntry.h:111
 
std::vector< int64_t > GetIntegerArray(std::span< const int64_t > defaultValue) const
Gets the entry's value as a integer array.
Definition NetworkTableEntry.h:198
 
bool SetDefaultBoolean(bool defaultValue)
Sets the entry's value if it does not exist.
Definition NetworkTableEntry.h:275
 
bool SetBooleanArray(std::span< const bool > value, int64_t time=0)
Sets the entry's value.
Definition NetworkTableEntry.h:460
 
bool SetStringArray(std::span< const std::string > value, int64_t time=0)
Sets the entry's value.
Definition NetworkTableEntry.h:515
 
bool SetDefaultStringArray(std::span< const std::string > defaultValue)
Sets the entry's value if it does not exist.
Definition NetworkTableEntry.h:375
 
std::string GetString(std::string_view defaultValue) const
Gets the entry's value as a string.
Definition NetworkTableEntry.h:155
 
bool SetDefaultIntegerArray(std::span< const int64_t > defaultValue)
Sets the entry's value if it does not exist.
Definition NetworkTableEntry.h:345
 
bool SetDefaultInteger(int64_t defaultValue)
Sets the entry's value if it does not exist.
Definition NetworkTableEntry.h:285
 
bool SetIntegerArray(std::span< const int64_t > value, int64_t time=0)
Sets the entry's value.
Definition NetworkTableEntry.h:482
 
NetworkTables Instance.
Definition NetworkTableInstance.h:68
 
NetworkTables Topic.
Definition Topic.h:28
 
A network table entry value.
Definition NetworkTableValue.h:35
 
static Value MakeBooleanArray(std::span< const bool > value, int64_t time=0)
Creates a boolean array entry value.
 
bool SetBoolean(NT_Handle pubentry, bool value, int64_t time=0)
Publish a new value.
 
bool SetDefaultBoolean(NT_Handle pubentry, bool defaultValue)
Publish a default value.
 
bool GetBoolean(NT_Handle subentry, bool defaultValue)
Get the last published value.
 
bool SetBooleanArray(NT_Handle pubentry, std::span< const int > value, int64_t time=0)
Publish a new value.
 
bool SetDefaultBooleanArray(NT_Handle pubentry, std::span< const int > defaultValue)
Publish a default value.
 
std::vector< int > GetBooleanArray(NT_Handle subentry, std::span< const int > defaultValue)
Get the last published value.
 
bool SetDefaultDouble(NT_Handle pubentry, double defaultValue)
Publish a default value.
 
double GetDouble(NT_Handle subentry, double defaultValue)
Get the last published value.
 
bool SetDouble(NT_Handle pubentry, double value, int64_t time=0)
Publish a new value.
 
bool SetDoubleArray(NT_Handle pubentry, std::span< const double > value, int64_t time=0)
Publish a new value.
 
bool SetDefaultDoubleArray(NT_Handle pubentry, std::span< const double > defaultValue)
Publish a default value.
 
std::vector< double > GetDoubleArray(NT_Handle subentry, std::span< const double > defaultValue)
Get the last published value.
 
bool SetDefaultFloat(NT_Handle pubentry, float defaultValue)
Publish a default value.
 
float GetFloat(NT_Handle subentry, float defaultValue)
Get the last published value.
 
bool SetFloat(NT_Handle pubentry, float value, int64_t time=0)
Publish a new value.
 
std::vector< float > GetFloatArray(NT_Handle subentry, std::span< const float > defaultValue)
Get the last published 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.
 
int64_t GetInteger(NT_Handle subentry, int64_t defaultValue)
Get the last published value.
 
bool SetDefaultInteger(NT_Handle pubentry, int64_t defaultValue)
Publish a default value.
 
bool SetInteger(NT_Handle pubentry, int64_t value, int64_t time=0)
Publish a new value.
 
bool SetIntegerArray(NT_Handle pubentry, std::span< const int64_t > value, int64_t time=0)
Publish a new value.
 
std::vector< int64_t > GetIntegerArray(NT_Handle subentry, std::span< const int64_t > defaultValue)
Get the last published value.
 
bool SetDefaultIntegerArray(NT_Handle pubentry, std::span< const int64_t > defaultValue)
Publish a default value.
 
bool SetDefaultRaw(NT_Handle pubentry, std::span< const uint8_t > defaultValue)
Publish a default value.
 
std::vector< uint8_t > GetRaw(NT_Handle subentry, std::span< const uint8_t > defaultValue)
Get the last published value.
 
bool SetRaw(NT_Handle pubentry, std::span< const uint8_t > value, int64_t time=0)
Publish a new value.
 
std::string GetString(NT_Handle subentry, std::string_view defaultValue)
Get the last published 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.
 
std::vector< std::string > GetStringArray(NT_Handle subentry, std::span< const std::string > defaultValue)
Get the last published value.
 
NT_Handle NT_Entry
Definition ntcore_c.h:37
 
@ NT_UNASSIGNED
Definition ntcore_c.h:54
 
NetworkTableType
NetworkTable entry type.
Definition NetworkTableType.h:15
 
NT_Type GetEntryType(NT_Entry entry)
Gets the type for the specified entry, or unassigned if non existent.
 
Value GetEntryValue(NT_Handle subentry)
Get Entry Value.
 
int64_t GetEntryLastChange(NT_Handle subentry)
Gets the last time the entry was changed.
 
std::vector< Value > ReadQueueValue(NT_Handle subentry)
Read Entry Queue.
 
std::string GetEntryName(NT_Entry entry)
Gets the name of the specified entry.
 
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 SetTopicPersistent(NT_Topic topic, bool value)
Sets the persistent property of a topic.
 
void Unpublish(NT_Handle pubentry)
Stops publisher.
 
bool GetTopicPersistent(NT_Topic topic)
Gets the persistent property of a topic.
 
NetworkTables (ntcore) namespace.
Definition ntcore_cpp.h:36