Value coming from the Z-Wave network. It holds some data (usually sensor data) and metadata to identify the value semantics.
More...
#include <ZWaveNode.h>
Value coming from the Z-Wave network. It holds some data (usually sensor data) and metadata to identify the value semantics.
bool ZWaveNode::Value::asBool |
( |
| ) |
const |
Interpret the value as a boolean. If the value cannot be represented as boolean, an exception is thrown.
- Exceptions
-
double ZWaveNode::Value::asCelsius |
( |
| ) |
const |
Interpret the underlying value as temperature. The supported units are C and F (according to Z-Wave). If the value is represented in F (Farenheit) a conversion is applied.
double ZWaveNode::Value::asDouble |
( |
| ) |
const |
Interpret the value as a double (real) number. If the value cannot be parsed, it throws an exception.
uint32_t ZWaveNode::Value::asHex32 |
( |
| ) |
const |
Interpret the value as an unsigned 32-bit number stored in the hexadecimal format. If the value cannot be parsed, it throws an exception.
int ZWaveNode::Value::asInt |
( |
bool |
floor = false | ) |
const |
Interpret the value as signed int. If the underlying value is real (double) and the argument floor is false then an exception is thrown.
- Parameters
-
floor | if the underlying cannot be interpreted as int, and floor is true, it would be interpreted as double and floored |
double ZWaveNode::Value::asLuminance |
( |
| ) |
const |
Interpret the underlying value as a value of luminance. The luminance is returned in lux. If the underlying value is represented in percent, a conversion is applied.
double ZWaveNode::Value::asPM25 |
( |
| ) |
const |
Interpret the underlying value as a value of PM 2.5. The expected and only supported unit is ug/m3.
Timespan ZWaveNode::Value::asTime |
( |
| ) |
const |
Interpret the underlying value as a value of time. The expected and only supported unit is seconds.
- Returns
- command class that's value is represented
- Returns
- the associated node's identity
string ZWaveNode::Value::unit |
( |
| ) |
const |
- Returns
- unit that the value is represented in
string ZWaveNode::Value::value |
( |
| ) |
const |
- Returns
- value in string format (raw)
The documentation for this class was generated from the following files:
- /var/lib/jenkins/workspace/beeeon-gateway-master/src/zwave/ZWaveNode.h
- /var/lib/jenkins/workspace/beeeon-gateway-master/src/zwave/ZWaveNode.cpp