![]() |
WPILibC++ 2025.3.2
|
A network table entry value. More...
#include <networktables/NetworkTableValue.h>
Public Member Functions | |
| Value () | |
| Value (NT_Type type, size_t size, int64_t time, const private_init &) | |
| Value (NT_Type type, size_t size, int64_t time, int64_t serverTime, const private_init &) | |
| operator bool () const | |
| NT_Type | type () const |
| Get the data type. | |
| const NT_Value & | value () const |
| Get the data value stored. | |
| int64_t | last_change () const |
| Get the creation time of the value, in local time. | |
| int64_t | time () const |
| Get the creation time of the value, in local time. | |
| size_t | size () const |
| Get the approximate in-memory size of the value in bytes. | |
| void | SetTime (int64_t time) |
| Set the local creation time of the value. | |
| int64_t | server_time () const |
| Get the creation time of the value, in server time. | |
| void | SetServerTime (int64_t time) |
| Set the creation time of the value, in server time. | |
Type Checkers | |
| bool | IsValid () const |
| Determine if entry value contains a value or is unassigned. | |
| bool | IsBoolean () const |
| Determine if entry value contains a boolean. | |
| bool | IsInteger () const |
| Determine if entry value contains an integer. | |
| bool | IsFloat () const |
| Determine if entry value contains a float. | |
| bool | IsDouble () const |
| Determine if entry value contains a double. | |
| bool | IsString () const |
| Determine if entry value contains a string. | |
| bool | IsRaw () const |
| Determine if entry value contains a raw. | |
| bool | IsBooleanArray () const |
| Determine if entry value contains a boolean array. | |
| bool | IsIntegerArray () const |
| Determine if entry value contains an integer array. | |
| bool | IsFloatArray () const |
| Determine if entry value contains a float array. | |
| bool | IsDoubleArray () const |
| Determine if entry value contains a double array. | |
| bool | IsStringArray () const |
| Determine if entry value contains a string array. | |
Type-Safe Getters | |
| bool | GetBoolean () const |
| Get the entry's boolean value. | |
| int64_t | GetInteger () const |
| Get the entry's integer value. | |
| float | GetFloat () const |
| Get the entry's float value. | |
| double | GetDouble () const |
| Get the entry's double value. | |
| std::string_view | GetString () const |
| Get the entry's string value. | |
| std::span< const uint8_t > | GetRaw () const |
| Get the entry's raw value. | |
| std::span< const int > | GetBooleanArray () const |
| Get the entry's boolean array value. | |
| std::span< const int64_t > | GetIntegerArray () const |
| Get the entry's integer array value. | |
| std::span< const float > | GetFloatArray () const |
| Get the entry's float array value. | |
| std::span< const double > | GetDoubleArray () const |
| Get the entry's double array value. | |
| std::span< const std::string > | GetStringArray () const |
| Get the entry's string array value. | |
Static Public Member Functions | |
Factory functions | |
| static Value | MakeBoolean (bool value, int64_t time=0) |
| Creates a boolean entry value. | |
| static Value | MakeInteger (int64_t value, int64_t time=0) |
| Creates an integer entry value. | |
| static Value | MakeFloat (float value, int64_t time=0) |
| Creates a float entry value. | |
| static Value | MakeDouble (double value, int64_t time=0) |
| Creates a double entry value. | |
| static Value | MakeString (std::string_view value, int64_t time=0) |
| Creates a string entry value. | |
| template<std::same_as< std::string > T> | |
| static Value | MakeString (T &&value, int64_t time=0) |
| Creates a string entry value. | |
| static Value | MakeRaw (std::span< const uint8_t > value, int64_t time=0) |
| Creates a raw entry value. | |
| template<std::same_as< std::vector< uint8_t > > T> | |
| static Value | MakeRaw (T &&value, int64_t time=0) |
| Creates a raw entry value. | |
| static Value | MakeBooleanArray (std::span< const bool > value, int64_t time=0) |
| Creates a boolean array entry value. | |
| static Value | MakeBooleanArray (std::initializer_list< bool > value, int64_t time=0) |
| Creates a boolean array entry value. | |
| static Value | MakeBooleanArray (std::span< const int > value, int64_t time=0) |
| Creates a boolean array entry value. | |
| static Value | MakeBooleanArray (std::initializer_list< int > value, int64_t time=0) |
| Creates a boolean array entry value. | |
| static Value | MakeBooleanArray (std::vector< int > &&value, int64_t time=0) |
| Creates a boolean array entry value. | |
| static Value | MakeIntegerArray (std::span< const int64_t > value, int64_t time=0) |
| Creates an integer array entry value. | |
| static Value | MakeIntegerArray (std::initializer_list< int64_t > value, int64_t time=0) |
| Creates an integer array entry value. | |
| static Value | MakeIntegerArray (std::vector< int64_t > &&value, int64_t time=0) |
| Creates an integer array entry value. | |
| static Value | MakeFloatArray (std::span< const float > value, int64_t time=0) |
| Creates a float array entry value. | |
| static Value | MakeFloatArray (std::initializer_list< float > value, int64_t time=0) |
| Creates a float array entry value. | |
| static Value | MakeFloatArray (std::vector< float > &&value, int64_t time=0) |
| Creates a float array entry value. | |
| static Value | MakeDoubleArray (std::span< const double > value, int64_t time=0) |
| Creates a double array entry value. | |
| static Value | MakeDoubleArray (std::initializer_list< double > value, int64_t time=0) |
| Creates a double array entry value. | |
| static Value | MakeDoubleArray (std::vector< double > &&value, int64_t time=0) |
| Creates a double array entry value. | |
| static Value | MakeStringArray (std::span< const std::string > value, int64_t time=0) |
| Creates a string array entry value. | |
| static Value | MakeStringArray (std::initializer_list< std::string > value, int64_t time=0) |
| Creates a string array entry value. | |
| static Value | MakeStringArray (std::vector< std::string > &&value, int64_t time=0) |
| Creates a string array entry value. | |
Friends | |
| bool | operator== (const Value &lhs, const Value &rhs) |
A network table entry value.
|
inline |
|
inline |
|
inline |
|
inline |
Get the entry's boolean value.
|
inline |
Get the entry's boolean array value.
|
inline |
Get the entry's double value.
|
inline |
Get the entry's double array value.
|
inline |
Get the entry's float value.
|
inline |
Get the entry's float array value.
|
inline |
Get the entry's integer value.
|
inline |
Get the entry's integer array value.
|
inline |
Get the entry's raw value.
|
inline |
Get the entry's string value.
|
inline |
Get the entry's string array value.
|
inline |
Determine if entry value contains a boolean.
|
inline |
Determine if entry value contains a boolean array.
|
inline |
Determine if entry value contains a double.
|
inline |
Determine if entry value contains a double array.
|
inline |
Determine if entry value contains a float.
|
inline |
Determine if entry value contains a float array.
|
inline |
Determine if entry value contains an integer.
|
inline |
Determine if entry value contains an integer array.
|
inline |
Determine if entry value contains a raw.
|
inline |
Determine if entry value contains a string.
|
inline |
Determine if entry value contains a string array.
|
inline |
Determine if entry value contains a value or is unassigned.
|
inline |
Get the creation time of the value, in local time.
|
inlinestatic |
Creates a boolean entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates a boolean array entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates a boolean array entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
static |
Creates a boolean array entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
static |
Creates a boolean array entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
static |
Creates a boolean array entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates a double entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates a double array entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
static |
Creates a double array entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
static |
Creates a double array entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates a float entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates a float array entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
static |
Creates a float array entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
static |
Creates a float array entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates an integer entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates an integer array entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
static |
Creates an integer array entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
static |
Creates an integer array entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates a raw entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates a raw entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates a string entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates a string entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
inlinestatic |
Creates a string array entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
static |
Creates a string array entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
static |
Creates a string array entry value.
| value | the value |
| time | if nonzero, the creation time to use (instead of the current time) |
|
inlineexplicit |
|
inline |
Get the creation time of the value, in server time.
|
inline |
Set the creation time of the value, in server time.
| time | The server time. |
|
inline |
Set the local creation time of the value.
| time | The time. |
|
inline |
Get the approximate in-memory size of the value in bytes.
This is zero for values that do not require additional memory beyond the memory of the Value itself.
|
inline |
Get the creation time of the value, in local time.
|
inline |
Get the data type.
|
inline |
Get the data value stored.