OpenZWave Library: OpenZWave::ValueID Class Reference

| OpenZWave Library 1.6.0

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
OpenZWave::ValueID Class Reference
ValueID Support

Provides a unique ID for a value reported by a Z-Wave device. More...

`#include <ValueID.h>`

## Public Types
enum | ValueGenre { ValueGenre_Basic = 0 , ValueGenre_User , ValueGenre_Config , ValueGenre_System , ValueGenre_Count }
enum | ValueType { ValueType_Bool = 0 , ValueType_Byte , ValueType_Decimal , ValueType_Int , ValueType_List , ValueType_Schedule , ValueType_Short , ValueType_String , ValueType_Button , ValueType_Raw , ValueType_BitSet , ValueType_Max = ValueType_BitSet }

## Public Member Functions
uint32 | GetHomeId () const
uint8 | GetNodeId () const
ValueGenre | GetGenre () const
uint8 | GetCommandClassId () const
uint8 | GetInstance () const
uint16 | GetIndex () const
ValueType | GetType () const
uint64 | GetId () const
bool | operator== (ValueID const &_other) const
bool | operator!= (ValueID const &_other) const
bool | operator< (ValueID const &_other) const
bool | operator> (ValueID const &_other) const
| ValueID (uint32 const _homeId, uint8 const _nodeId, ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, ValueType const _type)
| ValueID (uint32 _homeId, uint64 id)

## Friends
class | Manager
class | Driver
class | Node
class | Group
class | CommandClass
class | Value
class | ValueStore
class | Notification
class | ManufacturerSpecific

## Detailed Description

Provides a unique ID for a value reported by a Z-Wave device.

The ValueID is used to uniquely identify a value reported by a Z-Wave device.

The ID is built by packing various identifying characteristics into a single 32-bit number - the Z-Wave driver index, device node ID, the command class and command class instance that handles the value, plus an index for the value to distinguish it among all the other values managed by that command class instance. The type (bool, byte, string etc) of the value is also stored.

The packing of the ID is such that a list of Values sorted by ValueID will be in a sensible order for display to the user.

## Member Enumeration Documentation

## ◆ ValueGenre

enum OpenZWave::ValueID::ValueGenre

Value Genres The classification of a value to enable low level system or configuration parameters to be filtered by the application.

See also
  GetGenre

Enumerator
ValueGenre_Basic | The 'level' as controlled by basic commands. Usually duplicated by another command class.
ValueGenre_User | Basic values an ordinary user would be interested in.
ValueGenre_Config | Device-specific configuration parameters. These cannot be automatically discovered via Z-Wave, and are usually described in the user manual instead.
ValueGenre_System | Values of significance only to users who understand the Z-Wave protocol
ValueGenre_Count | A count of the number of genres defined. Not to be used as a genre itself.

## ◆ ValueType

enum OpenZWave::ValueID::ValueType

Value Types The type of data represented by the value object.

See also
  GetType

Enumerator
ValueType_Bool | Boolean, true or false
ValueType_Byte | 8-bit unsigned value
ValueType_Decimal | Represents a non-integer value as a string, to avoid floating point accuracy issues.
ValueType_Int | 32-bit signed value
ValueType_List | List from which one item can be selected
ValueType_Schedule | Complex type used with the Climate Control Schedule command class
ValueType_Short | 16-bit signed value
ValueType_String | Text string
ValueType_Button | A write-only value that is the equivalent of pressing a button to send a command to a device
ValueType_Raw | A collection of bytes
ValueType_BitSet | A collection of Bits
ValueType_Max | The highest-number type defined. Not to be used as a type itself.

## Constructor & Destructor Documentation

## ◆ ValueID() [1/2]

OpenZWave::ValueID::ValueID | ( | uint32 const | _homeId,
|  | uint8 const | _nodeId,
|  | ValueGenre const | _genre,
|  | uint8 const | _commandClassId,
|  | uint8 const | _instance,
|  | uint16 const | _valueIndex,
|  | ValueType const | _type
| ) |  |
| inline

Construct a value ID from its component parts. This method is public only to allow ValueIDs to be saved and recreated by the application. Only ValueIDs that have been reported by OpenZWave notifications should ever be used.

