WPILibC++ 2023.4.3-108-ge5452e3
|
A network table entry value. More...
#include <networktables/NetworkTableValue.h>
Public Member Functions | |
Value () | |
Value (NT_Type type, int64_t time, const private_init &) | |
Value (NT_Type type, int64_t time, int64_t serverTime, const private_init &) | |
operator bool () const | |
NT_Type | type () const |
Get the data type. More... | |
const NT_Value & | value () const |
Get the data value stored. More... | |
int64_t | last_change () const |
Get the creation time of the value, in local time. More... | |
int64_t | time () const |
Get the creation time of the value, in local time. More... | |
void | SetTime (int64_t time) |
Set the local creation time of the value. More... | |
int64_t | server_time () const |
Get the creation time of the value, in server time. More... | |
void | SetServerTime (int64_t time) |
Set the creation time of the value, in server time. More... | |
Type Checkers | |
bool | IsValid () const |
Determine if entry value contains a value or is unassigned. More... | |
bool | IsBoolean () const |
Determine if entry value contains a boolean. More... | |
bool | IsInteger () const |
Determine if entry value contains an integer. More... | |
bool | IsFloat () const |
Determine if entry value contains a float. More... | |
bool | IsDouble () const |
Determine if entry value contains a double. More... | |
bool | IsString () const |
Determine if entry value contains a string. More... | |
bool | IsRaw () const |
Determine if entry value contains a raw. More... | |
bool | IsBooleanArray () const |
Determine if entry value contains a boolean array. More... | |
bool | IsIntegerArray () const |
Determine if entry value contains an integer array. More... | |
bool | IsFloatArray () const |
Determine if entry value contains a float array. More... | |
bool | IsDoubleArray () const |
Determine if entry value contains a double array. More... | |
bool | IsStringArray () const |
Determine if entry value contains a string array. More... | |
Type-Safe Getters | |
bool | GetBoolean () const |
Get the entry's boolean value. More... | |
int64_t | GetInteger () const |
Get the entry's integer value. More... | |
float | GetFloat () const |
Get the entry's float value. More... | |
double | GetDouble () const |
Get the entry's double value. More... | |
std::string_view | GetString () const |
Get the entry's string value. More... | |
std::span< const uint8_t > | GetRaw () const |
Get the entry's raw value. More... | |
std::span< const int > | GetBooleanArray () const |
Get the entry's boolean array value. More... | |
std::span< const int64_t > | GetIntegerArray () const |
Get the entry's integer array value. More... | |
std::span< const float > | GetFloatArray () const |
Get the entry's float array value. More... | |
std::span< const double > | GetDoubleArray () const |
Get the entry's double array value. More... | |
std::span< const std::string > | GetStringArray () const |
Get the entry's string array value. More... | |
Static Public Member Functions | |
Factory functions | |
static Value | MakeBoolean (bool value, int64_t time=0) |
Creates a boolean entry value. More... | |
static Value | MakeInteger (int64_t value, int64_t time=0) |
Creates an integer entry value. More... | |
static Value | MakeFloat (float value, int64_t time=0) |
Creates a float entry value. More... | |
static Value | MakeDouble (double value, int64_t time=0) |
Creates a double entry value. More... | |
static Value | MakeString (std::string_view value, int64_t time=0) |
Creates a string entry value. More... | |
template<std::same_as< std::string > T> | |
static Value | MakeString (T &&value, int64_t time=0) |
Creates a string entry value. More... | |
static Value | MakeRaw (std::span< const uint8_t > value, int64_t time=0) |
Creates a raw entry value. More... | |
template<std::same_as< std::vector< uint8_t > > T> | |
static Value | MakeRaw (T &&value, int64_t time=0) |
Creates a raw entry value. More... | |
static Value | MakeBooleanArray (std::span< const bool > value, int64_t time=0) |
Creates a boolean array entry value. More... | |
static Value | MakeBooleanArray (std::initializer_list< bool > value, int64_t time=0) |
Creates a boolean array entry value. More... | |
static Value | MakeBooleanArray (std::span< const int > value, int64_t time=0) |
Creates a boolean array entry value. More... | |
static Value | MakeBooleanArray (std::initializer_list< int > value, int64_t time=0) |
Creates a boolean array entry value. More... | |
static Value | MakeBooleanArray (std::vector< int > &&value, int64_t time=0) |
Creates a boolean array entry value. More... | |
static Value | MakeIntegerArray (std::span< const int64_t > value, int64_t time=0) |
Creates an integer array entry value. More... | |
static Value | MakeIntegerArray (std::initializer_list< int64_t > value, int64_t time=0) |
Creates an integer array entry value. More... | |
static Value | MakeIntegerArray (std::vector< int64_t > &&value, int64_t time=0) |
Creates an integer array entry value. More... | |
static Value | MakeFloatArray (std::span< const float > value, int64_t time=0) |
Creates a float array entry value. More... | |
static Value | MakeFloatArray (std::initializer_list< float > value, int64_t time=0) |
Creates a float array entry value. More... | |
static Value | MakeFloatArray (std::vector< float > &&value, int64_t time=0) |
Creates a float array entry value. More... | |
static Value | MakeDoubleArray (std::span< const double > value, int64_t time=0) |
Creates a double array entry value. More... | |
static Value | MakeDoubleArray (std::initializer_list< double > value, int64_t time=0) |
Creates a double array entry value. More... | |
static Value | MakeDoubleArray (std::vector< double > &&value, int64_t time=0) |
Creates a double array entry value. More... | |
static Value | MakeStringArray (std::span< const std::string > value, int64_t time=0) |
Creates a string array entry value. More... | |
static Value | MakeStringArray (std::initializer_list< std::string > value, int64_t time=0) |
Creates a string array entry value. More... | |
static Value | MakeStringArray (std::vector< std::string > &&value, int64_t time=0) |
Creates a string array entry value. More... | |
Friends | |
bool | operator== (const Value &lhs, const Value &rhs) |
A network table entry value.
nt::Value::Value | ( | ) |
nt::Value::Value | ( | NT_Type | type, |
int64_t | time, | ||
const private_init & | |||
) |
nt::Value::Value | ( | NT_Type | type, |
int64_t | time, | ||
int64_t | serverTime, | ||
const private_init & | |||
) |
|
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 creation time of the value, in local time.
|
inline |
Get the data type.
|
inline |
Get the data value stored.