OpenZWave Library  1.6.954
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 class TiXmlNode;
44 
45 namespace OpenZWave
46 {
47  namespace Internal
48  {
49  namespace CC
50  {
51  class CommandClass;
52  class Association;
53  class AssociationCommandConfiguration;
54  class ControllerReplication;
55  class Hail;
56  class ManufacturerSpecific;
57  class MultiChannelAssociation;
58  class MultiInstance;
59  class NodeNaming;
60  class Version;
61  class ZWavePlusInfo;
62  }
63  namespace VC
64  {
65  class Value;
66  class ValueStore;
67  }
68  namespace Platform
69  {
70  class Mutex;
71  }
72  class ProductDescriptor;
73  class ManufacturerSpecificDB;
74  }
75  class Driver;
76  class Group;
77 
81  class Node
82  {
83  friend class Manager;
84  friend class Driver;
85  friend class Group;
86  friend class Internal::VC::Value;
87  friend class ValueButton;
92  friend class Internal::CC::Hail;
97  friend class Internal::CC::Version;
100 
101  //-----------------------------------------------------------------------------
102  // Construction
103  //-----------------------------------------------------------------------------
104  public:
110  Node(uint32 const _homeId, uint8 const _nodeId);
113  virtual ~Node();
114 
115  private:
119  Driver* GetDriver() const;
120 
121  //-----------------------------------------------------------------------------
122  // Initialization
123  //-----------------------------------------------------------------------------
124  public:
126  {
147  };
148 
165  void AdvanceQueries();
166 
173  void QueryStageComplete(QueryStage const _stage);
174 
182  void QueryStageRetry(QueryStage const _stage, uint8 const _maxAttempts = 0); // maxAttempts of zero means no limit
183 
190  void SetQueryStage(QueryStage const _stage, bool const _advance = true);
191 
198  {
199  return m_queryStage;
200  }
201 
208  string GetQueryStageName(QueryStage const _stage);
209 
214  bool IsNodeAlive() const
215  {
216  return m_nodeAlive;
217  }
218 
232  void UpdateProtocolInfo(uint8 const* _data);
240  void SetProtocolInfo(uint8 const* _protocolInfo, uint8 const _length);
241  void UpdateNodeInfo(uint8 const* _data, uint8 const _length);
242 
243  bool ProtocolInfoReceived() const
244  {
245  return m_protocolInfoReceived;
246  }
247  bool NodeInfoReceived() const
248  {
249  return m_nodeInfoReceived;
250  }
251  bool IsNodeZWavePlus() const
252  {
253  return m_nodePlusInfoReceived;
254  }
255 
256  bool AllQueriesCompleted() const
257  {
258  return (QueryStage_Complete == m_queryStage);
259  }
260 
261  void SetNodePlusInfoReceived(const bool _received)
262  {
263  m_nodePlusInfoReceived = _received;
264  }
265 
271  void SetNodeAlive(bool const _isAlive);
272 
273  private:
274  void SetStaticRequests();
275 
276  QueryStage m_queryStage;
277  bool m_queryPending;
278  bool m_queryConfiguration;
279  uint8 m_queryRetries;
280  bool m_protocolInfoReceived;
281  bool m_basicprotocolInfoReceived;
282  bool m_nodeInfoReceived;
283  bool m_nodePlusInfoReceived;
284  bool m_manufacturerSpecificClassReceived;
285  bool m_nodeInfoSupported;
286  bool m_refreshonNodeInfoFrame;
287  bool m_nodeAlive;
288 
289  //-----------------------------------------------------------------------------
290  // Capabilities
291  //-----------------------------------------------------------------------------
292  public:
293  // Security flags
294  enum
295  {
304  };
305 
306  // Node Ids
307  enum
308  {
310  };
311 
312  bool IsListeningDevice() const
313  {
314  return m_listening;
315  }
317  {
318  return m_frequentListening;
319  }
320  bool IsBeamingDevice() const
321  {
322  return m_beaming;
323  }
324  bool IsRoutingDevice() const
325  {
326  return m_routing;
327  }
328  bool IsSecurityDevice() const
329  {
330  return m_security;
331  }
333  {
334  return m_maxBaudRate;
335  }
337  {
338  return m_version;
339  }
341  {
342  return m_security;
343  }
344 
345  uint8 GetNodeId() const
346  {
347  return m_nodeId;
348  }
349 
350  uint8 GetBasic() const
351  {
352  return m_basic;
353  }
355  {
356  return m_generic;
357  }
359  {
360  return m_specific;
361  }
362  string const& GetType() const
363  {
364  return m_type;
365  }
366  uint32 GetNeighbors(uint8** o_neighbors);
367  bool IsController() const
368  {
369  return (m_basic == 0x01 || m_basic == 0x02) && (m_generic == 0x01 || m_generic == 0x02);
370  }
371  bool IsAddingNode() const
372  {
373  return m_addingNode;
374  } /* 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 */
376  {
377  m_addingNode = true;
378  }
380  {
381  m_addingNode = false;
382  }
383  bool IsNodeReset();
384  private:
385  bool m_listening;
386  bool m_frequentListening;
387  bool m_beaming;
388  bool m_routing;
389  uint32 m_maxBaudRate;
390  uint8 m_version;
391  bool m_security;
392  uint32 m_homeId;
393  uint8 m_nodeId;
394  uint8 m_basic; //*< Basic device class (0x01-Controller, 0x02-Static Controller, 0x03-Slave, 0x04-Routing Slave
395  uint8 m_generic;
396  uint8 m_specific;
397  string m_type; // Label representing the specific/generic/basic value
398  uint8 m_neighbors[29]; // Bitmask containing the neighboring nodes
399  uint8 m_numRouteNodes; // number of node routes
400  uint8 m_routeNodes[5]; // nodes to route to
401  map<uint8, uint8> m_buttonMap; // Map button IDs into virtual node numbers
402  bool m_addingNode;
403 
404  //-----------------------------------------------------------------------------
405  // Device Naming
406  //-----------------------------------------------------------------------------
407  private:
408  // Manufacturer, Product and Name are stored here so they can be set by the
409  // user even if the device does not support the relevant command classes.
410  string GetManufacturerName() const
411  {
412  return m_manufacturerName;
413  }
414  string GetProductName() const
415  {
416  return m_productName;
417  }
418  string GetNodeName() const
419  {
420  return m_nodeName;
421  }
422  string GetLocation() const
423  {
424  return m_location;
425  }
426 
427 // string GetManufacturerId()const{ return std::to_string(m_manufacturerId); }
428  uint16 GetManufacturerId() const
429  {
430  return m_manufacturerId;
431  }
432 // string GetProductType()const{ return string(m_productType); }
433  uint16 GetProductType() const
434  {
435  return m_productType;
436  }
437 // string GetProductId()const{ return string(m_productId); }
438  uint16 GetProductId() const
439  {
440  return m_productId;
441  }
442 
443  void SetManufacturerName(string const& _manufacturerName)
444  {
445  m_manufacturerName = _manufacturerName;
446  }
447  void SetProductName(string const& _productName)
448  {
449  m_productName = _productName;
450  }
451  void SetNodeName(string const& _nodeName);
452  void SetLocation(string const& _location);
453 
454  void SetManufacturerId(uint16 const& _manufacturerId)
455  {
456  m_manufacturerId = _manufacturerId;
457  }
458  void SetProductType(uint16 const& _productType)
459  {
460  m_productType = _productType;
461  }
462  void SetProductId(uint16 const& _productId)
463  {
464  m_productId = _productId;
465  }
466 
467  string m_manufacturerName;
468  string m_productName;
469  string m_nodeName;
470  string m_location;
471 
472  uint16 m_manufacturerId;
473  uint16 m_productType;
474  uint16 m_productId;
475 
476  // zwave+ info
477  uint16 GetDeviceType() const
478  {
479  return m_deviceType;
480  }
481  string GetDeviceTypeString();
482  uint8 GetRoleType() const
483  {
484  return m_role;
485  }
486  string GetRoleTypeString();
487  uint8 GetNodeType() const
488  {
489  return m_nodeType;
490  }
491  string GetNodeTypeString();
492 
493  uint16 m_deviceType;
494  uint8 m_role;
495  uint8 m_nodeType;
496 
497  //-----------------------------------------------------------------------------
498  // Command Classes
499  //-----------------------------------------------------------------------------
500  public:
507  Internal::CC::CommandClass* GetCommandClass(uint8 const _commandClassId) const;
508  void ApplicationCommandHandler(uint8 const* _data, bool encrypted);
509 
517  void SetSecuredClasses(uint8 const* _data, uint8 const _length, uint32 const _instance = 1);
518  void SetSecured(bool secure);
519  bool IsSecured();
524  void SetInstanceLabel(uint8 const _instance, char *label);
528  string GetInstanceLabel(uint8 const _ccid, uint8 const _instance);
529 
533  uint8 GetNumInstances(uint8 const _ccid);
534  private:
544  Internal::CC::CommandClass* AddCommandClass(uint8 const _commandClassId);
551  void RemoveCommandClass(uint8 const _commandClassId);
552  void ReadXML(TiXmlElement const* _nodeElement);
553  void ReadDeviceProtocolXML(TiXmlElement const* _ccsElement);
554  void ReadCommandClassesXML(TiXmlElement const* _ccsElement);
555  void WriteXML(TiXmlElement* _nodeElement);
556 
557  map<uint8, Internal::CC::CommandClass*> m_commandClassMap;
558  bool m_secured;
559  map<uint8, string> m_globalInstanceLabel;
561  TiXmlNode *m_nodeCache;
562  //-----------------------------------------------------------------------------
563  // Configuration Revision Related Classes
564  //-----------------------------------------------------------------------------
565  public:
566  void SetProductDetails(std::shared_ptr<Internal::ProductDescriptor> product);
571  string getConfigPath();
577  {
578  return m_fileConfigRevision;
579  }
580  ;
586  {
587  return m_loadedConfigRevision;
588  }
589  ;
595  {
596  return m_latestConfigRevision;
597  }
598  ;
603  void setFileConfigRevision(uint32 rev);
618 
619  private:
620 
621  std::shared_ptr<Internal::ProductDescriptor> m_Product;
622 
623  uint32 m_fileConfigRevision;
624  uint32 m_loadedConfigRevision;
625  uint32 m_latestConfigRevision;
626  //-----------------------------------------------------------------------------
627  // Basic commands (helpers that go through the basic command class)
628  //-----------------------------------------------------------------------------
629  public:
630  void SetLevel(uint8 const _level);
631 
632  //-----------------------------------------------------------------------------
633  // On/Off commands (helpers that go through the basic or switchall command class)
634  //-----------------------------------------------------------------------------
635  public:
636  void SetNodeOn();
637  void SetNodeOff();
638 
639  //-----------------------------------------------------------------------------
640  // Values (handled by the command classes)
641  //-----------------------------------------------------------------------------
642  public:
643  ValueID CreateValueID(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, ValueID::ValueType const _type);
644 
645  Internal::VC::Value* GetValue(ValueID const& _id);
646  Internal::VC::Value* GetValue(uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex);
647  bool RemoveValue(uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex);
648 
649  // Helpers for creating values
650  bool CreateValueBitSet(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const& _label, string const& _units, bool const _readOnly, bool const _writeOnly, int32 const _default, uint8 const _pollIntensity);
651  bool CreateValueBool(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const& _label, string const& _units, bool const _readOnly, bool const _writeOnly, bool const _default, uint8 const _pollIntensity);
652  bool CreateValueButton(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const& _label, uint8 const _pollIntensity);
653  bool CreateValueByte(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const& _label, string const& _units, bool const _readOnly, bool const _writeOnly, uint8 const _default, uint8 const _pollIntensity);
654  bool CreateValueDecimal(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const& _label, string const& _units, bool const _readOnly, bool const _writeOnly, string const& _default, uint8 const _pollIntensity);
655  bool CreateValueInt(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const& _label, string const& _units, bool const _readOnly, bool const _writeOnly, int32 const _default, uint8 const _pollIntensity);
656  bool CreateValueList(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const& _label, string const& _units, bool const _readOnly, bool const _writeOnly, uint8 const _size, vector<Internal::VC::ValueList::Item> const& _items, int32 const _default, uint8 const _pollIntensity);
657  bool CreateValueRaw(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const& _label, string const& _units, bool const _readOnly, bool const _writeOnly, uint8 const* _default, uint8 const _length, uint8 const _pollIntensity);
658  bool CreateValueSchedule(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const& _label, string const& _units, bool const _readOnly, bool const _writeOnly, uint8 const _pollIntensity);
659  bool CreateValueShort(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const& _label, string const& _units, bool const _readOnly, bool const _writeOnly, int16 const _default, uint8 const _pollIntensity);
660  bool CreateValueString(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const& _label, string const& _units, bool const _readOnly, bool const _writeOnly, string const& _default, uint8 const _pollIntensity);
661 
662  // helpers for removing values
664 
665  void ReadValueFromXML(uint8 const _commandClassId, TiXmlElement const* _valueElement);
666  bool CreateValueFromXML(uint8 const _commandClassId, TiXmlElement const* _valueElement);
667 
668  private:
669  Internal::VC::ValueStore* GetValueStore() const
670  {
671  return m_values;
672  }
673 
674  Internal::VC::ValueStore* m_values; // Values reported via command classes
675 
676  //-----------------------------------------------------------------------------
677  // Configuration Parameters (handled by the Configuration command class)
678  //-----------------------------------------------------------------------------
679  private:
680  bool SetConfigParam(uint8 const _param, int32 _value, uint8 const _size);
681  void RequestConfigParam(uint8 const _param);
682  bool RequestAllConfigParams(uint32 const _requestFlags);
683 
684  //-----------------------------------------------------------------------------
685  // Dynamic Values (used by query and other command classes for updating)
686  //-----------------------------------------------------------------------------
687  private:
688  bool RequestDynamicValues();
689  public:
690  //-----------------------------------------------------------------------------
691  // Refresh Dynamic Values from CommandClasses on Wakeup
692  //-----------------------------------------------------------------------------
693  void RefreshValuesOnWakeup();
694  //-----------------------------------------------------------------------------
695  // Groups
696  //-----------------------------------------------------------------------------
697  private:
698  // The public interface is provided via the wrappers in the Manager class
699  uint8 GetNumGroups();
700  uint32 GetAssociations(uint8 const _groupIdx, uint8** o_associations);
701  uint32 GetAssociations(uint8 const _groupIdx, InstanceAssociation** o_associations);
702  uint8 GetMaxAssociations(uint8 const _groupIdx);
703  bool IsMultiInstance(uint8 const _groupIdx);
704  string GetGroupLabel(uint8 const _groupIdx);
705  void AddAssociation(uint8 const _groupIdx, uint8 const _targetNodeId, uint8 const _instance = 0x00);
706  void RemoveAssociation(uint8 const _groupIdx, uint8 const _targetNodeId, uint8 const _instance = 0x00);
707  void AutoAssociate();
708 
709  // The following methods are not exposed
710  Group* GetGroup(uint8 const _groupIdx); // Get a pointer to a Group object. This must only be called while holding the node Lock.
711  void AddGroup(Group* _group); // The groups are fixed properties of a device, so there is no need for a matching RemoveGroup.
712  void WriteGroups(TiXmlElement* _associationsElement); // Write the group data out to XNL
713 
714  map<uint8, Group*> m_groups; // Maps group indices to Group objects.
715 
716  //-----------------------------------------------------------------------------
717  // Device Classes (static data read from the device_classes.xml file)
718  //-----------------------------------------------------------------------------
719  private:
720  // Container for device class info
721  class DeviceClass
722  {
723  public:
724  DeviceClass(TiXmlElement const* _el);
725  ~DeviceClass()
726  {
727  delete[] m_mandatoryCommandClasses;
728  }
729 
730  uint8 const* GetMandatoryCommandClasses()
731  {
732  return m_mandatoryCommandClasses;
733  }
734  uint8 GetBasicMapping()
735  {
736  return m_basicMapping;
737  }
738  string const& GetLabel()
739  {
740  return m_label;
741  }
742 
743  private:
744  uint8* m_mandatoryCommandClasses; // Zero terminated array of mandatory command classes for this device type.
745  uint8 m_basicMapping; // Command class that COMMAND_CLASS_BASIC maps on to, or zero if there is no mapping.
746  string m_label; // Descriptive label for the device.
747  };
748 
749  // Container for generic device class info
750  class GenericDeviceClass: public DeviceClass
751  {
752  public:
753  GenericDeviceClass(TiXmlElement const* _el);
754  ~GenericDeviceClass();
755 
756  DeviceClass* GetSpecificDeviceClass(uint8 const& _specific);
757 
758  private:
759  map<uint8, DeviceClass*> m_specificDeviceClasses;
760  };
761 
762  bool SetDeviceClasses(uint8 const _basic, uint8 const _generic, uint8 const _specific); // Set the device class data for the node
763  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
764  bool AddMandatoryCommandClasses(uint8 const* _commandClasses); // Add mandatory command classes as specified in the device_classes.xml to the node.
765  void ReadDeviceClasses(); // Read the static device class data from the device_classes.xml file
766  string GetEndPointDeviceClassLabel(uint8 const _generic, uint8 const _specific);
767 
768  static bool s_deviceClassesLoaded; // True if the xml file has already been loaded
769  static map<uint8, string> s_basicDeviceClasses; // Map of basic device classes.
770  static map<uint8, GenericDeviceClass*> s_genericDeviceClasses; // Map of generic device classes.
771  static map<uint8, DeviceClass*> s_roleDeviceClasses; // Map of Zwave+ role device classes.
772  static map<uint16, DeviceClass*> s_deviceTypeClasses; // Map of Zwave+ device type device classes.
773  static map<uint8, DeviceClass*> s_nodeTypes; // Map of ZWave+ Node Types
774 
775  //-----------------------------------------------------------------------------
776  // Statistics
777  //-----------------------------------------------------------------------------
778  public:
780  {
784  };
785 
786  struct NodeData
787  {
794  string m_sentTS;
795  string m_receivedTS;
800  uint8 m_quality; // Node quality measure
802  list<CommandClassData> m_ccData;
806  char m_rssi_1[8];
807  char m_rssi_2[8];
808  char m_rssi_3[8];
809  char m_rssi_4[8];
810  char m_rssi_5[8];
814  char m_routeUsed[9];
819  };
820 
821  private:
822  void GetNodeStatistics(NodeData* _data);
823 
824  uint32 m_sentCnt; // Number of messages sent from this node.
825  uint32 m_sentFailed; // Number of sent messages failed
826  uint32 m_retries; // Number of message retries
827  uint32 m_receivedCnt; // Number of messages received from this node.
828  uint32 m_receivedDups; // Number of duplicated messages received;
829  uint32 m_receivedUnsolicited; // Number of messages received unsolicited
830  uint32 m_lastRequestRTT; // Last message request RTT
831  uint32 m_lastResponseRTT; // Last message response RTT
832  Internal::Platform::TimeStamp m_sentTS; // Last message sent time
833  Internal::Platform::TimeStamp m_receivedTS; // Last message received time
834  uint32 m_averageRequestRTT; // Average Request round trip time.
835  uint32 m_averageResponseRTT; // Average Response round trip time.
836  uint8 m_quality; // Node quality measure
837  uint8 m_lastReceivedMessage[254]; // Place to hold last received message
838  uint8 m_errors;
839  bool m_txStatusReportSupported; // if Extended Status Reports are available
840  uint16 m_txTime; // Time Taken to Transmit the last frame
841  uint8 m_hops; // Hops taken in transmitting last frame
842  char m_rssi_1[8]; // RSSI Level of last transmission
843  char m_rssi_2[8]; // RSSI Level of last transmission
844  char m_rssi_3[8]; // RSSI Level of last transmission
845  char m_rssi_4[8]; // RSSI Level of last transmission
846  char m_rssi_5[8]; // RSSI Level of last transmission
847  uint8 m_ackChannel; // Channel we received the last ACK on
848  uint8 m_lastTxChannel; // Channel we transmitted the last frame on
849  TXSTATUS_ROUTING_SCHEME m_routeScheme; // The Scheme used to route the last frame
850  uint8 m_routeUsed[4]; // The Route Taken in the last frame
851  TXSTATUS_ROUTE_SPEED m_routeSpeed; // Baud Rate of the last frame
852  uint8 m_routeTries; // The number of attempts to route the last frame
853  uint8 m_lastFailedLinkFrom; // The last failed link from
854  uint8 m_lastFailedLinkTo; // The last failed link to
855 
856  //-----------------------------------------------------------------------------
857  // Encryption Related
858  //-----------------------------------------------------------------------------
859  public:
860 
862  uint8 *GetNonceKey(uint32 nonceid);
863 
864  private:
865  uint8 m_lastnonce;
866  uint8 m_nonces[8][8];
867 
868  //-----------------------------------------------------------------------------
869  // MetaData Related
870  //-----------------------------------------------------------------------------
871 
872  public:
880  {
896  };
897 
899  {
900  string author;
901  string date;
902  int revision;
903  string description;
904  };
905  string const GetMetaData(MetaDataFields);
907  string const GetMetaDataString(MetaDataFields);
908  ChangeLogEntry const GetChangeLog(uint32_t);
909 
910  private:
911  void ReadMetaDataFromXML(TiXmlElement const* _valueElement);
912  void WriteMetaDataXML(TiXmlElement*);
913  map<MetaDataFields, string> m_metadata;
914  map<uint32_t, ChangeLogEntry> m_changeLog;
915  };
916 
917 } //namespace OpenZWave
918 
919 #endif //_Node_H
string const GetMetaDataString(MetaDataFields)
Definition: Node.cpp:3768
bool IsAddingNode() const
Definition: Node.h:371
Implements COMMAND_CLASS_ASSOCIATION_COMMAND_CONFIGURATION (0x9b), a Z-Wave device command class.
Definition: AssociationCommandConfiguration.h:46
uint32 GetNeighbors(uint8 **o_neighbors)
Definition: Node.cpp:760
bool IsFrequentListeningDevice() const
Definition: Node.h:316
string const & GetType() const
Definition: Node.h:362
void RefreshValuesOnWakeup()
Definition: Node.cpp:2235
Internal::VC::Value * GetValue(ValueID const &_id)
Definition: Node.cpp:2654
Definition: Node.h:309
TXSTATUS_ROUTING_SCHEME m_routeScheme
Definition: Node.h:813
Definition: Bitfield.cpp:30
void QueryStageRetry(QueryStage const _stage, uint8 const _maxAttempts=0)
Definition: Node.cpp:698
uint32 m_lastResponseRTT
Definition: Node.h:798
void SetProtocolInfo(uint8 const *_protocolInfo, uint8 const _length)
Definition: Node.cpp:1510
uint32 m_receivedCnt
Definition: Node.h:783
bool AllQueriesCompleted() const
Definition: Node.h:256
void checkLatestConfigRevision()
Definition: Node.cpp:3691
void SetInstanceLabel(uint8 const _instance, char *label)
Definition: Node.cpp:1590
uint32 getFileConfigRevision()
Definition: Node.h:576
uint32 m_sentFailed
Definition: Node.h:789
uint8 GetNumInstances(uint8 const _ccid)
Definition: Node.cpp:1618
unsigned short uint16
Definition: Defs.h:88
uint8 m_lastTxChannel
Definition: Node.h:812
ValueType
Definition: ValueID.h:98
TXSTATUS_ROUTE_SPEED m_routeSpeed
Definition: Node.h:815
Implements COMMAND_CLASS_CONTROLLER_REPLICATION (0x21), a Z-Wave device command class.
Definition: ControllerReplication.h:43
Implements COMMAND_CLASS_ASSOCIATION (0x85), a Z-Wave device command class.
Definition: Association.h:43
bool CreateValueRaw(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, uint8 const *_default, uint8 const _length, uint8 const _pollIntensity)
Definition: Node.cpp:2429
bool CreateValueInt(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, int32 const _default, uint8 const _pollIntensity)
Definition: Node.cpp:2394
void SetSecured(bool secure)
Definition: Node.cpp:1580
The main public interface to OpenZWave.
Definition: Manager.h:108
uint8 m_ackChannel
Definition: Node.h:811
string GetQueryStageName(QueryStage const _stage)
Definition: Node.cpp:751
bool NodeInfoReceived() const
Definition: Node.h:247
Implements COMMAND_CLASS_MULTI_CHANNEL_ASSOCIATION (0x8E), a Z-Wave device command class.
Definition: MultiChannelAssociation.h:45
MetaDataFields
Definition: Node.h:879
bool ProtocolInfoReceived() const
Definition: Node.h:243
struct OpenZWave::InstanceAssociation InstanceAssociation
QueryStage
Definition: Node.h:125
bool IsSecurityDevice() const
Definition: Node.h:328
bool m_txStatusReportSupported
Definition: Node.h:803
bool CreateValueDecimal(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, string const &_default, uint8 const _pollIntensity)
Definition: Node.cpp:2376
bool IsSecured()
Definition: Node.cpp:1585
void ClearAddingNode()
Definition: Node.h:379
friend class Group
Definition: Node.h:85
void ReadValueFromXML(uint8 const _commandClassId, TiXmlElement const *_valueElement)
Definition: Node.cpp:2601
void SetNodeAlive(bool const _isAlive)
Definition: Node.cpp:1852
friend class ValueButton
Definition: Node.h:87
Container that holds all of the values associated with a given node.
Definition: ValueStore.h:49
uint8 GetVersion() const
Definition: Node.h:336
uint8 m_commandClassId
Definition: Node.h:781
Definition: Node.h:893
The Node class describes a Z-Wave node object...typically a device on the Z-Wave network.
Definition: Node.h:81
Implements COMMAND_CLASS_NODE_NAMING (0x77), a Z-Wave device command class.
Definition: NodeNaming.h:56
bool IsNodeAlive() const
Definition: Node.h:214
Base class for all Z-Wave command classes.
Definition: CommandClass.h:60
char m_rssi_4[8]
Definition: Node.h:809
bool RemoveValue(uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex)
Definition: Node.cpp:2677
void setLoadedConfigRevision(uint32 rev)
Definition: Node.cpp:3661
uint8 m_lastFailedLinkFrom
Definition: Node.h:817
uint8 m_hops
Definition: Node.h:805
void QueryStageComplete(QueryStage const _stage)
Definition: Node.cpp:673
list< CommandClassData > m_ccData
Definition: Node.h:802
List of values sent to/received from a node.
Definition: ValueList.h:48
bool IsController() const
Definition: Node.h:367
uint8 * GetNonceKey(uint32 nonceid)
Definition: Node.cpp:3530
ChangeLogEntry const GetChangeLog(uint32_t)
Definition: Node.cpp:3717
uint8 GetSecurity() const
Definition: Node.h:340
string m_sentTS
Definition: Node.h:794
char m_rssi_2[8]
Definition: Node.h:807
signed short int16
Definition: Defs.h:87
MetaDataFields GetMetaDataId(string)
Definition: Node.cpp:3732
bool IsNodeReset()
Definition: Node.cpp:3608
virtual ~Node()
Definition: Node.cpp:126
void RemoveValueList(Internal::VC::ValueList *_value)
Definition: Node.cpp:2501
string getConfigPath()
Definition: Node.cpp:3632
Definition: Node.h:779
string m_receivedTS
Definition: Node.h:795
The Driver class handles communication between OpenZWave and a device attached via a serial port (typ...
Definition: Driver.h:84
Implements COMMAND_CLASS_MULTI_INSTANCE (0x60), a Z-Wave device command class.
Definition: MultiInstance.h:44
Definition: Node.h:786
bool CreateValueByte(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, uint8 const _default, uint8 const _pollIntensity)
Definition: Node.cpp:2358
uint8 m_routeTries
Definition: Node.h:816
signed int int32
Definition: Defs.h:90
friend class Internal::CC::CommandClass
Definition: Node.h:90
void SetNodePlusInfoReceived(const bool _received)
Definition: Node.h:261
unsigned int uint32
Definition: Defs.h:91
Definition: Node.h:129
void SetNodeOn()
Definition: Node.cpp:2269
bool CreateValueBitSet(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, int32 const _default, uint8 const _pollIntensity)
Definition: Node.cpp:2304
uint32 m_sentCnt
Definition: Node.h:788
uint32 m_sentCnt
Definition: Node.h:782
void setFileConfigRevision(uint32 rev)
Definition: Node.cpp:3645
Manages a group of devices (various nodes associated with each other).
Definition: Group.h:71
uint8 m_lastFailedLinkTo
Definition: Node.h:818
Implements a platform-independent TimeStamp.
Definition: TimeStamp.h:44
void AdvanceQueries()
Definition: Node.cpp:175
uint8 m_lastReceivedMessage[254]
Definition: Node.h:801
Implements COMMAND_CLASS_HAIL (0x82), a Z-Wave device command class.
Definition: Hail.h:43
uint32 getLatestConfigRevision()
Definition: Node.h:594
bool CreateValueFromXML(uint8 const _commandClassId, TiXmlElement const *_valueElement)
Definition: Node.cpp:2511
uint32 m_averageResponseRTT
Definition: Node.h:799
uint32 GetMaxBaudRate() const
Definition: Node.h:332
void ApplicationCommandHandler(uint8 const *_data, bool encrypted)
Definition: Node.cpp:1958
void SetLevel(uint8 const _level)
Definition: Node.cpp:2250
void SetSecuredClasses(uint8 const *_data, uint8 const _length, uint32 const _instance=1)
Definition: Node.cpp:1634
Definition: Node.h:895
void SetQueryStage(QueryStage const _stage, bool const _advance=true)
Definition: Node.cpp:728
uint32 m_lastRequestRTT
Definition: Node.h:796
void UpdateNodeInfo(uint8 const *_data, uint8 const _length)
Definition: Node.cpp:1757
Implements COMMAND_CLASS_MANUFACTURER_SPECIFIC (0x72), a Z-Wave device command class.
Definition: ManufacturerSpecific.h:44
string description
Definition: Node.h:903
Provides a unique ID for a value reported by a Z-Wave device.The ValueID is used to uniquely identify...
Definition: ValueID.h:76
Internal::CC::CommandClass * GetCommandClass(uint8 const _commandClassId) const
Definition: Node.cpp:2050
uint8 GetNodeId() const
Definition: Node.h:345
bool IsBeamingDevice() const
Definition: Node.h:320
bool CreateValueSchedule(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, uint8 const _pollIntensity)
Definition: Node.cpp:2447
void SetAddingNode()
Definition: Node.h:375
char m_rssi_5[8]
Definition: Node.h:810
bool CreateValueList(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, uint8 const _size, vector< Internal::VC::ValueList::Item > const &_items, int32 const _default, uint8 const _pollIntensity)
Definition: Node.cpp:2412
uint16 m_txTime
Definition: Node.h:804
bool IsNodeZWavePlus() const
Definition: Node.h:251
bool CreateValueButton(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, uint8 const _pollIntensity)
Definition: Node.cpp:2340
uint32 m_averageRequestRTT
Definition: Node.h:797
void setLatestConfigRevision(uint32 rev)
Definition: Node.cpp:3676
ValueID CreateValueID(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, ValueID::ValueType const _type)
Definition: Node.cpp:2295
Node(uint32 const _homeId, uint8 const _nodeId)
Definition: Node.cpp:101
Node::QueryStage GetCurrentQueryStage()
Definition: Node.h:197
TXSTATUS_ROUTING_SCHEME
Definition: Defs.h:448
uint32 getLoadedConfigRevision()
Definition: Node.h:585
uint32 m_receivedUnsolicited
Definition: Node.h:793
bool CreateValueBool(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, bool const _default, uint8 const _pollIntensity)
Definition: Node.cpp:2322
uint8 * GenerateNonceKey()
Definition: Node.cpp:3483
char m_rssi_3[8]
Definition: Node.h:808
uint32 m_receivedCnt
Definition: Node.h:791
Implements COMMAND_CLASS_VERSION (0x86), a Z-Wave device command class.
Definition: Version.h:43
string GetInstanceLabel(uint8 const _ccid, uint8 const _instance)
Definition: Node.cpp:1595
uint8 GetGeneric() const
Definition: Node.h:354
Implements COMMAND_CLASS_ZWAVEPLUS_INFO (0x5E), a Z-Wave device command class.
Definition: ZWavePlusInfo.h:43
Definition: Node.h:898
bool CreateValueString(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, string const &_default, uint8 const _pollIntensity)
Definition: Node.cpp:2483
void UpdateProtocolInfo(uint8 const *_data)
Definition: Node.cpp:1368
uint32 m_retries
Definition: Node.h:790
bool IsRoutingDevice() const
Definition: Node.h:324
void SetNodeOff()
Definition: Node.cpp:2282
int revision
Definition: Node.h:902
Definition: Node.h:127
bool IsListeningDevice() const
Definition: Node.h:312
string date
Definition: Node.h:901
The _ManufacturerSpecificDB class handles the Config File Database that we use to configure devices.
Definition: ManufacturerSpecificDB.h:116
TXSTATUS_ROUTE_SPEED
Definition: Defs.h:461
uint8 GetBasic() const
Definition: Node.h:350
char m_routeUsed[9]
Definition: Node.h:814
ValueGenre
Definition: ValueID.h:84
Base class for values associated with a node.
Definition: Value.h:53
void SetProductDetails(std::shared_ptr< Internal::ProductDescriptor > product)
Definition: Node.cpp:3622
uint32 m_receivedDups
Definition: Node.h:792
string const GetMetaData(MetaDataFields)
Definition: Node.cpp:3704
uint8 m_quality
Definition: Node.h:800
char m_rssi_1[8]
Definition: Node.h:806
bool CreateValueShort(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint16 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, int16 const _default, uint8 const _pollIntensity)
Definition: Node.cpp:2465
string author
Definition: Node.h:900
uint8 GetSpecific() const
Definition: Node.h:358
unsigned char uint8
Definition: Defs.h:85