OpenZWave Library  1.4.3190
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
OpenZWave::CommandClass Class Referenceabstract

Base class for all Z-Wave command classes. More...

#include <CommandClass.h>

+ Inheritance diagram for OpenZWave::CommandClass:

Classes

struct  RefreshValue
 

Public Types

enum  { RequestFlag_Static = 0x00000001, RequestFlag_Session = 0x00000002, RequestFlag_Dynamic = 0x00000004, RequestFlag_AfterMark = 0x00000008 }
 
enum  StaticRequest { StaticRequest_Instances = 0x01, StaticRequest_Values = 0x02, StaticRequest_Version = 0x04 }
 
typedef struct OpenZWave::CommandClass::RefreshValue RefreshValue
 

Public Member Functions

 CommandClass (uint32 const _homeId, uint8 const _nodeId)
 
virtual ~CommandClass ()
 
virtual void ReadXML (TiXmlElement const *_ccElement)
 
virtual void WriteXML (TiXmlElement *_ccElement)
 
virtual bool RequestState (uint32 const _requestFlags, uint8 const _instance, Driver::MsgQueue const _queue)
 
virtual bool RequestValue (uint32 const _requestFlags, uint8 const _index, uint8 const _instance, Driver::MsgQueue const _queue)
 
virtual uint8 const GetCommandClassId () const =0
 
virtual string const GetCommandClassName () const =0
 
virtual bool HandleMsg (uint8 const *_data, uint32 const _length, uint32 const _instance=1)=0
 
virtual bool SetValue (Value const &_value)
 
virtual void SetValueBasic (uint8 const _instance, uint8 const _level)
 
virtual void SetVersion (uint8 const _version)
 
bool RequestStateForAllInstances (uint32 const _requestFlags, Driver::MsgQueue const _queue)
 
bool CheckForRefreshValues (Value const *_value)
 
virtual uint8 GetMaxVersion ()
 
uint8 GetVersion () const
 
Bitfield const * GetInstances () const
 
uint32 GetHomeId () const
 
uint8 GetNodeId () const
 
DriverGetDriver () const
 
NodeGetNodeUnsafe () const
 
ValueGetValue (uint8 const _instance, uint8 const _index)
 
bool RemoveValue (uint8 const _instance, uint8 const _index)
 
uint8 GetEndPoint (uint8 const _instance)
 
uint8 GetInstance (uint8 const _endPoint)
 
void SetInstances (uint8 const _instances)
 
void SetInstance (uint8 const _endPoint)
 
void SetAfterMark ()
 
void SetEndPoint (uint8 const _instance, uint8 const _endpoint)
 
bool IsAfterMark () const
 
bool IsCreateVars () const
 
bool IsGetSupported () const
 
bool IsSecured () const
 
void SetSecured ()
 
bool IsSecureSupported () const
 
void ClearSecureSupport ()
 
void SetSecureSupport ()
 
void SetInNIF ()
 
bool IsInNIF ()
 
string ExtractValue (uint8 const *_data, uint8 *_scale, uint8 *_precision, uint8 _valueOffset=1) const
 
void AppendValue (Msg *_msg, string const &_value, uint8 const _scale) const
 
uint8 const GetAppendValueSize (string const &_value) const
 
int32 ValueToInteger (string const &_value, uint8 *o_precision, uint8 *o_size) const
 
void UpdateMappedClass (uint8 const _instance, uint8 const _classId, uint8 const _value)
 
virtual void CreateVars (uint8 const _instance, uint8 const _index)
 
bool HasStaticRequest (uint8 _request) const
 
void SetStaticRequest (uint8 _request)
 
void ClearStaticRequest (uint8 _request)
 
uint32 GetSentCnt () const
 
uint32 GetReceivedCnt () const
 
void SentCntIncr ()
 
void ReceivedCntIncr ()
 

Protected Member Functions

virtual void CreateVars (uint8 const _instance)
 
void ReadValueRefreshXML (TiXmlElement const *_ccElement)
 

Detailed Description

Base class for all Z-Wave command classes.

Member Typedef Documentation

Member Enumeration Documentation

anonymous enum
Enumerator
RequestFlag_Static 

Values that never change.

RequestFlag_Session 

Values that change infrequently, and so only need to be requested at start up, or via a manual refresh.

RequestFlag_Dynamic 

Values that change and will be requested if polling is enabled on the node.

RequestFlag_AfterMark 

Values relevent to Controlling CC, not Controlled CC.

Enumerator
StaticRequest_Instances 
StaticRequest_Values 
StaticRequest_Version 

Constructor & Destructor Documentation

CommandClass::CommandClass ( uint32 const  _homeId,
uint8 const  _nodeId 
)
CommandClass::~CommandClass ( )
virtual

Member Function Documentation

void CommandClass::AppendValue ( Msg _msg,
string const &  _value,
uint8 const  _scale 
) const

Append a floating-point value to a message.

