WPILibC++  unspecified
nt::Value Class Referencefinal

A network table entry value. More...

#include <NetworkTableValue.h>

Public Member Functions

 Value (NT_Type type, uint64_t time, const private_init &)
 
NT_Type type () const
 Get the data type. More...
 
const NT_Valuevalue () const
 Get the data value stored. More...
 
uint64_t last_change () const
 Get the creation time of the value. More...
 
uint64_t time () const
 Get the creation time of the value. More...
 
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 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 IsRpc () const
 Determine if entry value contains a rpc definition. More...
 
bool IsBooleanArray () const
 Determine if entry value contains a boolean 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...
 
bool GetBoolean () const
 Get the entry's boolean value. More...
 
double GetDouble () const
 Get the entry's double value. More...
 
StringRef GetString () const
 Get the entry's string value. More...
 
StringRef GetRaw () const
 Get the entry's raw value. More...
 
StringRef GetRpc () const
 Get the entry's rpc definition value. More...
 
ArrayRef< int > GetBooleanArray () const
 Get the entry's boolean array value. More...
 
ArrayRef< double > GetDoubleArray () const
 Get the entry's double array value. More...
 
ArrayRef< std::string > GetStringArray () const
 Get the entry's string array value. More...
 
 Value (const Value &)=delete
 
Valueoperator= (const Value &)=delete
 

Static Public Member Functions

static std::shared_ptr< ValueMakeBoolean (bool value, uint64_t time=0)
 Creates a boolean entry value. More...
 
static std::shared_ptr< ValueMakeDouble (double value, uint64_t time=0)
 Creates a double entry value. More...
 
static std::shared_ptr< ValueMakeString (const Twine &value, uint64_t time=0)
 Creates a string entry value. More...
 
template<typename T , typename std::enable_if< std::is_same< T, std::string >::value >::type >
static std::shared_ptr< ValueMakeString (T &&value, uint64_t time=0)
 Creates a string entry value. More...
 
static std::shared_ptr< ValueMakeRaw (StringRef value, uint64_t time=0)
 Creates a raw entry value. More...
 
template<typename T , typename std::enable_if< std::is_same< T, std::string >::value >::type >
static std::shared_ptr< ValueMakeRaw (T &&value, uint64_t time=0)
 Creates a raw entry value. More...
 
static std::shared_ptr< ValueMakeRpc (StringRef value, uint64_t time=0)
 Creates a rpc entry value. More...
 
template<typename T >
static std::shared_ptr< ValueMakeRpc (T &&value, uint64_t time=0)
 Creates a rpc entry value. More...
 
static std::shared_ptr< ValueMakeBooleanArray (ArrayRef< int > value, uint64_t time=0)
 Creates a boolean array entry value. More...
 
static std::shared_ptr< ValueMakeDoubleArray (ArrayRef< double > value, uint64_t time=0)
 Creates a double array entry value. More...
 
static std::shared_ptr< ValueMakeStringArray (ArrayRef< std::string > value, uint64_t time=0)
 Creates a string array entry value. More...
 
static std::shared_ptr< ValueMakeStringArray (std::vector< std::string > &&value, uint64_t time=0)
 

Friends

bool operator== (const Value &lhs, const Value &rhs)
 

Detailed Description

A network table entry value.

Member Function Documentation

uint64_t nt::Value::last_change ( ) const
inline

Get the creation time of the value.

Returns
The time, in the units returned by nt::Now().
uint64_t nt::Value::time ( ) const
inline

Get the creation time of the value.

Returns
The time, in the units returned by nt::Now().
NT_Type nt::Value::type ( ) const
inline

Get the data type.

Returns
The type.
const NT_Value& nt::Value::value ( ) const
inline

Get the data value stored.

Returns
The type.

The documentation for this class was generated from the following files: