OpenZWave Library  1.2
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 
41 class TiXmlElement;
42 
43 namespace OpenZWave
44 {
45  class CommandClass;
46  class Driver;
47  class Group;
48  class ValueStore;
49  class Value;
50  class ValueBool;
51  class ValueButton;
52  class ValueByte;
53  class ValueDecimal;
54  class ValueInt;
55  class ValueSchedule;
56  class ValueShort;
57  class ValueString;
58  class Mutex;
59 
63  class Node
64  {
65  friend class Manager;
66  friend class Driver;
67  friend class Group;
68  friend class Value;
69  friend class ValueButton;
70  friend class Alarm;
71  friend class Association;
73  friend class Basic;
74  friend class Battery;
75  friend class ClimateControlSchedule;
76  friend class Clock;
77  friend class CommandClass;
78  friend class ControllerReplication;
79  friend class EnergyProduction;
80  friend class Hail;
81  friend class Indicator;
82  friend class Language;
83  friend class Lock;
84  friend class ManufacturerSpecific;
85  friend class Meter;
86  friend class MeterPulse;
87  friend class MultiInstance;
88  friend class NodeNaming;
89  friend class Protection;
90  friend class Security;
91  friend class SensorAlarm;
92  friend class SensorBinary;
93  friend class SensorMultilevel;
94  friend class SwitchAll;
95  friend class SwitchBinary;
96  friend class SwitchMultilevel;
97  friend class SwitchToggleBinary;
98  friend class SwitchToggleMultilevel;
99  friend class ThermostatFanMode;
100  friend class ThermostatFanState;
101  friend class ThermostatMode;
103  friend class ThermostatSetpoint;
104  friend class Version;
105  friend class WakeUp;
106 
107  //-----------------------------------------------------------------------------
108  // Construction
109  //-----------------------------------------------------------------------------
110  public:
116  Node( uint32 const _homeId, uint8 const _nodeId );
119  virtual ~Node();
120 
121  private:
125  Driver* GetDriver()const;
126 
127  //-----------------------------------------------------------------------------
128  // Initialization
129  //-----------------------------------------------------------------------------
130  public:
132  {
151  };
152 
153 
170  void AdvanceQueries();
171 
178  void QueryStageComplete( QueryStage const _stage );
179 
187  void QueryStageRetry( QueryStage const _stage, uint8 const _maxAttempts = 0 ); // maxAttempts of zero means no limit
188 
195  void SetQueryStage( QueryStage const _stage, bool const _advance = true );
196 
202  Node::QueryStage GetCurrentQueryStage() { return m_queryStage; }
203 
210  string GetQueryStageName( QueryStage const _stage );
211 
216  bool IsNodeAlive()const{ return m_nodeAlive; }
217 
231  void UpdateProtocolInfo( uint8 const* _data );
232  void UpdateNodeInfo( uint8 const* _data, uint8 const _length );
233 
234  bool ProtocolInfoReceived()const{ return m_protocolInfoReceived; }
235  bool NodeInfoReceived()const{ return m_nodeInfoReceived; }
236 
237  bool AllQueriesCompleted()const{ return( QueryStage_Complete == m_queryStage ); }
238 
244  void SetNodeAlive( bool const _isAlive );
245 
246  private:
247  void SetStaticRequests();
248 
249  QueryStage m_queryStage;
250  bool m_queryPending;
251  bool m_queryConfiguration;
252  uint8 m_queryRetries;
253  bool m_protocolInfoReceived;
254  bool m_nodeInfoReceived;
255  bool m_manufacturerSpecificClassReceived;
256  bool m_nodeInfoSupported;
257  bool m_nodeAlive;
258 
259  //-----------------------------------------------------------------------------
260  // Capabilities
261  //-----------------------------------------------------------------------------
262  public:
263  // Security flags
264  enum
265  {
274  };
275 
276  // Node Ids
277  enum
278  {
280  };
281 
282  bool IsListeningDevice()const{ return m_listening; }
283  bool IsFrequentListeningDevice()const{ return m_frequentListening; }
284  bool IsBeamingDevice()const{ return m_beaming; }
285  bool IsRoutingDevice()const{ return m_routing; }
286  bool IsSecurityDevice()const{ return m_security; }
287  uint32 GetMaxBaudRate()const{ return m_maxBaudRate; }
288  uint8 GetVersion()const{ return m_version; }
289  uint8 GetSecurity()const{ return m_security; }
290 
291  uint8 GetNodeId()const{ return m_nodeId; }
292 
293  uint8 GetBasic()const{ return m_basic; }
294  uint8 GetGeneric()const{ return m_generic; }
295  uint8 GetSpecific()const{ return m_specific; }
296  string const& GetType()const{ return m_type; }
297  uint32 GetNeighbors( uint8** o_associations );
298  bool IsController()const{ return ( m_basic == 0x01 || m_basic == 0x02 ) && ( m_generic == 0x01 || m_generic == 0x02 ); }
299  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 */
300  void SetAddingNode() { m_addingNode = true; }
301  void ClearAddingNode() { m_addingNode = false; }
302 
303  private:
304  bool m_listening;
305  bool m_frequentListening;
306  bool m_beaming;
307  bool m_routing;
308  uint32 m_maxBaudRate;
309  uint8 m_version;
310  bool m_security;
311  uint32 m_homeId;
312  uint8 m_nodeId;
313  uint8 m_basic; //*< Basic device class (0x01-Controller, 0x02-Static Controller, 0x03-Slave, 0x04-Routing Slave
314  uint8 m_generic;
315  uint8 m_specific;
316  string m_type; // Label representing the specific/generic/basic value
317  uint8 m_neighbors[29]; // Bitmask containing the neighbouring nodes
318  uint8 m_numRouteNodes; // number of node routes
319  uint8 m_routeNodes[5]; // nodes to route to
320  map<uint8,uint8> m_buttonMap; // Map button IDs into virtual node numbers
321  bool m_addingNode;
322 
323  //-----------------------------------------------------------------------------
324  // Device Naming
325  //-----------------------------------------------------------------------------
326  private:
327  // Manufacturer, Product and Name are stored here so they can be set by the
328  // user even if the device does not support the relevant command classes.
329  string GetManufacturerName()const{ return m_manufacturerName; }
330  string GetProductName()const{ return m_productName; }
331  string GetNodeName()const{ return m_nodeName; }
332  string GetLocation()const{ return m_location; }
333 
334  string GetManufacturerId()const{ return m_manufacturerId; }
335  string GetProductType()const{ return m_productType; }
336  string GetProductId()const{ return m_productId; }
337 
338  void SetManufacturerName( string const& _manufacturerName ){ m_manufacturerName = _manufacturerName; }
339  void SetProductName( string const& _productName ){ m_productName = _productName; }
340  void SetNodeName( string const& _nodeName );
341  void SetLocation( string const& _location );
342 
343  void SetManufacturerId( string const& _manufacturerId ){ m_manufacturerId = _manufacturerId; }
344  void SetProductType( string const& _productType ){ m_productType = _productType; }
345  void SetProductId( string const& _productId ){ m_productId = _productId; }
346 
347  string m_manufacturerName;
348  string m_productName;
349  string m_nodeName;
350  string m_location;
351 
352  string m_manufacturerId;
353  string m_productType;
354  string m_productId;
355 
356  //-----------------------------------------------------------------------------
357  // Command Classes
358  //-----------------------------------------------------------------------------
359  public:
366  CommandClass* GetCommandClass( uint8 const _commandClassId )const;
367  void ApplicationCommandHandler( uint8 const* _data );
368 
375  void SetSecuredClasses( uint8 const* _data, uint8 const _length );
376 
377  private:
387  CommandClass* AddCommandClass( uint8 const _commandClassId );
394  void RemoveCommandClass( uint8 const _commandClassId );
395  void ReadXML( TiXmlElement const* _nodeElement );
396  void ReadDeviceProtocolXML( TiXmlElement const* _ccsElement );
397  void ReadCommandClassesXML( TiXmlElement const* _ccsElement );
398  void WriteXML( TiXmlElement* _nodeElement );
399 
400  map<uint8,CommandClass*> m_commandClassMap;
402  //-----------------------------------------------------------------------------
403  // Basic commands (helpers that go through the basic command class)
404  //-----------------------------------------------------------------------------
405  public:
406  void SetLevel( uint8 const _level );
407 
408  //-----------------------------------------------------------------------------
409  // On/Off commands (helpers that go through the basic or switchall command class)
410  //-----------------------------------------------------------------------------
411  public:
412  void SetNodeOn();
413  void SetNodeOff();
414 
415  //-----------------------------------------------------------------------------
416  // Values (handled by the command classes)
417  //-----------------------------------------------------------------------------
418  public:
419  ValueID CreateValueID( ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, ValueID::ValueType const _type );
420 
421  Value* GetValue( ValueID const& _id );
422  Value* GetValue( uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex );
423  bool RemoveValue( uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex );
424 
425  // Helpers for creating values
426  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 );
427  bool CreateValueButton( ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const& _label, uint8 const _pollIntensity );
428  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 );
429  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 );
430  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 );
431  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 );
432  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 );
433  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 );
434  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 );
435  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 );
436 
437  // helpers for removing values
438  void RemoveValueList( ValueList* _value );
439 
440  void ReadValueFromXML( uint8 const _commandClassId, TiXmlElement const* _valueElement );
441  bool CreateValueFromXML( uint8 const _commandClassId, TiXmlElement const* _valueElement );
442 
443  private:
444  ValueStore* GetValueStore()const{ return m_values; }
445 
446  ValueStore* m_values; // Values reported via command classes
447 
448  //-----------------------------------------------------------------------------
449  // Configuration Parameters (handled by the Configuration command class)
450  //-----------------------------------------------------------------------------
451  private:
452  bool SetConfigParam( uint8 const _param, int32 _value, uint8 const _size );
453  void RequestConfigParam( uint8 const _param );
454  bool RequestAllConfigParams( uint32 const _requestFlags );
455 
456  //-----------------------------------------------------------------------------
457  // Dynamic Values (used by query and other command classes for updating)
458  //-----------------------------------------------------------------------------
459  private:
460  bool RequestDynamicValues();
461  //-----------------------------------------------------------------------------
462  // Groups
463  //-----------------------------------------------------------------------------
464  private:
465  // The public interface is provided via the wrappers in the Manager class
466  uint8 GetNumGroups();
467  uint32 GetAssociations( uint8 const _groupIdx, uint8** o_associations );
468  uint8 GetMaxAssociations( uint8 const _groupIdx );
469  string GetGroupLabel( uint8 const _groupIdx );
470  void AddAssociation( uint8 const _groupIdx, uint8 const _targetNodeId );
471  void RemoveAssociation( uint8 const _groupIdx, uint8 const _targetNodeId );
472  void AutoAssociate();
473 
474  // The following methods are not exposed
475  Group* GetGroup( uint8 const _groupIdx ); // Get a pointer to a Group object. This must only be called while holding the node Lock.
476  void AddGroup( Group* _group ); // The groups are fixed properties of a device, so there is no need for a matching RemoveGroup.
477  void WriteGroups( TiXmlElement* _associationsElement ); // Write the group data out to XNL
478 
479  map<uint8,Group*> m_groups; // Maps group indices to Group objects.
480 
481  //-----------------------------------------------------------------------------
482  // Device Classes (static data read from the device_classes.xml file)
483  //-----------------------------------------------------------------------------
484  private:
485  // Container for device class info
486  class DeviceClass
487  {
488  public:
489  DeviceClass( TiXmlElement const* _el );
490  ~DeviceClass(){ delete [] m_mandatoryCommandClasses; }
491 
492  uint8 const* GetMandatoryCommandClasses(){ return m_mandatoryCommandClasses; }
493  uint8 GetBasicMapping(){ return m_basicMapping; }
494  string const& GetLabel(){ return m_label; }
495 
496  private:
497  uint8* m_mandatoryCommandClasses; // Zero terminated array of mandatory command classes for this device type.
498  uint8 m_basicMapping; // Command class that COMMAND_CLASS_BASIC maps on to, or zero if there is no mapping.
499  string m_label; // Descriptive label for the device.
500  };
501 
502  // Container for generic device class info
503  class GenericDeviceClass : public DeviceClass
504  {
505  public:
506  GenericDeviceClass( TiXmlElement const* _el );
507  ~GenericDeviceClass();
508 
509  DeviceClass* GetSpecificDeviceClass( uint8 const& _specific );
510 
511  private:
512  map<uint8,DeviceClass*> m_specificDeviceClasses;
513  };
514 
515 
516  bool SetDeviceClasses( uint8 const _basic, uint8 const _generic, uint8 const _specific ); // Set the device class data for the node
517  bool AddMandatoryCommandClasses( uint8 const* _commandClasses ); // Add mandatory command classes as specified in the device_classes.xml to the node.
518  void ReadDeviceClasses(); // Read the static device class data from the device_classes.xml file
519  string GetEndPointDeviceClassLabel( uint8 const _generic, uint8 const _specific );
520 
521  static bool s_deviceClassesLoaded; // True if the xml file has alreayd been loaded
522  static map<uint8,string> s_basicDeviceClasses; // Map of basic device classes.
523  static map<uint8,GenericDeviceClass*> s_genericDeviceClasses; // Map of generic device classes.
524 
525  //-----------------------------------------------------------------------------
526  // Statistics
527  //-----------------------------------------------------------------------------
528  public:
530  {
534  };
535 
536  struct NodeData
537  {
544  string m_sentTS;
545  string m_receivedTS;
550  uint8 m_quality; // Node quality measure
551  uint8 m_lastReceivedMessage[254];
552  list<CommandClassData> m_ccData;
553  };
554 
555  private:
556  void GetNodeStatistics( NodeData* _data );
557 
558  uint32 m_sentCnt; // Number of messages sent from this node.
559  uint32 m_sentFailed; // Number of sent messages failed
560  uint32 m_retries; // Number of message retries
561  uint32 m_receivedCnt; // Number of messages received from this node.
562  uint32 m_receivedDups; // Number of duplicated messages received;
563  uint32 m_receivedUnsolicited; // Number of messages received unsolicited
564  uint32 m_lastRequestRTT; // Last message request RTT
565  uint32 m_lastResponseRTT; // Last message response RTT
566  TimeStamp m_sentTS; // Last message sent time
567  TimeStamp m_receivedTS; // Last message received time
568  uint32 m_averageRequestRTT; // Average Request round trip time.
569  uint32 m_averageResponseRTT; // Average Reponse round trip time.
570  uint8 m_quality; // Node quality measure
571  uint8 m_lastReceivedMessage[254]; // Place to hold last received message
572  uint8 m_errors; // Count errors for dead node detection
573  };
574 
575 } //namespace OpenZWave
576 
577 #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:299
Implements COMMAND_CLASS_ASSOCIATION (0x85), a Z-Wave device command class.
Definition: Association.h:38
bool IsFrequentListeningDevice() const
Definition: Node.h:283
Implements COMMAND_CLASS_THERMOSTAT_FAN_MODE (0x44), a Z-Wave device command class.
Definition: ThermostatFanMode.h:42
string const & GetType() const
Definition: Node.h:296
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:666
Container that holds all of the values associated with a given node.
Definition: ValueStore.h:43
uint32 m_lastResponseRTT
Definition: Node.h:548
uint32 m_receivedCnt
Definition: Node.h:533
bool AllQueriesCompleted() const
Definition: Node.h:237
Definition: Security.h:66
ValueID CreateValueID(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, ValueID::ValueType const _type)
Definition: Node.cpp:1812
Implements COMMAND_CLASS_MANUFACTURER_SPECIFIC (0x72), a Z-Wave device command class.
Definition: ManufacturerSpecific.h:38
uint32 m_sentFailed
Definition: Node.h:539
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:1914
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:2263
Implements COMMAND_CLASS_THERMOSTAT_SETPOINT (0x43), a Z-Wave device command class.
Definition: ThermostatSetpoint.h:41
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:108
string GetQueryStageName(QueryStage const _stage)
Definition: Node.cpp:726
bool NodeInfoReceived() const
Definition: Node.h:235
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:1974
CommandClass * GetCommandClass(uint8 const _commandClassId) const
Definition: Node.cpp:1556
uint32 GetNeighbors(uint8 **o_associations)
Definition: Node.cpp:738
bool ProtocolInfoReceived() const
Definition: Node.h:234
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:131
bool IsSecurityDevice() const
Definition: Node.h:286
Definition: Node.h:279
void ClearAddingNode()
Definition: Node.h:301
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:2186
void SetNodeAlive(bool const _isAlive)
Definition: Node.cpp:1407
void SetSecuredClasses(uint8 const *_data, uint8 const _length)
Definition: Node.cpp:1251
Implements COMMAND_CLASS_METER (0x32), a Z-Wave device command class.
Definition: Meter.h:39
uint8 GetVersion() const
Definition: Node.h:288
uint8 m_commandClassId
Definition: Node.h:531
The Node class describes a Z-Wave node object...typically a device on the Z-Wave network.
Definition: Node.h:63
bool IsNodeAlive() const
Definition: Node.h:216
Implements COMMAND_CLASS_ALARM (0x71), a Z-Wave device command class.
Definition: Alarm.h:39
void QueryStageComplete(QueryStage const _stage)
Definition: Node.cpp:638
list< CommandClassData > m_ccData
Definition: Node.h:552
Base class for all Z-Wave command classes.
Definition: CommandClass.h:46
bool IsController() const
Definition: Node.h:298
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:1884
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:289
string m_sentTS
Definition: Node.h:544
signed short int16
Definition: Defs.h:65
virtual ~Node()
Definition: Node.cpp:168
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:1828
Implements COMMAND_CLASS_THERMOSTAT_MODE (0x40), a Z-Wave device command class.
Definition: ThermostatMode.h:42
Definition: Node.h:529
string m_receivedTS
Definition: Node.h:545
The Driver class handles communication between OpenZWave and a device attached via a serial port (typ...
Definition: Driver.h:56
Definition: Node.h:536
signed int int32
Definition: Defs.h:68
unsigned int uint32
Definition: Defs.h:69
Definition: Node.h:134
void SetNodeOn()
Definition: Node.cpp:1782
uint32 m_sentCnt
Definition: Node.h:538
uint32 m_sentCnt
Definition: Node.h:532
Manages a group of devices (various nodes associated with each other).
Definition: Group.h:44
Implements COMMAND_CLASS_HAIL (0x82), a Z-Wave device command class.
Definition: Hail.h:37
void RemoveValueList(ValueList *_value)
Definition: Node.cpp:2126
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:2006
void AdvanceQueries()
Definition: Node.cpp:218
bool CreateValueFromXML(uint8 const _commandClassId, TiXmlElement const *_valueElement)
Definition: Node.cpp:2139
uint32 m_averageResponseRTT
Definition: Node.h:549
Implements COMMAND_CLASS_SWITCH_MULTILEVEL (0x26), a Z-Wave device command class. ...
Definition: SwitchMultilevel.h:41
uint32 GetMaxBaudRate() const
Definition: Node.h:287
void SetLevel(uint8 const _level)
Definition: Node.cpp:1760
void SetQueryStage(QueryStage const _stage, bool const _advance=true)
Definition: Node.cpp:699
uint32 m_lastRequestRTT
Definition: Node.h:546
void UpdateNodeInfo(uint8 const *_data, uint8 const _length)
Definition: Node.cpp:1323
Implements COMMAND_CLASS_PROTECTION (0x75), a Z-Wave device command class.
Definition: Protection.h:39
Provides a unique ID for a value reported by a Z-Wave device.
Definition: ValueID.h:53
uint8 GetNodeId() const
Definition: Node.h:291
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:2037
bool IsBeamingDevice() const
Definition: Node.h:284
void SetAddingNode()
Definition: Node.h:300
uint32 m_averageRequestRTT
Definition: Node.h:547
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:2096
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:108
Node::QueryStage GetCurrentQueryStage()
Definition: Node.h:202
uint32 m_receivedUnsolicited
Definition: Node.h:543
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:541
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:44
uint8 GetGeneric() const
Definition: Node.h:294
Implements COMMAND_CLASS_VERSION (0x86), a Z-Wave device command class.
Definition: Version.h:39
void UpdateProtocolInfo(uint8 const *_data)
Definition: Node.cpp:1178
Implements COMMAND_CLASS_NODE_NAMING (0x77), a Z-Wave device command class.
Definition: NodeNaming.h:37
uint32 m_retries
Definition: Node.h:540
bool IsRoutingDevice() const
Definition: Node.h:285
Implements COMMAND_CLASS_SENSOR_MULTILEVEL (0x31), a Z-Wave device command class. ...
Definition: SensorMultilevel.h:39
void SetNodeOff()
Definition: Node.cpp:1797
Implements COMMAND_CLASS_CONTROLLER_REPLICATION (0x21), a Z-Wave device command class.
Definition: ControllerReplication.h:37
Definition: Node.h:150
bool IsListeningDevice() const
Definition: Node.h:282
Implements COMMAND_CLASS_BASIC (0x20), a Z-Wave device command class.
Definition: Basic.h:39
Value * GetValue(ValueID const &_id)
Definition: Node.cpp:2232
uint8 GetBasic() const
Definition: Node.h:293
ValueGenre
Definition: ValueID.h:71
void ApplicationCommandHandler(uint8 const *_data)
Definition: Node.cpp:1524
uint32 m_receivedDups
Definition: Node.h:542
bool CreateValueButton(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const &_label, uint8 const _pollIntensity)
Definition: Node.cpp:1858
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:1944
uint8 m_quality
Definition: Node.h:550
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:2066
List of values sent to/received from a node.
Definition: ValueList.h:45
uint8 GetSpecific() const
Definition: Node.h:295
unsigned char uint8
Definition: Defs.h:63