![]() |
OpenZWave Library
1.6.1914
|
The Node class describes a Z-Wave node object...typically a device on the Z-Wave network. More...
#include <Node.h>
Classes | |
struct | ChangeLogEntry |
struct | CommandClassData |
struct | NodeData |
Public Member Functions | |
Node (uint32 const _homeId, uint8 const _nodeId) | |
virtual | ~Node () |
void | AdvanceQueries () |
void | QueryStageComplete (QueryStage const _stage) |
void | QueryStageRetry (QueryStage const _stage, uint8 const _maxAttempts=0) |
void | SetQueryStage (QueryStage const _stage, bool const _advance=true) |
Node::QueryStage | GetCurrentQueryStage () |
string | GetQueryStageName (QueryStage const _stage) |
bool | IsNodeAlive () const |
void | UpdateProtocolInfo (uint8 const *_data) |
void | SetProtocolInfo (uint8 const *_protocolInfo, uint8 const _length) |
void | UpdateNodeInfo (uint8 const *_data, uint8 const _length) |
bool | ProtocolInfoReceived () const |
bool | NodeInfoReceived () const |
bool | IsNodeZWavePlus () const |
bool | AllQueriesCompleted () const |
void | SetNodePlusInfoReceived (const bool _received) |
void | SetNodeAlive (bool const _isAlive) |
bool | IsListeningDevice () const |
bool | IsFrequentListeningDevice () const |
bool | IsBeamingDevice () const |
bool | IsRoutingDevice () const |
bool | IsSecurityDevice () const |
uint32 | GetMaxBaudRate () const |
uint8 | GetVersion () const |
uint8 | GetSecurity () const |
uint8 | GetNodeId () const |
uint8 | GetBasic () const |
string | GetBasicString () |
uint8 | GetGeneric (uint8 const _instance) const |
string | GetGenericString (uint8 const _instance) |
uint8 | GetSpecific (uint8 const _instance) const |
string | GetSpecificString (uint8 const _instance) |
string | GetEndPointDeviceClassLabel (uint8 const _generic, uint8 const _specific) |
string const & | GetType () const |
uint32 | GetNeighbors (uint8 **o_neighbors) |
bool | IsController () const |
bool | IsAddingNode () const |
void | SetAddingNode () |
void | ClearAddingNode () |
bool | IsNodeReset () |
Internal::CC::CommandClass * | GetCommandClass (uint8 const _commandClassId) const |
void | ApplicationCommandHandler (uint8 const *_data, bool encrypted) |
void | SetSecuredClasses (uint8 const *_data, uint8 const _length, uint32 const _instance=1) |
void | SetSecured (bool secure) |
bool | IsSecured () |
void | SetInstanceLabel (uint8 const _instance, char *label) |
string | GetInstanceLabel (uint8 const _ccid, uint8 const _instance) |
uint8 | GetNumInstances (uint8 const _ccid) |
void | SetProductDetails (std::shared_ptr< Internal::ProductDescriptor > product) |
string | getConfigPath () |
uint32 | getFileConfigRevision () |
uint32 | getLoadedConfigRevision () |
uint32 | getLatestConfigRevision () |
void | setFileConfigRevision (uint32 rev) |
void | setLoadedConfigRevision (uint32 rev) |
void | setLatestConfigRevision (uint32 rev) |
void | checkLatestConfigRevision () |
void | SetLevel (uint8 const _level) |
void | SetNodeOn () |
void | SetNodeOff () |
ValueID | CreateValueID (ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, ValueID::ValueType const _type) |
Internal::VC::Value * | GetValue (ValueID const &_id) |
Internal::VC::Value * | GetValue (uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex) |
bool | RemoveValue (uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex) |
bool | CreateValueBitSet (ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, int32 const _default, uint8 const _pollIntensity) |
bool | CreateValueBool (ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, bool const _default, uint8 const _pollIntensity) |
bool | CreateValueButton (ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, uint8 const _pollIntensity) |
bool | CreateValueByte (ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, uint8 const _default, uint8 const _pollIntensity) |
bool | CreateValueDecimal (ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, string const &_default, uint8 const _pollIntensity) |
bool | CreateValueInt (ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, int32 const _default, uint8 const _pollIntensity) |
bool | CreateValueList (ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, uint8 const _size, vector< Internal::VC::ValueList::Item > const &_items, int32 const _default, uint8 const _pollIntensity) |
bool | CreateValueRaw (ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, uint8 const *_default, uint8 const _length, uint8 const _pollIntensity) |
bool | CreateValueSchedule (ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, uint8 const _pollIntensity) |
bool | CreateValueShort (ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, int16 const _default, uint8 const _pollIntensity) |
bool | CreateValueString (ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, string const &_default, uint8 const _pollIntensity) |
void | RemoveValueList (Internal::VC::ValueList *_value) |
void | ReadValueFromXML (uint8 const _commandClassId, TiXmlElement const *_valueElement) |
bool | CreateValueFromXML (uint8 const _commandClassId, TiXmlElement const *_valueElement) |
void | RefreshValuesOnWakeup () |
uint8 * | GenerateNonceKey () |
uint8 * | GetNonceKey (uint32 nonceid) |
string const | GetMetaData (MetaDataFields) |
MetaDataFields | GetMetaDataId (string) |
string const | GetMetaDataString (MetaDataFields) |
ChangeLogEntry const | GetChangeLog (uint32_t) |
Friends | |
class | Manager |
class | Driver |
class | Group |
class | Internal::VC::Value |
class | ValueButton |
class | Internal::CC::Association |
class | Internal::CC::AssociationCommandConfiguration |
class | Internal::CC::CommandClass |
class | Internal::CC::ControllerReplication |
class | Internal::CC::Hail |
class | Internal::CC::ManufacturerSpecific |
class | Internal::CC::MultiInstance |
class | Internal::CC::MultiChannelAssociation |
class | Internal::CC::NodeNaming |
class | Internal::CC::Version |
class | Internal::CC::ZWavePlusInfo |
class | Internal::ManufacturerSpecificDB |
The Node class describes a Z-Wave node object...typically a device on the Z-Wave network.
anonymous enum |
MetaData Fields. Available Fields that contain metadata about a device.
Constructor initializes the node object, associating it with a specific network (_homeId) and network node (_nodeId).
_homeId | The homeId of the network to which this node is connected. |
_nodeId | The nodeId of this node. |
|
virtual |
Destructor cleans up memory allocated to node and its child objects.
void Node::AdvanceQueries | ( | ) |
This function advances the query process (see Remarks below for more detail on the process). It iterates through the various query stages enumerated in Node::QueryStage.
The individual command classes also store some state information as to whether they have had a response to certain queries. This state information is initialized by the SetStaticRequests call in QueryStage_None. It is also saved, so we do not need to request state from every command class if some have previously responded.
|
inline |
void Node::ApplicationCommandHandler | ( | uint8 const * | _data, |
bool | encrypted | ||
) |
void Node::checkLatestConfigRevision | ( | ) |
Check the latest available revision number for this device.
|
inline |
bool Node::CreateValueBitSet | ( | ValueID::ValueGenre const | _genre, |
uint8 const | _commandClassId, | ||
uint8 const | _instance, | ||
uint16 const | _valueIndex, | ||
string const & | _label, | ||
string const & | _units, | ||
bool const | _readOnly, | ||
bool const | _writeOnly, | ||
int32 const | _default, | ||
uint8 const | _pollIntensity | ||
) |
bool Node::CreateValueBool | ( | ValueID::ValueGenre const | _genre, |
uint8 const | _commandClassId, | ||
uint8 const | _instance, | ||
uint16 const | _valueIndex, | ||
string const & | _label, | ||
string const & | _units, | ||
bool const | _readOnly, | ||
bool const | _writeOnly, | ||
bool const | _default, | ||
uint8 const | _pollIntensity | ||
) |
bool Node::CreateValueButton | ( | ValueID::ValueGenre const | _genre, |
uint8 const | _commandClassId, | ||
uint8 const | _instance, | ||
uint16 const | _valueIndex, | ||
string const & | _label, | ||
uint8 const | _pollIntensity | ||
) |
bool Node::CreateValueByte | ( | ValueID::ValueGenre const | _genre, |
uint8 const | _commandClassId, | ||
uint8 const | _instance, | ||
uint16 const | _valueIndex, | ||
string const & | _label, | ||
string const & | _units, | ||
bool const | _readOnly, | ||
bool const | _writeOnly, | ||
uint8 const | _default, | ||
uint8 const | _pollIntensity | ||
) |
bool Node::CreateValueDecimal | ( | ValueID::ValueGenre const | _genre, |
uint8 const | _commandClassId, | ||
uint8 const | _instance, | ||
uint16 const | _valueIndex, | ||
string const & | _label, | ||
string const & | _units, | ||
bool const | _readOnly, | ||
bool const | _writeOnly, | ||
string const & | _default, | ||
uint8 const | _pollIntensity | ||
) |
bool Node::CreateValueFromXML | ( | uint8 const | _commandClassId, |
TiXmlElement const * | _valueElement | ||
) |
ValueID Node::CreateValueID | ( | ValueID::ValueGenre const | _genre, |
uint8 const | _commandClassId, | ||
uint8 const | _instance, | ||
uint16 const | _valueIndex, | ||
ValueID::ValueType const | _type | ||
) |
bool Node::CreateValueInt | ( | ValueID::ValueGenre const | _genre, |
uint8 const | _commandClassId, | ||
uint8 const | _instance, | ||
uint16 const | _valueIndex, | ||
string const & | _label, | ||
string const & | _units, | ||
bool const | _readOnly, | ||
bool const | _writeOnly, | ||
int32 const | _default, | ||
uint8 const | _pollIntensity | ||
) |
bool Node::CreateValueList | ( | ValueID::ValueGenre const | _genre, |
uint8 const | _commandClassId, | ||
uint8 const | _instance, | ||
uint16 const | _valueIndex, | ||
string const & | _label, | ||
string const & | _units, | ||
bool const | _readOnly, | ||
bool const | _writeOnly, | ||
uint8 const | _size, | ||
vector< Internal::VC::ValueList::Item > const & | _items, | ||
int32 const | _default, | ||
uint8 const | _pollIntensity | ||
) |
bool Node::CreateValueRaw | ( | ValueID::ValueGenre const | _genre, |
uint8 const | _commandClassId, | ||
uint8 const | _instance, | ||
uint16 const | _valueIndex, | ||
string const & | _label, | ||
string const & | _units, | ||
bool const | _readOnly, | ||
bool const | _writeOnly, | ||
uint8 const * | _default, | ||
uint8 const | _length, | ||
uint8 const | _pollIntensity | ||
) |
bool Node::CreateValueSchedule | ( | ValueID::ValueGenre const | _genre, |
uint8 const | _commandClassId, | ||
uint8 const | _instance, | ||
uint16 const | _valueIndex, | ||
string const & | _label, | ||
string const & | _units, | ||
bool const | _readOnly, | ||
bool const | _writeOnly, | ||
uint8 const | _pollIntensity | ||
) |
bool Node::CreateValueShort | ( | ValueID::ValueGenre const | _genre, |
uint8 const | _commandClassId, | ||
uint8 const | _instance, | ||
uint16 const | _valueIndex, | ||
string const & | _label, | ||
string const & | _units, | ||
bool const | _readOnly, | ||
bool const | _writeOnly, | ||
int16 const | _default, | ||
uint8 const | _pollIntensity | ||
) |
bool Node::CreateValueString | ( | ValueID::ValueGenre const | _genre, |
uint8 const | _commandClassId, | ||
uint8 const | _instance, | ||
uint16 const | _valueIndex, | ||
string const & | _label, | ||
string const & | _units, | ||
bool const | _readOnly, | ||
bool const | _writeOnly, | ||
string const & | _default, | ||
uint8 const | _pollIntensity | ||
) |
uint8 * Node::GenerateNonceKey | ( | ) |
|
inline |
string Node::GetBasicString | ( | ) |
Node::ChangeLogEntry const Node::GetChangeLog | ( | uint32_t | revision | ) |
Internal::CC::CommandClass * Node::GetCommandClass | ( | uint8 const | _commandClassId | ) | const |
This function retrieves a pointer to the requested command class object (if supported by this node).
_commandClassId | Class ID (a single byte value) identifying the command class requested. |
string Node::getConfigPath | ( | ) |
Get a path to the config file for this device
|
inline |
Returns the current query stage enum.
|
inline |
Get the latest local revision of the config file for this node
string Node::GetGenericString | ( | uint8 const | _instance | ) |
This function gets a Instance Label for a ValueID. It either users the Global Instance Label above, or a Label for a Specific CC
|
inline |
Get the Latest Config File revision available at openzwave.com
|
inline |
Get the Revision number of the config that is laoded for this Node
|
inline |
string const Node::GetMetaData | ( | MetaDataFields | field | ) |
Node::MetaDataFields Node::GetMetaDataId | ( | string | name | ) |
string const Node::GetMetaDataString | ( | Node::MetaDataFields | id | ) |
|
inline |
string Node::GetQueryStageName | ( | QueryStage const | _stage | ) |
Returns the specified query stage string.
_stage | The query stage. |
|
inline |
string Node::GetSpecificString | ( | uint8 const | _instance | ) |
|
inline |
Internal::VC::Value * Node::GetValue | ( | ValueID const & | _id | ) |
Internal::VC::Value * Node::GetValue | ( | uint8 const | _commandClassId, |
uint8 const | _instance, | ||
uint16 const | _valueIndex | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns whether the library thinks a node is functioning properly
bool Node::IsNodeReset | ( | ) |
|
inline |
|
inline |
bool Node::IsSecured | ( | ) |
|
inline |
|
inline |
|
inline |
void Node::QueryStageComplete | ( | QueryStage const | _stage | ) |
Signal that a specific query stage has been completed for this node. This will only work if the query process for this node is indeed at the specified stage. Otherwise, the function returns with no action.
_stage | The current stage of the query process. |
void Node::QueryStageRetry | ( | QueryStage const | _stage, |
uint8 const | _maxAttempts = 0 |
||
) |
Retry the specified query stage (up to _maxAttempts retries). This will only work if the query process for this node is indeed at the specified stage. Otherwise, the function returns with no action.
_stage | The query stage to retry. |
_maxAttempts |
void Node::ReadValueFromXML | ( | uint8 const | _commandClassId, |
TiXmlElement const * | _valueElement | ||
) |
void Node::RefreshValuesOnWakeup | ( | ) |
bool Node::RemoveValue | ( | uint8 const | _commandClassId, |
uint8 const | _instance, | ||
uint16 const | _valueIndex | ||
) |
void Node::RemoveValueList | ( | Internal::VC::ValueList * | _value | ) |
|
inline |
void Node::setFileConfigRevision | ( | uint32 | rev | ) |
Set the revision number of the Config File for this device
rev | the revision number |
void Node::SetInstanceLabel | ( | uint8 const | _instance, |
char * | label | ||
) |
This function sets a Global Instance Label for all CommandClasses that don't define their own labels
void Node::setLatestConfigRevision | ( | uint32 | rev | ) |
Set the revision number of the latest available config file for this device
rev | the revision number |
void Node::SetLevel | ( | uint8 const | _level | ) |
void Node::setLoadedConfigRevision | ( | uint32 | rev | ) |
Set the revision number of the config that is loaded for this device
rev | the revision number |
void Node::SetNodeAlive | ( | bool const | _isAlive | ) |
Handle dead node detection tracking. Use this routine to set state of nodes. Tracks state as well as send notifications.
void Node::SetNodeOff | ( | ) |
void Node::SetNodeOn | ( | ) |
|
inline |
void Node::SetProductDetails | ( | std::shared_ptr< Internal::ProductDescriptor > | product | ) |
this function is called when the Node is added via a AddNode request. the ProtocolInfo field contains the devices classes and the CommandClasses that the node supports, so we can build a pretty good Node out of that info.
_protocolInfo | Byte 0 - Basic Device Class Byte 1 - Generic Device Class, Byte 2 - Specific Device Classes Remaining Bytes - Supported Command Classes |
_length | length of the _protocolInfo field. |
void Node::SetQueryStage | ( | QueryStage const | _stage, |
bool const | _advance = true |
||
) |
This function sets the query stage for the node (but only to an earlier stage). If a later stage is specified than the current one, it is ignored.
_stage | The desired query stage. |
void Node::SetSecured | ( | bool | secure | ) |
void Node::SetSecuredClasses | ( | uint8 const * | _data, |
uint8 const | _length, | ||
uint32 const | _instance = 1 |
||
) |
This function sets up Secured Command Classes. It iterates over the existing command classes marking them as Secured if they exist, and if they don't, it creates new Command Classes and sets them up as Secured
_data | a list of Command Classes that are Secured by the Device |
_length | the length of the _data string |
_instance | the instance of the Class thats Secured. |
void Node::UpdateProtocolInfo | ( | uint8 const * | _data | ) |
This function handles a response to the FUNC_ID_ZW_GET_NODE_PROTOCOL_INFO command for this node. If protocol information has already been retrieved for the node, the function simply returns. Otherwise, it populates several member variables about the device at this node:
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |