OpenZWave Library  1.5.0
Node.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 //
3 // Node.h
4 //
5 // A node in the Z-Wave network
6 //
7 // Copyright (c) 2010 Mal Lansell <openzwave@lansell.org>
8 //
9 // SOFTWARE NOTICE AND LICENSE
10 //
11 // This file is part of OpenZWave.
12 //
13 // OpenZWave is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU Lesser General Public License as published
15 // by the Free Software Foundation, either version 3 of the License,
16 // or (at your option) any later version.
17 //
18 // OpenZWave is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU Lesser General Public License for more details.
22 //
23 // You should have received a copy of the GNU Lesser General Public License
24 // along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
25 //
26 //-----------------------------------------------------------------------------
27 
28 #ifndef _Node_H
29 #define _Node_H
30 
31 #include <string>
32 #include <vector>
33 #include <list>
34 #include <map>
35 #include "Defs.h"
36 #include "value_classes/ValueID.h"
38 #include "Msg.h"
39 #include "platform/TimeStamp.h"
40 #include "Group.h"
41 
42 class TiXmlElement;
43 
44 namespace OpenZWave
45 {
46  class CommandClass;
47  class Driver;
48  class Group;
49  class ValueStore;
50  class Value;
51  class ValueBool;
52  class ValueButton;
53  class ValueByte;
54  class ValueDecimal;
55  class ValueInt;
56  class ValueSchedule;
57  class ValueShort;
58  class ValueString;
59  class Mutex;
60 
64  class Node
65  {
66  friend class Manager;
67  friend class Driver;
68  friend class Group;
69  friend class Value;
70  friend class ValueButton;
71  friend class Alarm;
72  friend class Association;
74  friend class Basic;
75  friend class Battery;
76  friend class ClimateControlSchedule;
77  friend class Clock;
78  friend class CommandClass;
79  friend class ControllerReplication;
80  friend class EnergyProduction;
81  friend class Hail;
82  friend class Indicator;
83  friend class Language;
84  friend class Lock;
85  friend class ManufacturerSpecific;
86  friend class Meter;
87  friend class MeterPulse;
88  friend class MultiInstance;
90  friend class NodeNaming;
91  friend class Protection;
92  friend class Security;
93  friend class SensorAlarm;
94  friend class SensorBinary;
95  friend class SensorMultilevel;
96  friend class SwitchAll;
97  friend class SwitchBinary;
98  friend class SwitchMultilevel;
99  friend class SwitchToggleBinary;
101  friend class ThermostatFanMode;
102  friend class ThermostatFanState;
103  friend class ThermostatMode;
105  friend class ThermostatSetpoint;
106  friend class Version;
107  friend class WakeUp;
108  friend class ZWavePlusInfo;
109 
110  //-----------------------------------------------------------------------------
111  // Construction
112  //-----------------------------------------------------------------------------
113  public:
119  Node( uint32 const _homeId, uint8 const _nodeId );
122  virtual ~Node();
123 
124  private:
128  Driver* GetDriver()const;
129 
130  //-----------------------------------------------------------------------------
131  // Initialization
132  //-----------------------------------------------------------------------------
133  public:
135  {
156  };
157 
158 
175  void AdvanceQueries();
176 
183  void QueryStageComplete( QueryStage const _stage );
184 
192  void QueryStageRetry( QueryStage const _stage, uint8 const _maxAttempts = 0 ); // maxAttempts of zero means no limit
193 
200  void SetQueryStage( QueryStage const _stage, bool const _advance = true );
201 
207  Node::QueryStage GetCurrentQueryStage() { return m_queryStage; }
208 
215  string GetQueryStageName( QueryStage const _stage );
216 
221  bool IsNodeAlive()const{ return m_nodeAlive; }
222 
236  void UpdateProtocolInfo( uint8 const* _data );
244  void SetProtocolInfo(uint8 const* _protocolInfo, uint8 const _length);
245  void UpdateNodeInfo( uint8 const* _data, uint8 const _length );
246 
247  bool ProtocolInfoReceived()const{ return m_protocolInfoReceived; }
248  bool NodeInfoReceived()const{ return m_nodeInfoReceived; }
249  bool IsNodeZWavePlus()const{ return m_nodePlusInfoReceived; }
250 
251  bool AllQueriesCompleted()const{ return( QueryStage_Complete == m_queryStage ); }
252 
253  void SetNodePlusInfoReceived(const bool _received){ m_nodePlusInfoReceived = _received; }
254 
260  void SetNodeAlive( bool const _isAlive );
261 
262  private:
263  void SetStaticRequests();
264 
265  QueryStage m_queryStage;
266  bool m_queryPending;
267  bool m_queryConfiguration;
268  uint8 m_queryRetries;
269  bool m_protocolInfoReceived;
270  bool m_basicprotocolInfoReceived;
271  bool m_nodeInfoReceived;
272  bool m_nodePlusInfoReceived;
273  bool m_manufacturerSpecificClassReceived;
274  bool m_nodeInfoSupported;
275  bool m_refreshonNodeInfoFrame;
276  bool m_nodeAlive;
277 
278  //-----------------------------------------------------------------------------
279  // Capabilities
280  //-----------------------------------------------------------------------------
281  public:
282  // Security flags
283  enum
284  {
293  };
294 
295  // Node Ids
296  enum
297  {
299  };
300 
301  bool IsListeningDevice()const{ return m_listening; }
302  bool IsFrequentListeningDevice()const{ return m_frequentListening; }
303  bool IsBeamingDevice()const{ return m_beaming; }
304  bool IsRoutingDevice()const{ return m_routing; }
305  bool IsSecurityDevice()const{ return m_security; }
306  uint32 GetMaxBaudRate()const{ return m_maxBaudRate; }
307  uint8 GetVersion()const{ return m_version; }
308  uint8 GetSecurity()const{ return m_security; }
309 
310  uint8 GetNodeId()const{ return m_nodeId; }
311 
312  uint8 GetBasic()const{ return m_basic; }
313  uint8 GetGeneric()const{ return m_generic; }
314  uint8 GetSpecific()const{ return m_specific; }
315  string const& GetType()const{ return m_type; }
316  uint32 GetNeighbors( uint8** o_associations );
317  bool IsController()const{ return ( m_basic == 0x01 || m_basic == 0x02 ) && ( m_generic == 0x01 || m_generic == 0x02 ); }
318  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 */
319  void SetAddingNode() { m_addingNode = true; }
320  void ClearAddingNode() { m_addingNode = false; }
321  bool IsNodeReset();
322  private:
323  bool m_listening;
324  bool m_frequentListening;
325  bool m_beaming;
326  bool m_routing;
327  uint32 m_maxBaudRate;
328  uint8 m_version;
329  bool m_security;
330  uint32 m_homeId;
331  uint8 m_nodeId;
332  uint8 m_basic; //*< Basic device class (0x01-Controller, 0x02-Static Controller, 0x03-Slave, 0x04-Routing Slave
333  uint8 m_generic;
334  uint8 m_specific;
335  string m_type; // Label representing the specific/generic/basic value
336  uint8 m_neighbors[29]; // Bitmask containing the neighboring nodes
337  uint8 m_numRouteNodes; // number of node routes
338  uint8 m_routeNodes[5]; // nodes to route to
339  map<uint8,uint8> m_buttonMap; // Map button IDs into virtual node numbers
340  bool m_addingNode;
341 
342  //-----------------------------------------------------------------------------
343  // Device Naming
344  //-----------------------------------------------------------------------------
345  private:
346  // Manufacturer, Product and Name are stored here so they can be set by the
347  // user even if the device does not support the relevant command classes.
348  string GetManufacturerName()const{ return m_manufacturerName; }
349  string GetProductName()const{ return m_productName; }
350  string GetNodeName()const{ return m_nodeName; }
351  string GetLocation()const{ return m_location; }
352 
353 // string GetManufacturerId()const{ return std::to_string(m_manufacturerId); }
354  uint16 GetManufacturerId()const{ return m_manufacturerId; }
355 // string GetProductType()const{ return string(m_productType); }
356  uint16 GetProductType()const{ return m_productType; }
357 // string GetProductId()const{ return string(m_productId); }
358  uint16 GetProductId()const{ return m_productId; }
359 
360  void SetManufacturerName( string const& _manufacturerName ){ m_manufacturerName = _manufacturerName; }
361  void SetProductName( string const& _productName ){ m_productName = _productName; }
362  void SetNodeName( string const& _nodeName );
363  void SetLocation( string const& _location );
364 
365  void SetManufacturerId( uint16 const& _manufacturerId ){ m_manufacturerId = _manufacturerId; }
366  void SetProductType( uint16 const& _productType ){ m_productType = _productType; }
367  void SetProductId( uint16 const& _productId ){ m_productId = _productId; }
368 
369  string m_manufacturerName;
370  string m_productName;
371  string m_nodeName;
372  string m_location;
373 
374  uint16 m_manufacturerId;
375  uint16 m_productType;
376  uint16 m_productId;
377 
378  // zwave+ info
379  uint16 GetDeviceType() const { return m_deviceType; }
380  string GetDeviceTypeString();
381  uint8 GetRoleType() const { return m_role; }
382  string GetRoleTypeString();
383  uint8 GetNodeType() const { return m_nodeType; }
384  string GetNodeTypeString();
385 
386  uint16 m_deviceType;
387  uint8 m_role;
388  uint8 m_nodeType;
389 
390  //-----------------------------------------------------------------------------
391  // Command Classes
392  //-----------------------------------------------------------------------------
393  public:
400  CommandClass* GetCommandClass( uint8 const _commandClassId )const;
401  void ApplicationCommandHandler( uint8 const* _data, bool encrypted );
402 
409  void SetSecuredClasses( uint8 const* _data, uint8 const _length );
410  void SetSecured(bool secure);
411  private:
421  CommandClass* AddCommandClass( uint8 const _commandClassId );
428  void RemoveCommandClass( uint8 const _commandClassId );
429  void ReadXML( TiXmlElement const* _nodeElement );
430  void ReadDeviceProtocolXML( TiXmlElement const* _ccsElement );
431  void ReadCommandClassesXML( TiXmlElement const* _ccsElement );
432  void WriteXML( TiXmlElement* _nodeElement );
433 
434  map<uint8,CommandClass*> m_commandClassMap;
435  bool m_secured;
436  //-----------------------------------------------------------------------------
437  // Basic commands (helpers that go through the basic command class)
438  //-----------------------------------------------------------------------------
439  public:
440  void SetLevel( uint8 const _level );
441 
442  //-----------------------------------------------------------------------------
443  // On/Off commands (helpers that go through the basic or switchall command class)
444  //-----------------------------------------------------------------------------
445  public:
446  void SetNodeOn();
447  void SetNodeOff();
448 
449  //-----------------------------------------------------------------------------
450  // Values (handled by the command classes)
451  //-----------------------------------------------------------------------------
452  public:
453  ValueID CreateValueID( ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, ValueID::ValueType const _type );
454 
455  Value* GetValue( ValueID const& _id );
456  Value* GetValue( uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex );
457  bool RemoveValue( uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex );
458 
459  // Helpers for creating values
460  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 );
461  bool CreateValueButton( ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const& _label, uint8 const _pollIntensity );
462  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 );
463  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 );
464  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 );
465  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 );
466  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 );
467  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 );
468  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 );
469  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 );
470 
471  // helpers for removing values
472  void RemoveValueList( ValueList* _value );
473 
474  void ReadValueFromXML( uint8 const _commandClassId, TiXmlElement const* _valueElement );
475  bool CreateValueFromXML( uint8 const _commandClassId, TiXmlElement const* _valueElement );
476 
477  private:
478  ValueStore* GetValueStore()const{ return m_values; }
479 
480  ValueStore* m_values; // Values reported via command classes
481 
482  //-----------------------------------------------------------------------------
483  // Configuration Parameters (handled by the Configuration command class)
484  //-----------------------------------------------------------------------------
485  private:
486  bool SetConfigParam( uint8 const _param, int32 _value, uint8 const _size );
487  void RequestConfigParam( uint8 const _param );
488  bool RequestAllConfigParams( uint32 const _requestFlags );
489 
490  //-----------------------------------------------------------------------------
491  // Dynamic Values (used by query and other command classes for updating)
492  //-----------------------------------------------------------------------------
493  private:
494  bool RequestDynamicValues();
495  //-----------------------------------------------------------------------------
496  // Groups
497  //-----------------------------------------------------------------------------
498  private:
499  // The public interface is provided via the wrappers in the Manager class
500  uint8 GetNumGroups();
501  uint32 GetAssociations( uint8 const _groupIdx, uint8** o_associations );
502  uint32 GetAssociations( uint8 const _groupIdx, InstanceAssociation** o_associations );
503  uint8 GetMaxAssociations( uint8 const _groupIdx );
504  string GetGroupLabel( uint8 const _groupIdx );
505  void AddAssociation( uint8 const _groupIdx, uint8 const _targetNodeId, uint8 const _instance = 0x00 );
506  void RemoveAssociation( uint8 const _groupIdx, uint8 const _targetNodeId, uint8 const _instance = 0x00 );
507  void AutoAssociate();
508 
509  // The following methods are not exposed
510  Group* GetGroup( uint8 const _groupIdx ); // Get a pointer to a Group object. This must only be called while holding the node Lock.
511  void AddGroup( Group* _group ); // The groups are fixed properties of a device, so there is no need for a matching RemoveGroup.
512  void WriteGroups( TiXmlElement* _associationsElement ); // Write the group data out to XNL
513 
514  map<uint8,Group*> m_groups; // Maps group indices to Group objects.
515 
516  //-----------------------------------------------------------------------------
517  // Device Classes (static data read from the device_classes.xml file)
518  //-----------------------------------------------------------------------------
519  private:
520  // Container for device class info
521  class DeviceClass
522  {
523  public:
524  DeviceClass( TiXmlElement const* _el );
525  ~DeviceClass(){ delete [] m_mandatoryCommandClasses; }
526 
527  uint8 const* GetMandatoryCommandClasses(){ return m_mandatoryCommandClasses; }
528  uint8 GetBasicMapping(){ return m_basicMapping; }
529  string const& GetLabel(){ return m_label; }
530 
531  private:
532  uint8* m_mandatoryCommandClasses; // Zero terminated array of mandatory command classes for this device type.
533  uint8 m_basicMapping; // Command class that COMMAND_CLASS_BASIC maps on to, or zero if there is no mapping.
534  string m_label; // Descriptive label for the device.
535  };
536 
537  // Container for generic device class info
538  class GenericDeviceClass : public DeviceClass
539  {
540  public:
541  GenericDeviceClass( TiXmlElement const* _el );
542  ~GenericDeviceClass();
543 
544  DeviceClass* GetSpecificDeviceClass( uint8 const& _specific );
545 
546  private:
547  map<uint8,DeviceClass*> m_specificDeviceClasses;
548  };
549 
550 
551  bool SetDeviceClasses( uint8 const _basic, uint8 const _generic, uint8 const _specific ); // Set the device class data for the node
552  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
553  bool AddMandatoryCommandClasses( uint8 const* _commandClasses ); // Add mandatory command classes as specified in the device_classes.xml to the node.
554  void ReadDeviceClasses(); // Read the static device class data from the device_classes.xml file
555  string GetEndPointDeviceClassLabel( uint8 const _generic, uint8 const _specific );
556 
557  static bool s_deviceClassesLoaded; // True if the xml file has already been loaded
558  static map<uint8,string> s_basicDeviceClasses; // Map of basic device classes.
559  static map<uint8,GenericDeviceClass*> s_genericDeviceClasses; // Map of generic device classes.
560  static map<uint8,DeviceClass*> s_roleDeviceClasses; // Map of Zwave+ role device classes.
561  static map<uint16,DeviceClass*> s_deviceTypeClasses; // Map of Zwave+ device type device classes.
562  static map<uint8, DeviceClass*> s_nodeTypes; // Map of ZWave+ Node Types
563 
564 
565  //-----------------------------------------------------------------------------
566  // Statistics
567  //-----------------------------------------------------------------------------
568  public:
570  {
574  };
575 
576  struct NodeData
577  {
584  string m_sentTS;
585  string m_receivedTS;
590  uint8 m_quality; // Node quality measure
592  list<CommandClassData> m_ccData;
593  };
594 
595  private:
596  void GetNodeStatistics( NodeData* _data );
597 
598  uint32 m_sentCnt; // Number of messages sent from this node.
599  uint32 m_sentFailed; // Number of sent messages failed
600  uint32 m_retries; // Number of message retries
601  uint32 m_receivedCnt; // Number of messages received from this node.
602  uint32 m_receivedDups; // Number of duplicated messages received;
603  uint32 m_receivedUnsolicited; // Number of messages received unsolicited
604  uint32 m_lastRequestRTT; // Last message request RTT
605  uint32 m_lastResponseRTT; // Last message response RTT
606  TimeStamp m_sentTS; // Last message sent time
607  TimeStamp m_receivedTS; // Last message received time
608  uint32 m_averageRequestRTT; // Average Request round trip time.
609  uint32 m_averageResponseRTT; // Average Response round trip time.
610  uint8 m_quality; // Node quality measure
611  uint8 m_lastReceivedMessage[254]; // Place to hold last received message
612  uint8 m_errors; // Count errors for dead node detection
613 
614  //-----------------------------------------------------------------------------
615  // Encryption Related
616  //-----------------------------------------------------------------------------
617  public:
618 
620  uint8 *GetNonceKey(uint32 nonceid);
621 
622  private:
623  uint8 m_lastnonce;
624  uint8 m_nonces[8][8];
625  };
626 
627 
628 } //namespace OpenZWave
629 
630 #endif //_Node_H
Implements COMMAND_CLASS_SWITCH_BINARY (0x25), a Z-Wave device command class.
Definition: SwitchBinary.h:39
Implements COMMAND_CLASS_INDICATOR (0x87), a Z-Wave device command class.
Definition: Indicator.h:39
bool IsAddingNode() const
Definition: Node.h:318
Implements COMMAND_CLASS_ASSOCIATION (0x85), a Z-Wave device command class.
Definition: Association.h:38
bool IsFrequentListeningDevice() const
Definition: Node.h:302
Implements COMMAND_CLASS_THERMOSTAT_FAN_MODE (0x44), a Z-Wave device command class.
Definition: ThermostatFanMode.h:42
string const & GetType() const
Definition: Node.h:315
Implements COMMAND_CLASS_ASSOCIATION_COMMAND_CONFIGURATION (0x9b), a Z-Wave device command class...
Definition: AssociationCommandConfiguration.h:42
Definition: Bitfield.h:34
void QueryStageRetry(QueryStage const _stage, uint8 const _maxAttempts=0)
Definition: Node.cpp:750
uint32 m_lastResponseRTT
Definition: Node.h:588
void SetProtocolInfo(uint8 const *_protocolInfo, uint8 const _length)
Definition: Node.cpp:1453
uint32 m_receivedCnt
Definition: Node.h:573
bool AllQueriesCompleted() const
Definition: Node.h:251
Definition: Security.h:63
ValueID CreateValueID(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, ValueID::ValueType const _type)
Definition: Node.cpp:2149
Implements COMMAND_CLASS_MANUFACTURER_SPECIFIC (0x72), a Z-Wave device command class.
Definition: ManufacturerSpecific.h:38
uint32 m_sentFailed
Definition: Node.h:579
unsigned short uint16
Definition: Defs.h:77
ValueType
Definition: ValueID.h:85
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
Implements COMMAND_CLASS_METER_PULSE (0x35), a Z-Wave device command class.
Definition: MeterPulse.h:39
bool RemoveValue(uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex)
Definition: Node.cpp:2600
Implements COMMAND_CLASS_THERMOSTAT_SETPOINT (0x43), a Z-Wave device command class.
Definition: ThermostatSetpoint.h:41
void SetSecured(bool secure)
Definition: Node.cpp:1516
Implements COMMAND_CLASS_WAKE_UP (0x84), a Z-Wave device command class.
Definition: WakeUp.h:43
The main public interface to OpenZWave.
Definition: Manager.h:109
string GetQueryStageName(QueryStage const _stage)
Definition: Node.cpp:809
bool NodeInfoReceived() const
Definition: Node.h:248
Implements COMMAND_CLASS_SENSOR_ALARM (0x9c), a Z-Wave device command class.
Definition: SensorAlarm.h:41
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
CommandClass * GetCommandClass(uint8 const _commandClassId) const
Definition: Node.cpp:1889
uint32 GetNeighbors(uint8 **o_associations)
Definition: Node.cpp:821
bool ProtocolInfoReceived() const
Definition: Node.h:247
struct OpenZWave::InstanceAssociation InstanceAssociation
Implements COMMAND_CLASS_LOCK (0x76), a Z-Wave device command class.
Definition: Lock.h:39
Implements COMMAND_CLASS_SENSOR_BINARY (0x30), a Z-Wave device command class.
Definition: SensorBinary.h:39
QueryStage
Definition: Node.h:134
bool IsSecurityDevice() const
Definition: Node.h:305
Definition: Node.h:298
void ClearAddingNode()
Definition: Node.h:320
friend class Group
Definition: Node.h:68
Implements COMMAND_CLASS_THERMOSTAT_FAN_STATE (0x45), a Z-Wave device command class.
Definition: ThermostatFanState.h:42
void ReadValueFromXML(uint8 const _commandClassId, TiXmlElement const *_valueElement)
Definition: Node.cpp:2523
void SetNodeAlive(bool const _isAlive)
Definition: Node.cpp:1726
void SetSecuredClasses(uint8 const *_data, uint8 const _length)
Definition: Node.cpp:1523
Implements COMMAND_CLASS_METER (0x32), a Z-Wave device command class.
Definition: Meter.h:39
uint8 GetVersion() const
Definition: Node.h:307
uint8 m_commandClassId
Definition: Node.h:571
The Node class describes a Z-Wave node object...typically a device on the Z-Wave network.
Definition: Node.h:64
bool IsNodeAlive() const
Definition: Node.h:221
Implements COMMAND_CLASS_ALARM (0x71), a Z-Wave device command class.
Definition: Alarm.h:39
void QueryStageComplete(QueryStage const _stage)
Definition: Node.cpp:722
list< CommandClassData > m_ccData
Definition: Node.h:592
Base class for all Z-Wave command classes.
Definition: CommandClass.h:46
bool IsController() const
Definition: Node.h:317
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
uint8 * GetNonceKey(uint32 nonceid)
Definition: Node.cpp:3468
Implements COMMAND_CLASS_SWITCH_TOGGLE_BINARY (0x28), a Z-Wave device command class.
Definition: SwitchToggleBinary.h:39
Button value ???.
Definition: ValueButton.h:45
uint8 GetSecurity() const
Definition: Node.h:308
string m_sentTS
Definition: Node.h:584
signed short int16
Definition: Defs.h:76
bool IsNodeReset()
Definition: Node.cpp:3539
virtual ~Node()
Definition: Node.cpp:189
Implements COMMAND_CLASS_CLIMATE_CONTROL_SCHEDULE (0x46), a Z-Wave device command class...
Definition: ClimateControlSchedule.h:41
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
Implements COMMAND_CLASS_THERMOSTAT_MODE (0x40), a Z-Wave device command class.
Definition: ThermostatMode.h:42
Implements COMMAND_CLASS_MULTI_CHANNEL_ASSOCIATION (0x8E), a Z-Wave device command class...
Definition: MultiChannelAssociation.h:39
Definition: Node.h:569
string m_receivedTS
Definition: Node.h:585
The Driver class handles communication between OpenZWave and a device attached via a serial port (typ...
Definition: Driver.h:58
Definition: Node.h:576
signed int int32
Definition: Defs.h:79
void SetNodePlusInfoReceived(const bool _received)
Definition: Node.h:253
unsigned int uint32
Definition: Defs.h:80
Definition: Node.h:138
void SetNodeOn()
Definition: Node.cpp:2119
uint32 m_sentCnt
Definition: Node.h:578
uint32 m_sentCnt
Definition: Node.h:572
Manages a group of devices (various nodes associated with each other).
Definition: Group.h:49
Implements COMMAND_CLASS_HAIL (0x82), a Z-Wave device command class.
Definition: Hail.h:37
void RemoveValueList(ValueList *_value)
Definition: Node.cpp:2463
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
void AdvanceQueries()
Definition: Node.cpp:239
uint8 m_lastReceivedMessage[254]
Definition: Node.h:591
bool CreateValueFromXML(uint8 const _commandClassId, TiXmlElement const *_valueElement)
Definition: Node.cpp:2476
uint32 m_averageResponseRTT
Definition: Node.h:589
Implements COMMAND_CLASS_SWITCH_MULTILEVEL (0x26), a Z-Wave device command class. ...
Definition: SwitchMultilevel.h:41
uint32 GetMaxBaudRate() const
Definition: Node.h:306
void ApplicationCommandHandler(uint8 const *_data, bool encrypted)
Definition: Node.cpp:1843
void SetLevel(uint8 const _level)
Definition: Node.cpp:2097
void SetQueryStage(QueryStage const _stage, bool const _advance=true)
Definition: Node.cpp:783
uint32 m_lastRequestRTT
Definition: Node.h:586
void UpdateNodeInfo(uint8 const *_data, uint8 const _length)
Definition: Node.cpp:1631
Implements COMMAND_CLASS_PROTECTION (0x75), a Z-Wave device command class.
Definition: Protection.h:39
uint8 GetNodeId() const
Definition: Node.h:310
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
bool IsBeamingDevice() const
Definition: Node.h:303
void SetAddingNode()
Definition: Node.h:319
bool IsNodeZWavePlus() const
Definition: Node.h:249
uint32 m_averageRequestRTT
Definition: Node.h:587
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
Implements COMMAND_CLASS_BATTERY (0x80), a Z-Wave device command class.
Definition: Battery.h:39
Implements COMMAND_CLASS_SWITCH_ALL (0x27), a Z-Wave device command class.
Definition: SwitchAll.h:39
Node(uint32 const _homeId, uint8 const _nodeId)
Definition: Node.cpp:120
Node::QueryStage GetCurrentQueryStage()
Definition: Node.h:207
friend class Value
Definition: Node.h:69
uint32 m_receivedUnsolicited
Definition: Node.h:583
uint8 * GenerateNonceKey()
Definition: Node.cpp:3428
Implements COMMAND_CLASS_CLOCK (0x81), a Z-Wave device command class.
Definition: Clock.h:40
Implements COMMAND_CLASS_SWITCH_TOGGLE_MULTILEVEL (0x29), a Z-Wave device command class...
Definition: SwitchToggleMultilevel.h:39
Implements COMMAND_CLASS_THERMOSTAT_OPERATING_STATE (0x42), a Z-Wave device command class...
Definition: ThermostatOperatingState.h:42
uint32 m_receivedCnt
Definition: Node.h:581
Implements COMMAND_CLASS_ENERGY_PRODUCTION (0x90), a Z-Wave device command class. ...
Definition: EnergyProduction.h:39
Implements COMMAND_CLASS_MULTI_INSTANCE (0x60), a Z-Wave device command class.
Definition: MultiInstance.h:38
Implements COMMAND_CLASS_LANGUAGE (0x89), a Z-Wave device command class.
Definition: Language.h:39
Implements a platform-independent TimeStamp.
Definition: TimeStamp.h:39
Base class for values associated with a node.
Definition: Value.h:47
uint8 GetGeneric() const
Definition: Node.h:313
Implements COMMAND_CLASS_ZWAVEPLUS_INFO (0x5E), a Z-Wave device command class.
Definition: ZWavePlusInfo.h:37
Implements COMMAND_CLASS_VERSION (0x86), a Z-Wave device command class.
Definition: Version.h:39
void UpdateProtocolInfo(uint8 const *_data)
Definition: Node.cpp:1354
Implements COMMAND_CLASS_NODE_NAMING (0x77), a Z-Wave device command class.
Definition: NodeNaming.h:37
uint32 m_retries
Definition: Node.h:580
bool IsRoutingDevice() const
Definition: Node.h:304
Implements COMMAND_CLASS_SENSOR_MULTILEVEL (0x31), a Z-Wave device command class. ...
Definition: SensorMultilevel.h:39
void SetNodeOff()
Definition: Node.cpp:2134
Implements COMMAND_CLASS_CONTROLLER_REPLICATION (0x21), a Z-Wave device command class.
Definition: ControllerReplication.h:37
Definition: Node.h:136
bool IsListeningDevice() const
Definition: Node.h:301
Implements COMMAND_CLASS_BASIC (0x20), a Z-Wave device command class.
Definition: Basic.h:39
Value * GetValue(ValueID const &_id)
Definition: Node.cpp:2569
uint8 GetBasic() const
Definition: Node.h:312
ValueGenre
Definition: ValueID.h:71
uint32 m_receivedDups
Definition: Node.h:582
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
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
uint8 m_quality
Definition: Node.h:590
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
friend class CommandClass
Definition: Node.h:78
uint8 GetSpecific() const
Definition: Node.h:314
unsigned char uint8
Definition: Defs.h:74