Collection of utility functions related to message handling.
More...
#include <messageutil.hpp>
Collection of utility functions related to message handling.
◆ buildPtrReplyTo()
template<class _T >
static shared_ptr< _T > kanzi::connect::MessageUtil::buildPtrReplyTo |
( |
const MessagePackage & | source | ) |
|
|
inlinestatic |
Builds a reply message to the provided message package.
- Parameters
-
source | The message package. |
- Returns
- The allocated message.
◆ buildReplyTo() [1/2]
template<class _T >
static _T kanzi::connect::MessageUtil::buildReplyTo |
( |
const MessagePackage & | source | ) |
|
|
inlinestatic |
Builds a reply message to provided package.
- Parameters
-
source | source message package. |
- Returns
- new message - passed by value.
◆ buildReplyTo() [2/2]
template<class _T >
static void kanzi::connect::MessageUtil::buildReplyTo |
( |
const MessagePackage & | source, |
|
|
_T & | messageObject ) |
|
inlinestatic |
Builds a reply message to the provided package.
- Parameters
-
source | Source message package. |
messageObject | Target message object. |
◆ matchEventToMessage()
static bool kanzi::connect::MessageUtil::matchEventToMessage |
( |
const string & | service, |
|
|
const string & | eventname, |
|
|
const MessagePackage & | package ) |
|
static |
Matches an event name (as written to xml interface definition) into a message package.
- Parameters
-
service | The name of the service. For example, "Media". |
eventname | The name of the event as it is written to XML. For example, "play_state_changed" |
package | The message in package to match. |
- Returns
- If the event name matches a message package, true, otherwise false.
◆ matchMethodToMessage()
static bool kanzi::connect::MessageUtil::matchMethodToMessage |
( |
const string & | service, |
|
|
const string & | methodname, |
|
|
const MessagePackage & | package ) |
|
static |
Matches a method name (as written to xml interface definition) into a message package.
- Parameters
-
service | The name of the service. For example, "Media". |
methodname | The name of the method as it is written to XML. For example, "play_track". |
package | The message in package to match. |
- Returns
- If the method name matches a message package, true, otherwise false.
◆ matchPropertySetterToMessage()
static bool kanzi::connect::MessageUtil::matchPropertySetterToMessage |
( |
const string & | service, |
|
|
const string & | pathtodata, |
|
|
const MessagePackage & | package ) |
|
static |
Matches a write request to a writable service property into a message package.
- Parameters
-
service | The name of the service. For example, "Cluster". |
pathtodata | Dotted path to data to be written. For example, "Engine.gear". |
package | The message in package to match. |
- Returns
- If the write reques matches a message package, true, otherwise false.
◆ packageMessage() [1/2]
Inserts a given message inside a message package.
- Parameters
-
message | The message to insert into the package |
- Returns
- Packaged message returned by value.
◆ packageMessage() [2/2]
Inserts a given message inside a given message package.
- Parameters
-
message | The message to incsert into the package. |
to | The package container into which to insert the message. |
The documentation for this class was generated from the following file: