Node.h
Go to the documentation of this file.
//-----------------------------------------------------------------------------
//
// Node.h
//
// A node in the Z-Wave network
//
// Copyright (c) 2010 Mal Lansell <openzwave@lansell.org>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef _Node_H
#define _Node_H
#include <string>
#include <vector>
#include <list>
#include <map>
#include "Defs.h"
#include "value_classes/ValueID.h"
#include "value_classes/ValueList.h"
#include "Msg.h"
#include "platform/TimeStamp.h"
#include "Group.h"
class TiXmlElement;
namespace OpenZWave
{
class CommandClass;
class Driver;
class Group;
class ValueStore;
class Value;
class ValueBool;
class ValueButton;
class ValueByte;
class ValueDecimal;
class ValueInt;
class ValueSchedule;
class ValueShort;
class ValueString;
class Mutex;
class Node
{
friend class Manager;
friend class Driver;
friend class Group;
friend class Value;
friend class ValueButton;
friend class Alarm;
friend class Association;
friend class AssociationCommandConfiguration;
friend class Basic;
friend class Battery;
friend class ClimateControlSchedule;
friend class Clock;
friend class CommandClass;
friend class ControllerReplication;
friend class EnergyProduction;
friend class Hail;
friend class Indicator;
friend class Language;
friend class Lock;
friend class ManufacturerSpecific;
friend class Meter;
friend class MeterPulse;
friend class MultiInstance;
friend class MultiChannelAssociation;
friend class NodeNaming;
friend class Protection;
friend class Security;
friend class SensorAlarm;
friend class SensorBinary;
friend class SensorMultilevel;
friend class SwitchAll;
friend class SwitchBinary;
friend class SwitchMultilevel;
friend class SwitchToggleBinary;
friend class SwitchToggleMultilevel;
friend class ThermostatFanMode;
friend class ThermostatFanState;
friend class ThermostatMode;
friend class ThermostatOperatingState;
friend class ThermostatSetpoint;
friend class Version;
friend class WakeUp;
friend class ZWavePlusInfo;
//-----------------------------------------------------------------------------
// Construction
//-----------------------------------------------------------------------------
public:
Node( uint32 const _homeId, uint8 const _nodeId );
virtual ~Node();
private:
Driver* GetDriver()const;
//-----------------------------------------------------------------------------
// Initialization
//-----------------------------------------------------------------------------
public:
enum QueryStage
{
QueryStage_None,
QueryStage_ProtocolInfo,
QueryStage_Probe,
QueryStage_WakeUp,
QueryStage_ManufacturerSpecific1,
QueryStage_NodeInfo,
QueryStage_NodePlusInfo,
QueryStage_SecurityReport,
QueryStage_ManufacturerSpecific2,
QueryStage_Versions,
QueryStage_Instances,
QueryStage_Static,
QueryStage_CacheLoad,
QueryStage_Probe1 = QueryStage_CacheLoad,
QueryStage_Associations,
QueryStage_Neighbors,
QueryStage_Session,
QueryStage_Dynamic,
QueryStage_Configuration,
QueryStage_Complete
};
void AdvanceQueries();
void QueryStageComplete( QueryStage const _stage );
void QueryStageRetry( QueryStage const _stage, uint8 const _maxAttempts = 0 ); // maxAttempts of zero means no limit
void SetQueryStage( QueryStage const _stage, bool const _advance = true );
Node::QueryStage GetCurrentQueryStage() { return m_queryStage; }
string GetQueryStageName( QueryStage const _stage );
bool IsNodeAlive()const{ return m_nodeAlive; }
void UpdateProtocolInfo( uint8 const* _data );
void SetProtocolInfo(uint8 const* _protocolInfo, uint8 const _length);
void UpdateNodeInfo( uint8 const* _data, uint8 const _length );
bool ProtocolInfoReceived()const{ return m_protocolInfoReceived; }
bool NodeInfoReceived()const{ return m_nodeInfoReceived; }
bool IsNodeZWavePlus()const{ return m_nodePlusInfoReceived; }
bool AllQueriesCompleted()const{ return( QueryStage_Complete == m_queryStage ); }
void SetNodePlusInfoReceived(const bool _received){ m_nodePlusInfoReceived = _received; }
void SetNodeAlive( bool const _isAlive );
private:
void SetStaticRequests();
QueryStage m_queryStage;
bool m_queryPending;
bool m_queryConfiguration;
uint8 m_queryRetries;
bool m_protocolInfoReceived;
bool m_basicprotocolInfoReceived;
bool m_nodeInfoReceived;
bool m_nodePlusInfoReceived;
bool m_manufacturerSpecificClassReceived;
bool m_nodeInfoSupported;
bool m_refreshonNodeInfoFrame;
bool m_nodeAlive;
//-----------------------------------------------------------------------------
// Capabilities
//-----------------------------------------------------------------------------
public:
// Security flags
enum
{
SecurityFlag_Security = 0x01,
SecurityFlag_Controller = 0x02,
SecurityFlag_SpecificDevice = 0x04,
SecurityFlag_RoutingSlave = 0x08,
SecurityFlag_BeamCapability = 0x10,
SecurityFlag_Sensor250ms = 0x20,
SecurityFlag_Sensor1000ms = 0x40,
SecurityFlag_OptionalFunctionality = 0x80
};
// Node Ids
enum
{
NodeBroadcast = 0xff
};
bool IsListeningDevice()const{ return m_listening; }
bool IsFrequentListeningDevice()const{ return m_frequentListening; }
bool IsBeamingDevice()const{ return m_beaming; }
bool IsRoutingDevice()const{ return m_routing; }
bool IsSecurityDevice()const{ return m_security; }
uint32 GetMaxBaudRate()const{ return m_maxBaudRate; }
uint8 GetVersion()const{ return m_version; }
uint8 GetSecurity()const{ return m_security; }
uint8 GetNodeId()const{ return m_nodeId; }
uint8 GetBasic()const{ return m_basic; }
uint8 GetGeneric()const{ return m_generic; }
uint8 GetSpecific()const{ return m_specific; }
string const& GetType()const{ return m_type; }
uint32 GetNeighbors( uint8** o_associations );
bool IsController()const{ return ( m_basic == 0x01 || m_basic == 0x02 ) && ( m_generic == 0x01 || m_generic == 0x02 ); }
bool IsAddingNode() const { return m_addingNode; } /* These three *AddingNode functions are used to tell if we this node is just being discovered. Currently used by the Security CC to initiate the Network Key Exchange */
void SetAddingNode() { m_addingNode = true; }
void ClearAddingNode() { m_addingNode = false; }
bool IsNodeReset();
private:
bool m_listening;
bool m_frequentListening;
bool m_beaming;
bool m_routing;
uint32 m_maxBaudRate;
uint8 m_version;
bool m_security;
uint32 m_homeId;
uint8 m_nodeId;
uint8 m_basic; //*< Basic device class (0x01-Controller, 0x02-Static Controller, 0x03-Slave, 0x04-Routing Slave
uint8 m_generic;
uint8 m_specific;
string m_type; // Label representing the specific/generic/basic value
uint8 m_neighbors[29]; // Bitmask containing the neighboring nodes
uint8 m_numRouteNodes; // number of node routes
uint8 m_routeNodes[5]; // nodes to route to
map<uint8,uint8> m_buttonMap; // Map button IDs into virtual node numbers
bool m_addingNode;
//-----------------------------------------------------------------------------
// Device Naming
//-----------------------------------------------------------------------------
private:
// Manufacturer, Product and Name are stored here so they can be set by the
// user even if the device does not support the relevant command classes.
string GetManufacturerName()const{ return m_manufacturerName; }
string GetProductName()const{ return m_productName; }
string GetNodeName()const{ return m_nodeName; }
string GetLocation()const{ return m_location; }
// string GetManufacturerId()const{ return std::to_string(m_manufacturerId); }
uint16 GetManufacturerId()const{ return m_manufacturerId; }
// string GetProductType()const{ return string(m_productType); }
uint16 GetProductType()const{ return m_productType; }
// string GetProductId()const{ return string(m_productId); }
uint16 GetProductId()const{ return m_productId; }
void SetManufacturerName( string const& _manufacturerName ){ m_manufacturerName = _manufacturerName; }
void SetProductName( string const& _productName ){ m_productName = _productName; }
void SetNodeName( string const& _nodeName );
void SetLocation( string const& _location );
void SetManufacturerId( uint16 const& _manufacturerId ){ m_manufacturerId = _manufacturerId; }
void SetProductType( uint16 const& _productType ){ m_productType = _productType; }
void SetProductId( uint16 const& _productId ){ m_productId = _productId; }
string m_manufacturerName;
string m_productName;
string m_nodeName;
string m_location;
uint16 m_manufacturerId;
uint16 m_productType;
uint16 m_productId;
// zwave+ info
uint16 GetDeviceType() const { return m_deviceType; }
string GetDeviceTypeString();
uint8 GetRoleType() const { return m_role; }
string GetRoleTypeString();
uint8 GetNodeType() const { return m_nodeType; }
string GetNodeTypeString();
uint16 m_deviceType;
uint8 m_role;
uint8 m_nodeType;
//-----------------------------------------------------------------------------
// Command Classes
//-----------------------------------------------------------------------------
public:
CommandClass* GetCommandClass( uint8 const _commandClassId )const;
void ApplicationCommandHandler( uint8 const* _data, bool encrypted );
void SetSecuredClasses( uint8 const* _data, uint8 const _length );
void SetSecured(bool secure);
private:
CommandClass* AddCommandClass( uint8 const _commandClassId );
void RemoveCommandClass( uint8 const _commandClassId );
void ReadXML( TiXmlElement const* _nodeElement );
void ReadDeviceProtocolXML( TiXmlElement const* _ccsElement );
void ReadCommandClassesXML( TiXmlElement const* _ccsElement );
void WriteXML( TiXmlElement* _nodeElement );
map<uint8,CommandClass*> m_commandClassMap;
bool m_secured;
//-----------------------------------------------------------------------------
// Basic commands (helpers that go through the basic command class)
//-----------------------------------------------------------------------------
public:
void SetLevel( uint8 const _level );
//-----------------------------------------------------------------------------
// On/Off commands (helpers that go through the basic or switchall command class)
//-----------------------------------------------------------------------------
public:
void SetNodeOn();
void SetNodeOff();
//-----------------------------------------------------------------------------
// Values (handled by the command classes)
//-----------------------------------------------------------------------------
public:
ValueID CreateValueID( ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, ValueID::ValueType const _type );
Value* GetValue( ValueID const& _id );
Value* GetValue( uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex );
bool RemoveValue( uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex );
// Helpers for creating values
bool CreateValueBool( ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 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, uint8 const _valueIndex, string const& _label, uint8 const _pollIntensity );
bool CreateValueByte( ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 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, uint8 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, uint8 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, uint8 const _valueIndex, string const& _label, string const& _units, bool const _readOnly, bool const _writeOnly, uint8 const _size, vector<ValueList::Item> const& _items, int32 const _default, uint8 const _pollIntensity );
bool CreateValueRaw( ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 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, uint8 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, uint8 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, uint8 const _valueIndex, string const& _label, string const& _units, bool const _readOnly, bool const _writeOnly, string const& _default, uint8 const _pollIntensity );
// helpers for removing values
void RemoveValueList( ValueList* _value );
void ReadValueFromXML( uint8 const _commandClassId, TiXmlElement const* _valueElement );
bool CreateValueFromXML( uint8 const _commandClassId, TiXmlElement const* _valueElement );
private:
ValueStore* GetValueStore()const{ return m_values; }
ValueStore* m_values; // Values reported via command classes
//-----------------------------------------------------------------------------
// Configuration Parameters (handled by the Configuration command class)
//-----------------------------------------------------------------------------
private:
bool SetConfigParam( uint8 const _param, int32 _value, uint8 const _size );
void RequestConfigParam( uint8 const _param );
bool RequestAllConfigParams( uint32 const _requestFlags );
//-----------------------------------------------------------------------------
// Dynamic Values (used by query and other command classes for updating)
//-----------------------------------------------------------------------------
private:
bool RequestDynamicValues();
//-----------------------------------------------------------------------------
// Groups
//-----------------------------------------------------------------------------
private:
// The public interface is provided via the wrappers in the Manager class
uint8 GetNumGroups();
uint32 GetAssociations( uint8 const _groupIdx, uint8** o_associations );
uint32 GetAssociations( uint8 const _groupIdx, InstanceAssociation** o_associations );
uint8 GetMaxAssociations( uint8 const _groupIdx );
string GetGroupLabel( uint8 const _groupIdx );
void AddAssociation( uint8 const _groupIdx, uint8 const _targetNodeId, uint8 const _instance = 0x00 );
void RemoveAssociation( uint8 const _groupIdx, uint8 const _targetNodeId, uint8 const _instance = 0x00 );
void AutoAssociate();
// The following methods are not exposed
Group* GetGroup( uint8 const _groupIdx ); // Get a pointer to a Group object. This must only be called while holding the node Lock.
void AddGroup( Group* _group ); // The groups are fixed properties of a device, so there is no need for a matching RemoveGroup.
void WriteGroups( TiXmlElement* _associationsElement ); // Write the group data out to XNL
map<uint8,Group*> m_groups; // Maps group indices to Group objects.
//-----------------------------------------------------------------------------
// Device Classes (static data read from the device_classes.xml file)
//-----------------------------------------------------------------------------
private:
// Container for device class info
class DeviceClass
{
public:
DeviceClass( TiXmlElement const* _el );
~DeviceClass(){ delete [] m_mandatoryCommandClasses; }
uint8 const* GetMandatoryCommandClasses(){ return m_mandatoryCommandClasses; }
uint8 GetBasicMapping(){ return m_basicMapping; }
string const& GetLabel(){ return m_label; }
private:
uint8* m_mandatoryCommandClasses; // Zero terminated array of mandatory command classes for this device type.
uint8 m_basicMapping; // Command class that COMMAND_CLASS_BASIC maps on to, or zero if there is no mapping.
string m_label; // Descriptive label for the device.
};
// Container for generic device class info
class GenericDeviceClass : public DeviceClass
{
public:
GenericDeviceClass( TiXmlElement const* _el );
~GenericDeviceClass();
DeviceClass* GetSpecificDeviceClass( uint8 const& _specific );
private:
map<uint8,DeviceClass*> m_specificDeviceClasses;
};
bool SetDeviceClasses( uint8 const _basic, uint8 const _generic, uint8 const _specific ); // Set the device class data for the node
bool SetPlusDeviceClasses( uint8 const _role, uint8 const _nodeType, uint16 const _deviceType ); // Set the device class data for the node based on the Zwave+ info report
bool AddMandatoryCommandClasses( uint8 const* _commandClasses ); // Add mandatory command classes as specified in the device_classes.xml to the node.
void ReadDeviceClasses(); // Read the static device class data from the device_classes.xml file
string GetEndPointDeviceClassLabel( uint8 const _generic, uint8 const _specific );
static bool s_deviceClassesLoaded; // True if the xml file has already been loaded
static map<uint8,string> s_basicDeviceClasses; // Map of basic device classes.
static map<uint8,GenericDeviceClass*> s_genericDeviceClasses; // Map of generic device classes.
static map<uint8,DeviceClass*> s_roleDeviceClasses; // Map of Zwave+ role device classes.
static map<uint16,DeviceClass*> s_deviceTypeClasses; // Map of Zwave+ device type device classes.
static map<uint8, DeviceClass*> s_nodeTypes; // Map of ZWave+ Node Types
//-----------------------------------------------------------------------------
// Statistics
//-----------------------------------------------------------------------------
public:
struct CommandClassData
{
uint8 m_commandClassId;
uint32 m_sentCnt;
uint32 m_receivedCnt;
};
struct NodeData
{
uint32 m_sentCnt;
uint32 m_sentFailed;
uint32 m_retries;
uint32 m_receivedCnt;
uint32 m_receivedDups;
uint32 m_receivedUnsolicited;
string m_sentTS;
string m_receivedTS;
uint32 m_lastRequestRTT;
uint32 m_averageRequestRTT; // ms
uint32 m_lastResponseRTT;
uint32 m_averageResponseRTT;
uint8 m_quality; // Node quality measure
uint8 m_lastReceivedMessage[254];
list<CommandClassData> m_ccData;
};
private:
void GetNodeStatistics( NodeData* _data );
uint32 m_sentCnt; // Number of messages sent from this node.
uint32 m_sentFailed; // Number of sent messages failed
uint32 m_retries; // Number of message retries
uint32 m_receivedCnt; // Number of messages received from this node.
uint32 m_receivedDups; // Number of duplicated messages received;
uint32 m_receivedUnsolicited; // Number of messages received unsolicited
uint32 m_lastRequestRTT; // Last message request RTT
uint32 m_lastResponseRTT; // Last message response RTT
TimeStamp m_sentTS; // Last message sent time
TimeStamp m_receivedTS; // Last message received time
uint32 m_averageRequestRTT; // Average Request round trip time.
uint32 m_averageResponseRTT; // Average Response round trip time.
uint8 m_quality; // Node quality measure
uint8 m_lastReceivedMessage[254]; // Place to hold last received message
uint8 m_errors; // Count errors for dead node detection
//-----------------------------------------------------------------------------
// Encryption Related
//-----------------------------------------------------------------------------
public:
uint8 *GenerateNonceKey();
uint8 *GetNonceKey(uint32 nonceid);
private:
uint8 m_lastnonce;
uint8 m_nonces[8][8];
};
} //namespace OpenZWave
#endif //_Node_H
OpenZWave::SwitchBinary
Implements COMMAND_CLASS_SWITCH_BINARY (0x25), a Z-Wave device command class.
Definition: SwitchBinary.h:39
OpenZWave::Indicator
Implements COMMAND_CLASS_INDICATOR (0x87), a Z-Wave device command class.
Definition: Indicator.h:39
OpenZWave::Node::IsAddingNode
bool IsAddingNode() const
Definition: Node.h:318
OpenZWave::Association
Implements COMMAND_CLASS_ASSOCIATION (0x85), a Z-Wave device command class.
Definition: Association.h:38
OpenZWave::Node::IsFrequentListeningDevice
bool IsFrequentListeningDevice() const
Definition: Node.h:302
OpenZWave::ThermostatFanMode
Implements COMMAND_CLASS_THERMOSTAT_FAN_MODE (0x44), a Z-Wave device command class.
Definition: ThermostatFanMode.h:42
OpenZWave::Node::GetType
string const & GetType() const
Definition: Node.h:315
OpenZWave::AssociationCommandConfiguration
Implements COMMAND_CLASS_ASSOCIATION_COMMAND_CONFIGURATION (0x9b), a Z-Wave device command class...
Definition: AssociationCommandConfiguration.h:42
OpenZWave
Definition: Bitfield.h:34
OpenZWave::Node::QueryStageRetry
void QueryStageRetry(QueryStage const _stage, uint8 const _maxAttempts=0)
Definition: Node.cpp:750
OpenZWave::ValueStore
Container that holds all of the values associated with a given node.
Definition: ValueStore.h:43
OpenZWave::Node::NodeData::m_lastResponseRTT
uint32 m_lastResponseRTT
Definition: Node.h:588
OpenZWave::Node::SetProtocolInfo
void SetProtocolInfo(uint8 const *_protocolInfo, uint8 const _length)
Definition: Node.cpp:1453
OpenZWave::Node::CommandClassData::m_receivedCnt
uint32 m_receivedCnt
Definition: Node.h:573
OpenZWave::Node::AllQueriesCompleted
bool AllQueriesCompleted() const
Definition: Node.h:251
OpenZWave::Security
Definition: Security.h:63
OpenZWave::Node::CreateValueID
ValueID CreateValueID(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, ValueID::ValueType const _type)
Definition: Node.cpp:2149
OpenZWave::Node::QueryStage_Instances
Definition: Node.h:146
OpenZWave::Node::QueryStage_Associations
Definition: Node.h:150
OpenZWave::ManufacturerSpecific
Implements COMMAND_CLASS_MANUFACTURER_SPECIFIC (0x72), a Z-Wave device command class.
Definition: ManufacturerSpecific.h:38
OpenZWave::Node::NodeData::m_sentFailed
uint32 m_sentFailed
Definition: Node.h:579
uint16
unsigned short uint16
Definition: Defs.h:77
OpenZWave::Node::SecurityFlag_Security
Definition: Node.h:285
OpenZWave::Node::QueryStage_Session
Definition: Node.h:152
OpenZWave::ValueID::ValueType
ValueType
Definition: ValueID.h:85
Group.h
OpenZWave::Node::QueryStage_Dynamic
Definition: Node.h:153
OpenZWave::Node::CreateValueDecimal
bool CreateValueDecimal(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, string const &_default, uint8 const _pollIntensity)
Definition: Node.cpp:2251
OpenZWave::MeterPulse
Implements COMMAND_CLASS_METER_PULSE (0x35), a Z-Wave device command class.
Definition: MeterPulse.h:39
OpenZWave::Node::RemoveValue
bool RemoveValue(uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex)
Definition: Node.cpp:2600
OpenZWave::Node::QueryStage_NodePlusInfo
Definition: Node.h:142
OpenZWave::ThermostatSetpoint
Implements COMMAND_CLASS_THERMOSTAT_SETPOINT (0x43), a Z-Wave device command class.
Definition: ThermostatSetpoint.h:41
OpenZWave::Node::SetSecured
void SetSecured(bool secure)
Definition: Node.cpp:1516
OpenZWave::WakeUp
Implements COMMAND_CLASS_WAKE_UP (0x84), a Z-Wave device command class.
Definition: WakeUp.h:43
OpenZWave::Manager
The main public interface to OpenZWave.
Definition: Manager.h:109
OpenZWave::Node::GetQueryStageName
string GetQueryStageName(QueryStage const _stage)
Definition: Node.cpp:809
OpenZWave::Node::NodeInfoReceived
bool NodeInfoReceived() const
Definition: Node.h:248
OpenZWave::SensorAlarm
Implements COMMAND_CLASS_SENSOR_ALARM (0x9c), a Z-Wave device command class.
Definition: SensorAlarm.h:41
ValueList.h
OpenZWave::Node::CreateValueList
bool CreateValueList(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, uint8 const _size, vector< ValueList::Item > const &_items, int32 const _default, uint8 const _pollIntensity)
Definition: Node.cpp:2311
OpenZWave::Node::GetCommandClass
CommandClass * GetCommandClass(uint8 const _commandClassId) const
Definition: Node.cpp:1889
OpenZWave::Node::GetNeighbors
uint32 GetNeighbors(uint8 **o_associations)
Definition: Node.cpp:821
OpenZWave::Node::ProtocolInfoReceived
bool ProtocolInfoReceived() const
Definition: Node.h:247
OpenZWave::Lock
Implements COMMAND_CLASS_LOCK (0x76), a Z-Wave device command class.
Definition: Lock.h:39
OpenZWave::SensorBinary
Implements COMMAND_CLASS_SENSOR_BINARY (0x30), a Z-Wave device command class.
Definition: SensorBinary.h:39
OpenZWave::Node::QueryStage
QueryStage
Definition: Node.h:134
OpenZWave::Node::QueryStage_ManufacturerSpecific1
Definition: Node.h:140
OpenZWave::Node::IsSecurityDevice
bool IsSecurityDevice() const
Definition: Node.h:305
OpenZWave::Node::QueryStage_WakeUp
Definition: Node.h:139
OpenZWave::Node::NodeBroadcast
Definition: Node.h:298
OpenZWave::Node::ClearAddingNode
void ClearAddingNode()
Definition: Node.h:320
OpenZWave::ThermostatFanState
Implements COMMAND_CLASS_THERMOSTAT_FAN_STATE (0x45), a Z-Wave device command class.
Definition: ThermostatFanState.h:42
OpenZWave::Node::ReadValueFromXML
void ReadValueFromXML(uint8 const _commandClassId, TiXmlElement const *_valueElement)
Definition: Node.cpp:2523
OpenZWave::Node::SetNodeAlive
void SetNodeAlive(bool const _isAlive)
Definition: Node.cpp:1726
OpenZWave::Node::SetSecuredClasses
void SetSecuredClasses(uint8 const *_data, uint8 const _length)
Definition: Node.cpp:1523
OpenZWave::Meter
Implements COMMAND_CLASS_METER (0x32), a Z-Wave device command class.
Definition: Meter.h:39
OpenZWave::Node::GetVersion
uint8 GetVersion() const
Definition: Node.h:307
OpenZWave::InstanceAssociation
Definition: Group.h:42
OpenZWave::Node::CommandClassData::m_commandClassId
uint8 m_commandClassId
Definition: Node.h:571
OpenZWave::Node
The Node class describes a Z-Wave node object...typically a device on the Z-Wave network.
Definition: Node.h:64
OpenZWave::Node::IsNodeAlive
bool IsNodeAlive() const
Definition: Node.h:221
OpenZWave::Alarm
Implements COMMAND_CLASS_ALARM (0x71), a Z-Wave device command class.
Definition: Alarm.h:39
OpenZWave::Node::QueryStage_SecurityReport
Definition: Node.h:143
Defs.h
OpenZWave::Node::QueryStageComplete
void QueryStageComplete(QueryStage const _stage)
Definition: Node.cpp:722
OpenZWave::Node::NodeData::m_ccData
list< CommandClassData > m_ccData
Definition: Node.h:592
OpenZWave::CommandClass
Base class for all Z-Wave command classes.
Definition: CommandClass.h:46
OpenZWave::Node::IsController
bool IsController() const
Definition: Node.h:317
OpenZWave::Node::CreateValueByte
bool CreateValueByte(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, uint8 const _default, uint8 const _pollIntensity)
Definition: Node.cpp:2221
OpenZWave::Node::GetNonceKey
uint8 * GetNonceKey(uint32 nonceid)
Definition: Node.cpp:3468
ValueID.h
OpenZWave::SwitchToggleBinary
Implements COMMAND_CLASS_SWITCH_TOGGLE_BINARY (0x28), a Z-Wave device command class.
Definition: SwitchToggleBinary.h:39
OpenZWave::Node::QueryStage_ManufacturerSpecific2
Definition: Node.h:144
OpenZWave::ValueButton
Button value ???.
Definition: ValueButton.h:45
OpenZWave::Node::GetSecurity
uint8 GetSecurity() const
Definition: Node.h:308
OpenZWave::Node::NodeData::m_sentTS
string m_sentTS
Definition: Node.h:584
int16
signed short int16
Definition: Defs.h:76
OpenZWave::Node::IsNodeReset
bool IsNodeReset()
Definition: Node.cpp:3539
OpenZWave::Node::~Node
virtual ~Node()
Definition: Node.cpp:189
OpenZWave::Node::SecurityFlag_SpecificDevice
Definition: Node.h:287
OpenZWave::ClimateControlSchedule
Implements COMMAND_CLASS_CLIMATE_CONTROL_SCHEDULE (0x46), a Z-Wave device command class...
Definition: ClimateControlSchedule.h:41
OpenZWave::Node::QueryStage_Complete
Definition: Node.h:155
OpenZWave::Node::CreateValueBool
bool CreateValueBool(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, bool const _default, uint8 const _pollIntensity)
Definition: Node.cpp:2165
OpenZWave::ThermostatMode
Implements COMMAND_CLASS_THERMOSTAT_MODE (0x40), a Z-Wave device command class.
Definition: ThermostatMode.h:42
OpenZWave::MultiChannelAssociation
Implements COMMAND_CLASS_MULTI_CHANNEL_ASSOCIATION (0x8E), a Z-Wave device command class...
Definition: MultiChannelAssociation.h:39
OpenZWave::Node::CommandClassData
Definition: Node.h:569
OpenZWave::Node::NodeData::m_receivedTS
string m_receivedTS
Definition: Node.h:585
OpenZWave::Driver
The Driver class handles communication between OpenZWave and a device attached via a serial port (typ...
Definition: Driver.h:58
OpenZWave::Node::QueryStage_Static
Definition: Node.h:147
OpenZWave::Node::NodeData
Definition: Node.h:576
int32
signed int int32
Definition: Defs.h:79
OpenZWave::Node::SecurityFlag_Controller
Definition: Node.h:286
OpenZWave::Node::SetNodePlusInfoReceived
void SetNodePlusInfoReceived(const bool _received)
Definition: Node.h:253
uint32
unsigned int uint32
Definition: Defs.h:80
OpenZWave::Node::QueryStage_Probe
Definition: Node.h:138
OpenZWave::Node::SetNodeOn
void SetNodeOn()
Definition: Node.cpp:2119
OpenZWave::Node::NodeData::m_sentCnt
uint32 m_sentCnt
Definition: Node.h:578
OpenZWave::Node::CommandClassData::m_sentCnt
uint32 m_sentCnt
Definition: Node.h:572
OpenZWave::Group
Manages a group of devices (various nodes associated with each other).
Definition: Group.h:49
OpenZWave::Hail
Implements COMMAND_CLASS_HAIL (0x82), a Z-Wave device command class.
Definition: Hail.h:37
OpenZWave::Node::RemoveValueList
void RemoveValueList(ValueList *_value)
Definition: Node.cpp:2463
OpenZWave::Node::CreateValueRaw
bool CreateValueRaw(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, uint8 const *_default, uint8 const _length, uint8 const _pollIntensity)
Definition: Node.cpp:2343
OpenZWave::Node::AdvanceQueries
void AdvanceQueries()
Definition: Node.cpp:239
OpenZWave::Node::QueryStage_Neighbors
Definition: Node.h:151
OpenZWave::Node::CreateValueFromXML
bool CreateValueFromXML(uint8 const _commandClassId, TiXmlElement const *_valueElement)
Definition: Node.cpp:2476
OpenZWave::Node::NodeData::m_averageResponseRTT
uint32 m_averageResponseRTT
Definition: Node.h:589
OpenZWave::SwitchMultilevel
Implements COMMAND_CLASS_SWITCH_MULTILEVEL (0x26), a Z-Wave device command class. ...
Definition: SwitchMultilevel.h:41
OpenZWave::Node::QueryStage_CacheLoad
Definition: Node.h:148
OpenZWave::Node::GetMaxBaudRate
uint32 GetMaxBaudRate() const
Definition: Node.h:306
OpenZWave::Node::ApplicationCommandHandler
void ApplicationCommandHandler(uint8 const *_data, bool encrypted)
Definition: Node.cpp:1843
OpenZWave::Node::SetLevel
void SetLevel(uint8 const _level)
Definition: Node.cpp:2097
OpenZWave::Node::SetQueryStage
void SetQueryStage(QueryStage const _stage, bool const _advance=true)
Definition: Node.cpp:783
OpenZWave::Node::NodeData::m_lastRequestRTT
uint32 m_lastRequestRTT
Definition: Node.h:586
OpenZWave::Node::UpdateNodeInfo
void UpdateNodeInfo(uint8 const *_data, uint8 const _length)
Definition: Node.cpp:1631
OpenZWave::Node::SecurityFlag_Sensor250ms
Definition: Node.h:290
OpenZWave::Protection
Implements COMMAND_CLASS_PROTECTION (0x75), a Z-Wave device command class.
Definition: Protection.h:39
OpenZWave::ValueID
Provides a unique ID for a value reported by a Z-Wave device.
Definition: ValueID.h:53
OpenZWave::Node::GetNodeId
uint8 GetNodeId() const
Definition: Node.h:310
OpenZWave::Node::SecurityFlag_RoutingSlave
Definition: Node.h:288
OpenZWave::Node::SecurityFlag_OptionalFunctionality
Definition: Node.h:292
OpenZWave::Node::CreateValueSchedule
bool CreateValueSchedule(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, uint8 const _pollIntensity)
Definition: Node.cpp:2374
OpenZWave::Node::IsBeamingDevice
bool IsBeamingDevice() const
Definition: Node.h:303
OpenZWave::Node::SetAddingNode
void SetAddingNode()
Definition: Node.h:319
OpenZWave::Node::QueryStage_Versions
Definition: Node.h:145
OpenZWave::Node::QueryStage_NodeInfo
Definition: Node.h:141
OpenZWave::Node::IsNodeZWavePlus
bool IsNodeZWavePlus() const
Definition: Node.h:249
OpenZWave::Node::NodeData::m_averageRequestRTT
uint32 m_averageRequestRTT
Definition: Node.h:587
OpenZWave::Node::CreateValueString
bool CreateValueString(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, string const &_default, uint8 const _pollIntensity)
Definition: Node.cpp:2433
OpenZWave::Battery
Implements COMMAND_CLASS_BATTERY (0x80), a Z-Wave device command class.
Definition: Battery.h:39
OpenZWave::Node::SecurityFlag_Sensor1000ms
Definition: Node.h:291
OpenZWave::SwitchAll
Implements COMMAND_CLASS_SWITCH_ALL (0x27), a Z-Wave device command class.
Definition: SwitchAll.h:39
OpenZWave::Node::Node
Node(uint32 const _homeId, uint8 const _nodeId)
Definition: Node.cpp:120
OpenZWave::Node::GetCurrentQueryStage
Node::QueryStage GetCurrentQueryStage()
Definition: Node.h:207
OpenZWave::Node::SecurityFlag_BeamCapability
Definition: Node.h:289
OpenZWave::Node::NodeData::m_receivedUnsolicited
uint32 m_receivedUnsolicited
Definition: Node.h:583
OpenZWave::Node::GenerateNonceKey
uint8 * GenerateNonceKey()
Definition: Node.cpp:3428
OpenZWave::Clock
Implements COMMAND_CLASS_CLOCK (0x81), a Z-Wave device command class.
Definition: Clock.h:40
OpenZWave::SwitchToggleMultilevel
Implements COMMAND_CLASS_SWITCH_TOGGLE_MULTILEVEL (0x29), a Z-Wave device command class...
Definition: SwitchToggleMultilevel.h:39
OpenZWave::ThermostatOperatingState
Implements COMMAND_CLASS_THERMOSTAT_OPERATING_STATE (0x42), a Z-Wave device command class...
Definition: ThermostatOperatingState.h:42
OpenZWave::Node::NodeData::m_receivedCnt
uint32 m_receivedCnt
Definition: Node.h:581
TimeStamp.h
OpenZWave::EnergyProduction
Implements COMMAND_CLASS_ENERGY_PRODUCTION (0x90), a Z-Wave device command class. ...
Definition: EnergyProduction.h:39
OpenZWave::MultiInstance
Implements COMMAND_CLASS_MULTI_INSTANCE (0x60), a Z-Wave device command class.
Definition: MultiInstance.h:38
OpenZWave::Node::QueryStage_Probe1
Definition: Node.h:149
OpenZWave::Language
Implements COMMAND_CLASS_LANGUAGE (0x89), a Z-Wave device command class.
Definition: Language.h:39
OpenZWave::TimeStamp
Implements a platform-independent TimeStamp.
Definition: TimeStamp.h:39
OpenZWave::Value
Base class for values associated with a node.
Definition: Value.h:47
OpenZWave::Node::QueryStage_ProtocolInfo
Definition: Node.h:137
OpenZWave::Node::GetGeneric
uint8 GetGeneric() const
Definition: Node.h:313
OpenZWave::ZWavePlusInfo
Implements COMMAND_CLASS_ZWAVEPLUS_INFO (0x5E), a Z-Wave device command class.
Definition: ZWavePlusInfo.h:37
OpenZWave::Version
Implements COMMAND_CLASS_VERSION (0x86), a Z-Wave device command class.
Definition: Version.h:39
OpenZWave::Node::UpdateProtocolInfo
void UpdateProtocolInfo(uint8 const *_data)
Definition: Node.cpp:1354
OpenZWave::NodeNaming
Implements COMMAND_CLASS_NODE_NAMING (0x77), a Z-Wave device command class.
Definition: NodeNaming.h:37
OpenZWave::Node::NodeData::m_retries
uint32 m_retries
Definition: Node.h:580
OpenZWave::Node::IsRoutingDevice
bool IsRoutingDevice() const
Definition: Node.h:304
OpenZWave::SensorMultilevel
Implements COMMAND_CLASS_SENSOR_MULTILEVEL (0x31), a Z-Wave device command class. ...
Definition: SensorMultilevel.h:39
OpenZWave::Node::SetNodeOff
void SetNodeOff()
Definition: Node.cpp:2134
OpenZWave::Node::QueryStage_Configuration
Definition: Node.h:154
OpenZWave::ControllerReplication
Implements COMMAND_CLASS_CONTROLLER_REPLICATION (0x21), a Z-Wave device command class.
Definition: ControllerReplication.h:37
OpenZWave::Node::QueryStage_None
Definition: Node.h:136
OpenZWave::Node::IsListeningDevice
bool IsListeningDevice() const
Definition: Node.h:301
OpenZWave::Basic
Implements COMMAND_CLASS_BASIC (0x20), a Z-Wave device command class.
Definition: Basic.h:39
Msg.h
OpenZWave::Node::GetValue
Value * GetValue(ValueID const &_id)
Definition: Node.cpp:2569
OpenZWave::Node::GetBasic
uint8 GetBasic() const
Definition: Node.h:312
OpenZWave::ValueID::ValueGenre
ValueGenre
Definition: ValueID.h:71
OpenZWave::Node::NodeData::m_receivedDups
uint32 m_receivedDups
Definition: Node.h:582
OpenZWave::Node::CreateValueButton
bool CreateValueButton(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const &_label, uint8 const _pollIntensity)
Definition: Node.cpp:2195
OpenZWave::Node::CreateValueInt
bool CreateValueInt(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, int32 const _default, uint8 const _pollIntensity)
Definition: Node.cpp:2281
OpenZWave::Node::NodeData::m_quality
uint8 m_quality
Definition: Node.h:590
OpenZWave::Node::CreateValueShort
bool CreateValueShort(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, int16 const _default, uint8 const _pollIntensity)
Definition: Node.cpp:2403
OpenZWave::ValueList
List of values sent to/received from a node.
Definition: ValueList.h:45
OpenZWave::Node::GetSpecific
uint8 GetSpecific() const
Definition: Node.h:314
uint8
unsigned char uint8
Definition: Defs.h:74