| OpenZWave Library 1.6.0

Loading...
Searching...
No Matches
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 | AppendArray (const uint8 *const _data, const uint8 _length)
void | Finalize ()
void | UpdateCallbackId ()
uint8 | GetTargetNodeId () const
| Identifies the Node ID of the "target" node (if any) for this function.
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.
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.
uint8 | GetExpectedCommandClassId () const
| Identifies the expected Command Class ID (if any) for this message.
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.
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.
uint32 | GetLength () const
uint8 * | GetBuffer ()
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)
Driver * | GetDriver () const

## Detailed Description

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

## Member Enumeration Documentation

## ◆ MessageFlags

enum OpenZWave::Msg::MessageFlags

Enumerator
m_MultiChannel |
m_MultiInstance |

## Constructor & Destructor Documentation

## ◆ Msg()

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`
| ) |  |

## ◆ ~Msg()

OpenZWave::Msg::~Msg | ( |  | ) |
| inline

## Member Function Documentation

## ◆ Append()

void Msg::Append | ( | uint8 const | _data | ) |

## ◆ AppendArray()

void Msg::AppendArray | ( | const uint8 *const | _data,
|  | const uint8 | _length
| ) |  |

## ◆ clearNonce()

void OpenZWave::Msg::clearNonce | ( |  | ) |
| inline

## ◆ Finalize()

void Msg::Finalize | ( |  | ) |

## ◆ GetAsString()

string Msg::GetAsString | ( |  | ) |

## ◆ GetBuffer()

uint8 * Msg::GetBuffer | ( |  | ) |

## ◆ GetCallbackId()

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.

## ◆ GetDriver()

Driver * Msg::GetDriver | ( |  | ) | const

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

## ◆ GetExpectedCommandClassId()

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.

## ◆ GetExpectedInstance()

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.

## ◆ GetExpectedReply()

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.

## ◆ GetLength()

uint32 OpenZWave::Msg::GetLength | ( |  | ) | const
| inline

## ◆ GetLogText()

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

Returns
  the LogText used during the constructor

## ◆ GetMaxSendAttempts()

uint8 OpenZWave::Msg::GetMaxSendAttempts | ( |  | ) | const
| inline

## ◆ GetSendAttempts()

uint8 OpenZWave::Msg::GetSendAttempts | ( |  | ) | const
| inline

## ◆ GetSendingCommandClass()

uint8 OpenZWave::Msg::GetSendingCommandClass | ( |  | ) |
| inline

## ◆ GetTargetNodeId()

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.

## ◆ isEncrypted()

bool OpenZWave::Msg::isEncrypted | ( |  | ) |
| inline

## ◆ isNonceRecieved()

bool OpenZWave::Msg::isNonceRecieved | ( |  | ) |
| inline

## ◆ IsNoOperation()

bool OpenZWave::Msg::IsNoOperation | ( |  | ) |
| inline

## ◆ IsWakeUpNoMoreInformationCommand()

bool OpenZWave::Msg::IsWakeUpNoMoreInformationCommand | ( |  | ) |
| inline

## ◆ operator==()

bool OpenZWave::Msg::operator== | ( | Msg const & | _other | ) | const
| inline

## ◆ setEncrypted()

void OpenZWave::Msg::setEncrypted | ( |  | ) |
| inline

## ◆ SetHomeId()

void OpenZWave::Msg::SetHomeId | ( | uint32 | homeId | ) |
| inline

## ◆ SetInstance()

void Msg::SetInstance | ( | CommandClass * | _cc,
|  | uint8 const | _instance
| ) |  |

## ◆ SetMaxSendAttempts()

void OpenZWave::Msg::SetMaxSendAttempts | ( | uint8 | _count | ) |
| inline

## ◆ setNonce()

void OpenZWave::Msg::setNonce | ( | uint8 | nonce[8] | ) |
| inline

## ◆ SetSendAttempts()

void OpenZWave::Msg::SetSendAttempts | ( | uint8 | _count | ) |
| inline

## ◆ UpdateCallbackId()

void Msg::UpdateCallbackId | ( |  | ) |

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

- Msg.h
- Msg.cpp