Parameters

  _homeId | Home ID of the PC Z-Wave Controller that manages the device.
  _nodeId | Node ID of the device reporting the value.
  _genre | classification of the value to enable low level system or configuration parameters to be filtered out.
  _commandClassId | ID of command class that creates and manages this value.
  _instance | Instance index of the command class.
  _valueIndex | Index of the value within all the values created by the command class instance.
  _type | Type of value (bool, byte, string etc).

Returns
  The ValueID.

See also
  ValueID

## ◆ ValueID() [2/2]

OpenZWave::ValueID::ValueID | ( | uint32 | _homeId,
|  | uint64 | id
| ) |  |
| inline

## Member Function Documentation

## ◆ GetCommandClassId()

uint8 OpenZWave::ValueID::GetCommandClassId | ( |  | ) | const
| inline

Get the Z-Wave command class that created and manages this value. Knowledge of command classes is not required to use OpenZWave, but this information is exposed in case it is of interest.

Returns
  the value's command class.

## ◆ GetGenre()

ValueGenre OpenZWave::ValueID::GetGenre | ( |  | ) | const
| inline

Get the genre of the value. The genre classifies a value to enable low-level system or configuration parameters to be filtered out by the application

Returns
  the value's genre.

See also
  ValueGenre

## ◆ GetHomeId()

uint32 OpenZWave::ValueID::GetHomeId | ( |  | ) | const
| inline

Get the Home ID of the driver that controls the node containing the value.

Returns
  the Home ID.

## ◆ GetId()

uint64 OpenZWave::ValueID::GetId | ( |  | ) | const
| inline

Get a 64Bit Integer that represents this ValueID. This Integer is not guaranteed to be the same across restarts of OpenZWave.

Returns
  a uint64 integer

## ◆ GetIndex()

uint16 OpenZWave::ValueID::GetIndex | ( |  | ) | const
| inline

Get the value index. The index is used to identify one of multiple values created and managed by a command class. In the case of configurable parameters (handled by the configuration command class), the index is the same as the parameter ID. Knowledge of command classes is not required to use OpenZWave, but this information is exposed in case it is of interest.

Returns
  the value index within the command class.

## ◆ GetInstance()

uint8 OpenZWave::ValueID::GetInstance | ( |  | ) | const
| inline

Get the command class instance of this value. It is possible for there to be multiple instances of a command class, although currently it appears that only the SensorMultilevel command class ever does this. Knowledge of instances and command classes is not required to use OpenZWave, but this information is exposed in case it is of interest.

Returns
  the instance of the value's command class.

## ◆ GetNodeId()

uint8 OpenZWave::ValueID::GetNodeId | ( |  | ) | const
| inline

Get the Home ID of the driver that controls the node containing the value.

Returns
  the node id.

## ◆ GetType()

ValueType OpenZWave::ValueID::GetType | ( |  | ) | const
| inline

Get the type of the value. The type describes the data held by the value and enables the user to select the correct value accessor method in the Manager class.

Returns
  the value's type.

See also
  ValueType, Manager::GetValueAsBool, Manager::GetValueAsByte, Manager::GetValueAsFloat, Manager::GetValueAsInt, Manager::GetValueAsShort, Manager::GetValueAsString, Manager::GetValueListSelection.

## ◆ operator!=()

bool OpenZWave::ValueID::operator!= | ( | ValueID const & | _other | ) | const
| inline

## ◆ operator<()

bool OpenZWave::ValueID::operator< | ( | ValueID const & | _other | ) | const
| inline

## ◆ operator==()

bool OpenZWave::ValueID::operator== | ( | ValueID const & | _other | ) | const
| inline

## ◆ operator>()

bool OpenZWave::ValueID::operator> | ( | ValueID const & | _other | ) | const
| inline

## Friends And Related Symbol Documentation

## ◆ CommandClass

friend class CommandClass
| friend

## ◆ Driver

friend class Driver
| friend

## ◆ Group

friend class Group
| friend

## ◆ Manager

friend class Manager
| friend

## ◆ ManufacturerSpecific

friend class ManufacturerSpecific
| friend

## ◆ Node

friend class Node
| friend

## ◆ Notification

friend class Notification
| friend

## ◆ Value

friend class Value
| friend

## ◆ ValueStore

friend class ValueStore
| friend

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

- ValueID.h