OpenZWave Library 1.4.0
Loading...
Searching...
No Matches
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"
38#include "Msg.h"
39#include "platform/TimeStamp.h"
40#include "Group.h"
41
42class TiXmlElement;
43
44namespace 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;
77 friend class Clock;
78 friend class CommandClass;
80 friend class EnergyProduction;
81 friend class Hail;
82 friend class Indicator;
83 friend class Language;
84 friend class Lock;
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:
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:
575
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
unsigned short uint16
Definition Defs.h:77
unsigned int uint32
Definition Defs.h:80
signed short int16
Definition Defs.h:76
signed int int32
Definition Defs.h:79
unsigned char uint8
Definition Defs.h:74
Base class for all Z-Wave command classes.
Definition CommandClass.h:47
The Driver class handles communication between OpenZWave and a device attached via a serial port (typ...
Definition Driver.h:59
Manages a group of devices (various nodes associated with each other).
Definition Group.h:50
Implements a platform-independent mutex–for serializing access to a shared resource.
Definition Mutex.h:40
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
uint8 GetNodeId() const
Definition Node.h:310
void ClearAddingNode()
Definition Node.h:320
friend class ZWavePlusInfo
Definition Node.h:108
void UpdateProtocolInfo(uint8 const *_data)
Definition Node.cpp:1354
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
bool ProtocolInfoReceived() const
Definition Node.h:247
friend class Hail
Definition Node.h:81
bool NodeInfoReceived() const
Definition Node.h:248
friend class CommandClass
Definition Node.h:78
friend class SwitchAll
Definition Node.h:96
@ NodeBroadcast
Definition Node.h:298
friend class SwitchToggleBinary
Definition Node.h:99
friend class ThermostatSetpoint
Definition Node.h:105
friend class Group
Definition Node.h:68
void SetAddingNode()
Definition Node.h:319
friend class SwitchBinary
Definition Node.h:97
uint8 * GenerateNonceKey()
Definition Node.cpp:3428
bool IsController() const
Definition Node.h:317
void SetNodeAlive(bool const _isAlive)
Definition Node.cpp:1726
void QueryStageRetry(QueryStage const _stage, uint8 const _maxAttempts=0)
Definition Node.cpp:750
friend class Association
Definition Node.h:72
bool IsFrequentListeningDevice() const
Definition Node.h:302
friend class SensorBinary
Definition Node.h:94
bool IsBeamingDevice() const
Definition Node.h:303
void RemoveValueList(ValueList *_value)
Definition Node.cpp:2463
bool IsRoutingDevice() const
Definition Node.h:304
friend class ClimateControlSchedule
Definition Node.h:76
friend class Battery
Definition Node.h:75
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
Value * GetValue(ValueID const &_id)
Definition Node.cpp:2569
uint8 GetSecurity() const
Definition Node.h:308
friend class MultiChannelAssociation
Definition Node.h:89
friend class Alarm
Definition Node.h:71
friend class Meter
Definition Node.h:86
friend class Indicator
Definition Node.h:82
bool IsAddingNode() const
Definition Node.h:318
uint8 GetSpecific() const
Definition Node.h:314
friend class Clock
Definition Node.h:77
friend class Lock
Definition Node.h:84
friend class EnergyProduction
Definition Node.h:80
void SetLevel(uint8 const _level)
Definition Node.cpp:2097
void QueryStageComplete(QueryStage const _stage)
Definition Node.cpp:722
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
friend class Basic
Definition Node.h:74
friend class ManufacturerSpecific
Definition Node.h:85
friend class SensorAlarm
Definition Node.h:93
ValueID CreateValueID(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, ValueID::ValueType const _type)
Definition Node.cpp:2149
friend class ThermostatMode
Definition Node.h:103
friend class ThermostatFanMode
Definition Node.h:101
friend class Language
Definition Node.h:83
friend class SwitchToggleMultilevel
Definition Node.h:100
string GetQueryStageName(QueryStage const _stage)
Definition Node.cpp:809
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
uint8 * GetNonceKey(uint32 nonceid)
Definition Node.cpp:3468
friend class NodeNaming
Definition Node.h:90
Node(uint32 const _homeId, uint8 const _nodeId)
Definition Node.cpp:120
friend class ControllerReplication
Definition Node.h:79
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 GetBasic() const
Definition Node.h:312
QueryStage
Definition Node.h:135
@ QueryStage_SecurityReport
Definition Node.h:143
@ QueryStage_Session
Definition Node.h:152
@ QueryStage_Probe1
Definition Node.h:149
@ QueryStage_Complete
Definition Node.h:155
@ QueryStage_ProtocolInfo
Definition Node.h:137
@ QueryStage_NodeInfo
Definition Node.h:141
@ QueryStage_CacheLoad
Definition Node.h:148
@ QueryStage_Neighbors
Definition Node.h:151
@ QueryStage_NodePlusInfo
Definition Node.h:142
@ QueryStage_Probe
Definition Node.h:138
@ QueryStage_Dynamic
Definition Node.h:153
@ QueryStage_WakeUp
Definition Node.h:139
@ QueryStage_Static
Definition Node.h:147
@ QueryStage_ManufacturerSpecific2
Definition Node.h:144
@ QueryStage_Instances
Definition Node.h:146
@ QueryStage_ManufacturerSpecific1
Definition Node.h:140
@ QueryStage_Versions
Definition Node.h:145
@ QueryStage_None
Definition Node.h:136
@ QueryStage_Configuration
Definition Node.h:154
@ QueryStage_Associations
Definition Node.h:150
void ReadValueFromXML(uint8 const _commandClassId, TiXmlElement const *_valueElement)
Definition Node.cpp:2523
bool IsNodeReset()
Definition Node.cpp:3539
uint32 GetMaxBaudRate() const
Definition Node.h:306
friend class Security
Definition Node.h:92
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
virtual ~Node()
Definition Node.cpp:189
friend class ThermostatOperatingState
Definition Node.h:104
uint8 GetVersion() const
Definition Node.h:307
bool IsListeningDevice() const
Definition Node.h:301
friend class Driver
Definition Node.h:67
friend class AssociationCommandConfiguration
Definition Node.h:73
bool AllQueriesCompleted() const
Definition Node.h:251
bool CreateValueFromXML(uint8 const _commandClassId, TiXmlElement const *_valueElement)
Definition Node.cpp:2476
void ApplicationCommandHandler(uint8 const *_data, bool encrypted)
Definition Node.cpp:1843
void SetNodeOn()
Definition Node.cpp:2119
friend class MeterPulse
Definition Node.h:87
uint8 GetGeneric() const
Definition Node.h:313
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
CommandClass * GetCommandClass(uint8 const _commandClassId) const
Definition Node.cpp:1889
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
void SetNodeOff()
Definition Node.cpp:2134
friend class WakeUp
Definition Node.h:107
void SetSecuredClasses(uint8 const *_data, uint8 const _length)
Definition Node.cpp:1523
bool IsNodeZWavePlus() const
Definition Node.h:249
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
friend class ThermostatFanState
Definition Node.h:102
void SetSecured(bool secure)
Definition Node.cpp:1516
friend class SensorMultilevel
Definition Node.h:95
friend class Version
Definition Node.h:106
friend class MultiInstance
Definition Node.h:88
@ SecurityFlag_OptionalFunctionality
Definition Node.h:292
@ SecurityFlag_RoutingSlave
Definition Node.h:288
@ SecurityFlag_Sensor250ms
Definition Node.h:290
@ SecurityFlag_Sensor1000ms
Definition Node.h:291
@ SecurityFlag_Controller
Definition Node.h:286
@ SecurityFlag_Security
Definition Node.h:285
@ SecurityFlag_BeamCapability
Definition Node.h:289
@ SecurityFlag_SpecificDevice
Definition Node.h:287
string const & GetType() const
Definition Node.h:315
friend class SwitchMultilevel
Definition Node.h:98
uint32 GetNeighbors(uint8 **o_associations)
Definition Node.cpp:821
bool RemoveValue(uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex)
Definition Node.cpp:2600
friend class Manager
Definition Node.h:66
Node::QueryStage GetCurrentQueryStage()
Definition Node.h:207
void SetProtocolInfo(uint8 const *_protocolInfo, uint8 const _length)
Definition Node.cpp:1453
void UpdateNodeInfo(uint8 const *_data, uint8 const _length)
Definition Node.cpp:1631
friend class Protection
Definition Node.h:91
bool IsNodeAlive() const
Definition Node.h:221
void AdvanceQueries()
Definition Node.cpp:239
friend class Value
Definition Node.h:69
friend class ValueButton
Definition Node.h:70
void SetQueryStage(QueryStage const _stage, bool const _advance=true)
Definition Node.cpp:783
void SetNodePlusInfoReceived(const bool _received)
Definition Node.h:253
bool IsSecurityDevice() const
Definition Node.h:305
Implements a platform-independent TimeStamp.
Definition TimeStamp.h:40
Boolean value sent to/received from a node.
Definition ValueBool.h:46
Button value ???.
Definition ValueButton.h:46
Byte value sent to/received from a node.
Definition ValueByte.h:45
Decimal value sent to/received from a node.
Definition ValueDecimal.h:45
ValueType
Definition ValueID.h:86
ValueGenre
Definition ValueID.h:72
Integer value sent to/received from a node.
Definition ValueInt.h:45
Schedule sent to/received from a node.
Definition ValueSchedule.h:45
Short value sent to/received from a node.
Definition ValueShort.h:45
Container that holds all of the values associated with a given node.
Definition ValueStore.h:44
String value sent to/received from a node.
Definition ValueString.h:45
Base class for values associated with a node.
Definition Value.h:48
Definition Bitfield.h:35
struct OpenZWave::InstanceAssociation InstanceAssociation
uint32 m_receivedCnt
Definition Node.h:573
uint32 m_sentCnt
Definition Node.h:572
uint8 m_commandClassId
Definition Node.h:571
Definition Node.h:577
uint32 m_sentCnt
Definition Node.h:578
uint32 m_retries
Definition Node.h:580
uint32 m_receivedUnsolicited
Definition Node.h:583
uint32 m_lastResponseRTT
Definition Node.h:588
uint32 m_lastRequestRTT
Definition Node.h:586
uint32 m_sentFailed
Definition Node.h:579
uint32 m_averageResponseRTT
Definition Node.h:589
uint32 m_receivedDups
Definition Node.h:582
uint32 m_averageRequestRTT
Definition Node.h:587
string m_receivedTS
Definition Node.h:585
string m_sentTS
Definition Node.h:584
list< CommandClassData > m_ccData
Definition Node.h:592
uint8 m_quality
Definition Node.h:590
uint32 m_receivedCnt
Definition Node.h:581
uint8 m_lastReceivedMessage[254]
Definition Node.h:591