OpenZWave Library  1.4.3190
Public Types | Public Member Functions | List of all members
OpenZWave::Msg Class Reference

Message object to be passed to and from devices on the Z-Wave network. More...

#include <Msg.h>

Public Types

enum  MessageFlags { m_MultiChannel = 0x01, m_MultiInstance = 0x02 }
 

Public Member Functions

 Msg (string const &_logtext, uint8 _targetNodeId, uint8 const _msgType, uint8 const _function, bool const _bCallbackRequired, bool const _bReplyRequired=true, uint8 const _expectedReply=0, uint8 const _expectedCommandClassId=0)
 
 ~Msg ()
 
void SetInstance (CommandClass *_cc, uint8 const _instance)
 
void Append (uint8 const _data)
 
void Finalize ()
 
void UpdateCallbackId ()
 
uint8 GetTargetNodeId () const
 Identifies the Node ID of the "target" node (if any) for this function. More...
 
uint8 GetCallbackId () const
 Identifies the Callback ID (if any) for this message. Callback ID is a value (OpenZWave uses sequential IDs) that helps the application associate message responses with the original message request. More...
 
uint8 GetExpectedReply () const
 Identifies the expected reply type (if any) for this message. The expected reply is a function code...one of the FUNC_ID... values defined in Defs.h. Many Z-Wave functions generate responses with the same function code (for example, a FUNC_ID_ZW_GET_VERSION message generates a FUNC_ID_ZW_GET_VERSION response. But other functions generate a different response. FUNC_ID_ZW_SEND_DATA triggers several responses, but ultimately, a "Get" sent with this function should result in a FUNC_ID_APPLICATION_COMMAND_HANDLER response. More...
 
uint8 GetExpectedCommandClassId () const
 Identifies the expected Command Class ID (if any) for this message. More...
 
uint8 GetExpectedInstance () const
 For messages that request a Report for a specified command class, identifies the expected Instance for the variable being obtained in the report. More...
 
string GetLogText () const
 For messages that request a Report for a specified command class, identifies the expected Index for the variable being obtained in the report. More...
 
uint32 GetLength () const
 
uint8GetBuffer ()
 
string GetAsString ()
 
uint8 GetSendAttempts () const
 
void SetSendAttempts (uint8 _count)
 
uint8 GetMaxSendAttempts () const
 
void SetMaxSendAttempts (uint8 _count)
 
bool IsWakeUpNoMoreInformationCommand ()
 
bool IsNoOperation ()
 
bool operator== (Msg const &_other) const
 
uint8 GetSendingCommandClass ()
 
bool isEncrypted ()
 
void setEncrypted ()
 
bool isNonceRecieved ()
 
void setNonce (uint8 nonce[8])
 
void clearNonce ()
 
void SetHomeId (uint32 homeId)
 
DriverGetDriver () const
 

Detailed Description

Message object to be passed to and from devices on the Z-Wave network.

Member Enumeration Documentation

Enumerator
m_MultiChannel 
m_MultiInstance 

Constructor & Destructor Documentation

Msg::Msg ( string const &  _logtext,
uint8  _targetNodeId,
uint8 const  _msgType,
uint8 const  _function,
bool const  _bCallbackRequired,
bool const  _bReplyRequired = true,
uint8 const  _expectedReply = 0,
uint8 const  _expectedCommandClassId = 0 
)
OpenZWave::Msg::~Msg ( )
inline

Member Function Documentation

void Msg::Append ( uint8 const  _data)
void OpenZWave::Msg::clearNonce ( )
inline
void Msg::Finalize ( )
string Msg::GetAsString ( )
uint8 * Msg::GetBuffer ( )
uint8 OpenZWave::Msg::GetCallbackId ( ) const
inline

Identifies the Callback ID (if any) for this message. Callback ID is a value (OpenZWave uses sequential IDs) that helps the application associate message responses with the original message request.

Returns
Callback ID for this message.
Driver * Msg::GetDriver ( ) const

Returns a pointer to the driver (interface with a Z-Wave controller) associated with this node.

uint8 OpenZWave::Msg::GetExpectedCommandClassId ( ) const
inline

Identifies the expected Command Class ID (if any) for this message.

Returns
Expected command class ID for this message.
uint8 OpenZWave::Msg::GetExpectedInstance ( ) const
inline

For messages that request a Report for a specified command class, identifies the expected Instance for the variable being obtained in the report.

Returns
Expected Instance value for this message.
uint8 OpenZWave::Msg::GetExpectedReply ( ) const
inline

Identifies the expected reply type (if any) for this message. The expected reply is a function code...one of the FUNC_ID... values defined in Defs.h. Many Z-Wave functions generate responses with the same function code (for example, a FUNC_ID_ZW_GET_VERSION message generates a FUNC_ID_ZW_GET_VERSION response. But other functions generate a different response. FUNC_ID_ZW_SEND_DATA triggers several responses, but ultimately, a "Get" sent with this function should result in a FUNC_ID_APPLICATION_COMMAND_HANDLER response.

Returns
Expected reply (function code) for this message.
uint32 OpenZWave::Msg::GetLength ( ) const
inline
string OpenZWave::Msg::GetLogText ( ) const
inline

For messages that request a Report for a specified command class, identifies the expected Index for the variable being obtained in the report.

Returns
Expected Index value for this message. get the LogText Associated with this message
the LogText used during the constructor
uint8 OpenZWave::Msg::GetMaxSendAttempts ( ) const
inline
uint8 OpenZWave::Msg::GetSendAttempts ( ) const
inline
uint8 OpenZWave::Msg::GetSendingCommandClass ( )
inline
uint8 OpenZWave::Msg::GetTargetNodeId ( ) const
inline

Identifies the Node ID of the "target" node (if any) for this function.

Returns
Node ID of the target.
bool OpenZWave::Msg::isEncrypted ( )
inline
bool OpenZWave::Msg::isNonceRecieved ( )
inline
bool OpenZWave::Msg::IsNoOperation ( )
inline
bool OpenZWave::Msg::IsWakeUpNoMoreInformationCommand ( )
inline
bool OpenZWave::Msg::operator== ( Msg const &  _other) const
inline
void OpenZWave::Msg::setEncrypted ( )
inline
void OpenZWave::Msg::SetHomeId ( uint32  homeId)
inline
void Msg::SetInstance ( CommandClass _cc,
uint8 const  _instance 
)
void OpenZWave::Msg::SetMaxSendAttempts ( uint8  _count)
inline
void OpenZWave::Msg::setNonce ( uint8  nonce[8])
inline
void OpenZWave::Msg::SetSendAttempts ( uint8  _count)
inline
void Msg::UpdateCallbackId ( )

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