Value
Value
DataPoint

Represents a single value that can be stored/accessed in multiple ways.

See Also

DataPoint

storedAs
const ValueType storedAs() const

Gets the ValueType that the data value is stored as. This type should be inspected to determine how to read the data value.

Returns

A ValueType representing how the data is stored, and should be read.

as_float
virtual float as_float() const

Gets the data value as a 4-byte float

Returns

The data value as a 4-byte float

Exceptions
as_double
virtual double as_double() const

Gets the data value as an 8-byte double

Returns

The data value as an 8-byte double

Exceptions
as_uint8
virtual uint8 as_uint8() const

Gets the data value as a 1-byte unsigned integer

Returns

The data value as a 1-byte unsigned integer

Exceptions
as_uint16
virtual uint16 as_uint16() const

Gets the data value as a 2-byte unsigned integer

Returns

The data value as a 2-byte unsigned integer

Exceptions
as_uint32
virtual uint32 as_uint32() const

Gets the data value as a 4-byte unsigned integer

Returns

The data value as a 4-byte unsigned integer

Exceptions
as_int16
virtual short as_int16() const

Gets the data value as a 2-byte signed integer

Returns

The data value as a 2-byte signed integer

Exceptions
as_int32
virtual int as_int32() const

Gets the data value as a 4-byte signed integer

Returns

The data value as a 4-byte signed integer

Exceptions
as_int32

Gets the data value as a 1-byte boolean

Returns

The data value as a boolean

Exceptions
as_string
virtual std::string as_string() const

Gets the data value as a string

Returns

A string representing the data value. This will be created using the value's current valueType.  So a value stored as a float will return a string as so: "1.2345".

Exceptions