263 void SetStaticRequests();
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;
315 string const&
GetType()
const{
return m_type; }
317 bool IsController()
const{
return ( m_basic == 0x01 || m_basic == 0x02 ) && ( m_generic == 0x01 || m_generic == 0x02 ); }
324 bool m_frequentListening;
336 uint8 m_neighbors[29];
337 uint8 m_numRouteNodes;
338 uint8 m_routeNodes[5];
339 map<uint8,uint8> m_buttonMap;
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; }
354 uint16 GetManufacturerId()
const{
return m_manufacturerId; }
356 uint16 GetProductType()
const{
return m_productType; }
358 uint16 GetProductId()
const{
return m_productId; }
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 );
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; }
369 string m_manufacturerName;
370 string m_productName;
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();
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 );
434 map<uint8,CommandClass*> m_commandClassMap;
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 );
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 );
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 );
478 ValueStore* GetValueStore()
const{
return m_values; }
486 bool SetConfigParam(
uint8 const _param,
int32 _value,
uint8 const _size );
487 void RequestConfigParam(
uint8 const _param );
488 bool RequestAllConfigParams(
uint32 const _requestFlags );
494 bool RequestDynamicValues();
500 uint8 GetNumGroups();
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();
511 void AddGroup(
Group* _group );
512 void WriteGroups( TiXmlElement* _associationsElement );
514 map<uint8,Group*> m_groups;
524 DeviceClass( TiXmlElement
const* _el );
525 ~DeviceClass(){
delete [] m_mandatoryCommandClasses; }
527 uint8 const* GetMandatoryCommandClasses(){
return m_mandatoryCommandClasses; }
528 uint8 GetBasicMapping(){
return m_basicMapping; }
529 string const& GetLabel(){
return m_label; }
532 uint8* m_mandatoryCommandClasses;
533 uint8 m_basicMapping;
538 class GenericDeviceClass :
public DeviceClass
541 GenericDeviceClass( TiXmlElement
const* _el );
542 ~GenericDeviceClass();
544 DeviceClass* GetSpecificDeviceClass(
uint8 const& _specific );
547 map<uint8,DeviceClass*> m_specificDeviceClasses;
551 bool SetDeviceClasses(
uint8 const _basic,
uint8 const _generic,
uint8 const _specific );
552 bool SetPlusDeviceClasses(
uint8 const _role,
uint8 const _nodeType,
uint16 const _deviceType );
553 bool AddMandatoryCommandClasses(
uint8 const* _commandClasses );
554 void ReadDeviceClasses();
555 string GetEndPointDeviceClassLabel(
uint8 const _generic,
uint8 const _specific );
557 static bool s_deviceClassesLoaded;
558 static map<uint8,string> s_basicDeviceClasses;
559 static map<uint8,GenericDeviceClass*> s_genericDeviceClasses;
560 static map<uint8,DeviceClass*> s_roleDeviceClasses;
561 static map<uint16,DeviceClass*> s_deviceTypeClasses;
562 static map<uint8, DeviceClass*> s_nodeTypes;
596 void GetNodeStatistics(
NodeData* _data );
603 uint32 m_receivedUnsolicited;
608 uint32 m_averageRequestRTT;
609 uint32 m_averageResponseRTT;
611 uint8 m_lastReceivedMessage[254];
624 uint8 m_nonces[8][8];
Implements COMMAND_CLASS_SWITCH_BINARY (0x25), a Z-Wave device command class.
Definition: SwitchBinary.h:39
Implements COMMAND_CLASS_INDICATOR (0x87), a Z-Wave device command class.
Definition: Indicator.h:39
bool IsAddingNode() const
Definition: Node.h:318
Implements COMMAND_CLASS_ASSOCIATION (0x85), a Z-Wave device command class.
Definition: Association.h:38
bool IsFrequentListeningDevice() const
Definition: Node.h:302
Implements COMMAND_CLASS_THERMOSTAT_FAN_MODE (0x44), a Z-Wave device command class.
Definition: ThermostatFanMode.h:42
string const & GetType() const
Definition: Node.h:315
Implements COMMAND_CLASS_ASSOCIATION_COMMAND_CONFIGURATION (0x9b), a Z-Wave device command class...
Definition: AssociationCommandConfiguration.h:42
Definition: Bitfield.h:34
void QueryStageRetry(QueryStage const _stage, uint8 const _maxAttempts=0)
Definition: Node.cpp:744
Container that holds all of the values associated with a given node.
Definition: ValueStore.h:43
uint32 m_lastResponseRTT
Definition: Node.h:588
void SetProtocolInfo(uint8 const *_protocolInfo, uint8 const _length)
Definition: Node.cpp:1447
uint32 m_receivedCnt
Definition: Node.h:573
bool AllQueriesCompleted() const
Definition: Node.h:251
Definition: Security.h:63
ValueID CreateValueID(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, ValueID::ValueType const _type)
Definition: Node.cpp:2143
Implements COMMAND_CLASS_MANUFACTURER_SPECIFIC (0x72), a Z-Wave device command class.
Definition: ManufacturerSpecific.h:38
uint32 m_sentFailed
Definition: Node.h:579
unsigned short uint16
Definition: Defs.h:77
ValueType
Definition: ValueID.h:85
bool CreateValueDecimal(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, string const &_default, uint8 const _pollIntensity)
Definition: Node.cpp:2245
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:2594
Implements COMMAND_CLASS_THERMOSTAT_SETPOINT (0x43), a Z-Wave device command class.
Definition: ThermostatSetpoint.h:41
void SetSecured(bool secure)
Definition: Node.cpp:1510
Implements COMMAND_CLASS_WAKE_UP (0x84), a Z-Wave device command class.
Definition: WakeUp.h:43
The main public interface to OpenZWave.
Definition: Manager.h:109
string GetQueryStageName(QueryStage const _stage)
Definition: Node.cpp:803
bool NodeInfoReceived() const
Definition: Node.h:248
Implements COMMAND_CLASS_SENSOR_ALARM (0x9c), a Z-Wave device command class.
Definition: SensorAlarm.h:41
bool CreateValueList(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, uint8 const _size, vector< ValueList::Item > const &_items, int32 const _default, uint8 const _pollIntensity)
Definition: Node.cpp:2305
CommandClass * GetCommandClass(uint8 const _commandClassId) const
Definition: Node.cpp:1883
uint32 GetNeighbors(uint8 **o_associations)
Definition: Node.cpp:815
bool ProtocolInfoReceived() const
Definition: Node.h:247
Implements COMMAND_CLASS_LOCK (0x76), a Z-Wave device command class.
Definition: Lock.h:39
Implements COMMAND_CLASS_SENSOR_BINARY (0x30), a Z-Wave device command class.
Definition: SensorBinary.h:39
QueryStage
Definition: Node.h:134
bool IsSecurityDevice() const
Definition: Node.h:305
void ClearAddingNode()
Definition: Node.h:320
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:2517
void SetNodeAlive(bool const _isAlive)
Definition: Node.cpp:1720
void SetSecuredClasses(uint8 const *_data, uint8 const _length)
Definition: Node.cpp:1517
Implements COMMAND_CLASS_METER (0x32), a Z-Wave device command class.
Definition: Meter.h:39
uint8 GetVersion() const
Definition: Node.h:307
uint8 m_commandClassId
Definition: Node.h:571
The Node class describes a Z-Wave node object...typically a device on the Z-Wave network.
Definition: Node.h:64
bool IsNodeAlive() const
Definition: Node.h:221
Implements COMMAND_CLASS_ALARM (0x71), a Z-Wave device command class.
Definition: Alarm.h:39
void QueryStageComplete(QueryStage const _stage)
Definition: Node.cpp:716
list< CommandClassData > m_ccData
Definition: Node.h:592
Base class for all Z-Wave command classes.
Definition: CommandClass.h:46
bool IsController() const
Definition: Node.h:317
bool CreateValueByte(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, uint8 const _default, uint8 const _pollIntensity)
Definition: Node.cpp:2215
uint8 * GetNonceKey(uint32 nonceid)
Definition: Node.cpp:3440
Implements COMMAND_CLASS_SWITCH_TOGGLE_BINARY (0x28), a Z-Wave device command class.
Definition: SwitchToggleBinary.h:39
uint8 GetSecurity() const
Definition: Node.h:308
string m_sentTS
Definition: Node.h:584
signed short int16
Definition: Defs.h:76
bool IsNodeReset()
Definition: Node.cpp:3511
virtual ~Node()
Definition: Node.cpp:189
Implements COMMAND_CLASS_CLIMATE_CONTROL_SCHEDULE (0x46), a Z-Wave device command class...
Definition: ClimateControlSchedule.h:41
bool CreateValueBool(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, bool const _default, uint8 const _pollIntensity)
Definition: Node.cpp:2159
Implements COMMAND_CLASS_THERMOSTAT_MODE (0x40), a Z-Wave device command class.
Definition: ThermostatMode.h:42
string m_receivedTS
Definition: Node.h:585
The Driver class handles communication between OpenZWave and a device attached via a serial port (typ...
Definition: Driver.h:58
signed int int32
Definition: Defs.h:79
void SetNodePlusInfoReceived(const bool _received)
Definition: Node.h:253
unsigned int uint32
Definition: Defs.h:80
void SetNodeOn()
Definition: Node.cpp:2113
uint32 m_sentCnt
Definition: Node.h:578
uint32 m_sentCnt
Definition: Node.h:572
Manages a group of devices (various nodes associated with each other).
Definition: Group.h:49
Implements COMMAND_CLASS_HAIL (0x82), a Z-Wave device command class.
Definition: Hail.h:37
void RemoveValueList(ValueList *_value)
Definition: Node.cpp:2457
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:2337
void AdvanceQueries()
Definition: Node.cpp:239
bool CreateValueFromXML(uint8 const _commandClassId, TiXmlElement const *_valueElement)
Definition: Node.cpp:2470
uint32 m_averageResponseRTT
Definition: Node.h:589
Implements COMMAND_CLASS_SWITCH_MULTILEVEL (0x26), a Z-Wave device command class. ...
Definition: SwitchMultilevel.h:41
uint32 GetMaxBaudRate() const
Definition: Node.h:306
void ApplicationCommandHandler(uint8 const *_data, bool encrypted)
Definition: Node.cpp:1837
void SetLevel(uint8 const _level)
Definition: Node.cpp:2091
void SetQueryStage(QueryStage const _stage, bool const _advance=true)
Definition: Node.cpp:777
uint32 m_lastRequestRTT
Definition: Node.h:586
void UpdateNodeInfo(uint8 const *_data, uint8 const _length)
Definition: Node.cpp:1625
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:310
bool CreateValueSchedule(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, uint8 const _pollIntensity)
Definition: Node.cpp:2368
bool IsBeamingDevice() const
Definition: Node.h:303
void SetAddingNode()
Definition: Node.h:319
bool IsNodeZWavePlus() const
Definition: Node.h:249
uint32 m_averageRequestRTT
Definition: Node.h:587
bool CreateValueString(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, string const &_default, uint8 const _pollIntensity)
Definition: Node.cpp:2427
Implements COMMAND_CLASS_BATTERY (0x80), a Z-Wave device command class.
Definition: Battery.h:39
Implements COMMAND_CLASS_SWITCH_ALL (0x27), a Z-Wave device command class.
Definition: SwitchAll.h:39
Node(uint32 const _homeId, uint8 const _nodeId)
Definition: Node.cpp:120
Node::QueryStage GetCurrentQueryStage()
Definition: Node.h:207
uint32 m_receivedUnsolicited
Definition: Node.h:583
uint8 * GenerateNonceKey()
Definition: Node.cpp:3422
Implements COMMAND_CLASS_CLOCK (0x81), a Z-Wave device command class.
Definition: Clock.h:40
Implements COMMAND_CLASS_SWITCH_TOGGLE_MULTILEVEL (0x29), a Z-Wave device command class...
Definition: SwitchToggleMultilevel.h:39
Implements COMMAND_CLASS_THERMOSTAT_OPERATING_STATE (0x42), a Z-Wave device command class...
Definition: ThermostatOperatingState.h:42
uint32 m_receivedCnt
Definition: Node.h:581
Implements COMMAND_CLASS_ENERGY_PRODUCTION (0x90), a Z-Wave device command class. ...
Definition: EnergyProduction.h:39
Implements COMMAND_CLASS_MULTI_INSTANCE (0x60), a Z-Wave device command class.
Definition: MultiInstance.h:38
Implements COMMAND_CLASS_LANGUAGE (0x89), a Z-Wave device command class.
Definition: Language.h:39
Implements a platform-independent TimeStamp.
Definition: TimeStamp.h:39
Base class for values associated with a node.
Definition: Value.h:47
uint8 GetGeneric() const
Definition: Node.h:313
Implements COMMAND_CLASS_ZWAVE_PLUS_INFO (0x5E), a Z-Wave device command class.
Definition: ZWavePlusInfo.h:37
Implements COMMAND_CLASS_VERSION (0x86), a Z-Wave device command class.
Definition: Version.h:39
void UpdateProtocolInfo(uint8 const *_data)
Definition: Node.cpp:1348
Implements COMMAND_CLASS_NODE_NAMING (0x77), a Z-Wave device command class.
Definition: NodeNaming.h:37
uint32 m_retries
Definition: Node.h:580
bool IsRoutingDevice() const
Definition: Node.h:304
Implements COMMAND_CLASS_SENSOR_MULTILEVEL (0x31), a Z-Wave device command class. ...
Definition: SensorMultilevel.h:39
void SetNodeOff()
Definition: Node.cpp:2128
Implements COMMAND_CLASS_CONTROLLER_REPLICATION (0x21), a Z-Wave device command class.
Definition: ControllerReplication.h:37
bool IsListeningDevice() const
Definition: Node.h:301
Implements COMMAND_CLASS_MULTI_INSTANCE_ASSOCIATION (0x8E), a Z-Wave device command class...
Definition: MultiInstanceAssociation.h:39
Implements COMMAND_CLASS_BASIC (0x20), a Z-Wave device command class.
Definition: Basic.h:39
Value * GetValue(ValueID const &_id)
Definition: Node.cpp:2563
uint8 GetBasic() const
Definition: Node.h:312
ValueGenre
Definition: ValueID.h:71
uint32 m_receivedDups
Definition: Node.h:582
bool CreateValueButton(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const &_label, uint8 const _pollIntensity)
Definition: Node.cpp:2189
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:2275
uint8 m_quality
Definition: Node.h:590
bool CreateValueShort(ValueID::ValueGenre const _genre, uint8 const _commandClassId, uint8 const _instance, uint8 const _valueIndex, string const &_label, string const &_units, bool const _readOnly, bool const _writeOnly, int16 const _default, uint8 const _pollIntensity)
Definition: Node.cpp:2397
List of values sent to/received from a node.
Definition: ValueList.h:45
uint8 GetSpecific() const
Definition: Node.h:314
unsigned char uint8
Definition: Defs.h:74