Parameters
_msgThe message to which the value should be appended.
_valueA string containing a decimal number to be appended.
_scaleA byte indicating the scale corresponding to this value (e.g., 1=F and 0=C for temperatures).
See also
Msg
bool CommandClass::CheckForRefreshValues ( Value const *  _value)
void OpenZWave::CommandClass::ClearSecureSupport ( )
inline
void CommandClass::ClearStaticRequest ( uint8  _request)
virtual void OpenZWave::CommandClass::CreateVars ( uint8 const  _instance)
inlineprotectedvirtual
virtual void OpenZWave::CommandClass::CreateVars ( uint8 const  _instance,
uint8 const  _index 
)
inlinevirtual

Reimplemented in OpenZWave::ThermostatSetpoint.

string CommandClass::ExtractValue ( uint8 const *  _data,
uint8 _scale,
uint8 _precision,
uint8  _valueOffset = 1 
) const
uint8 const CommandClass::GetAppendValueSize ( string const &  _value) const
virtual uint8 const OpenZWave::CommandClass::GetCommandClassId ( ) const
pure virtual
virtual string const OpenZWave::CommandClass::GetCommandClassName ( ) const
pure virtual
Driver * CommandClass::GetDriver ( ) const
uint8 OpenZWave::CommandClass::GetEndPoint ( uint8 const  _instance)
inline
uint32 OpenZWave::CommandClass::GetHomeId ( ) const
inline
uint8 OpenZWave::CommandClass::GetInstance ( uint8 const  _endPoint)
inline
Bitfield const* OpenZWave::CommandClass::GetInstances ( ) const
inline
virtual uint8 OpenZWave::CommandClass::GetMaxVersion ( )
inlinevirtual
uint8 OpenZWave::CommandClass::GetNodeId ( ) const
inline
Node * CommandClass::GetNodeUnsafe ( ) const
uint32 OpenZWave::CommandClass::GetReceivedCnt ( ) const
inline
uint32 OpenZWave::CommandClass::GetSentCnt ( ) const
inline
Value * CommandClass::GetValue ( uint8 const  _instance,
uint8 const  _index 
)
uint8 OpenZWave::CommandClass::GetVersion ( ) const
inline
virtual bool OpenZWave::CommandClass::HandleMsg ( uint8 const *  _data,
uint32 const  _length,
uint32 const  _instance = 1 
)
pure virtual
bool OpenZWave::CommandClass::HasStaticRequest ( uint8  _request) const
inline
bool OpenZWave::CommandClass::IsAfterMark ( ) const
inline
bool OpenZWave::CommandClass::IsCreateVars ( ) const
inline
bool OpenZWave::CommandClass::IsGetSupported ( ) const
inline
bool OpenZWave::CommandClass::IsInNIF ( )
inline
bool OpenZWave::CommandClass::IsSecured ( ) const
inline
bool OpenZWave::CommandClass::IsSecureSupported ( ) const
inline
void CommandClass::ReadValueRefreshXML ( TiXmlElement const *  _ccElement)
protected
void CommandClass::ReadXML ( TiXmlElement const *  _ccElement)
virtual
void OpenZWave::CommandClass::ReceivedCntIncr ( )
inline
bool CommandClass::RemoveValue ( uint8 const  _instance,
uint8 const  _index 
)
virtual bool OpenZWave::CommandClass::RequestState ( uint32 const  _requestFlags,
uint8 const  _instance,
Driver::MsgQueue const  _queue 
)
inlinevirtual
bool CommandClass::RequestStateForAllInstances ( uint32 const  _requestFlags,
Driver::MsgQueue const  _queue 
)
virtual bool OpenZWave::CommandClass::RequestValue ( uint32 const  _requestFlags,
uint8 const  _index,
uint8 const  _instance,
Driver::MsgQueue const  _queue 
)
inlinevirtual
void OpenZWave::CommandClass::SentCntIncr ( )
inline
void OpenZWave::CommandClass::SetAfterMark ( )
inline
void OpenZWave::CommandClass::SetEndPoint ( uint8 const  _instance,
uint8 const  _endpoint 
)
inline
void OpenZWave::CommandClass::SetInNIF ( )
inline
void CommandClass::SetInstance ( uint8 const  _endPoint)
void CommandClass::SetInstances ( uint8 const  _instances)
void OpenZWave::CommandClass::SetSecured ( )
inline
void OpenZWave::CommandClass::SetSecureSupport ( )
inline
void OpenZWave::CommandClass::SetStaticRequest ( uint8  _request)
inline
virtual bool OpenZWave::CommandClass::SetValue ( Value const &  _value)
inlinevirtual
virtual void OpenZWave::CommandClass::SetValueBasic ( uint8 const  _instance,
uint8 const  _level 
)
inlinevirtual
virtual void OpenZWave::CommandClass::SetVersion ( uint8 const  _version)
inlinevirtual
void CommandClass::UpdateMappedClass ( uint8 const  _instance,
uint8 const  _classId,
uint8 const  _value 
)
int32 CommandClass::ValueToInteger ( string const &  _value,
uint8 o_precision,
uint8 o_size 
) const
void CommandClass::WriteXML ( TiXmlElement *  _ccElement)
virtual

The documentation for this class was generated from the following files: