Messaging Server#

API and Callbacks for the friendly-name Component.

Silicon Labs implementation of the Messaging server cluster. This component serves up messages in its table to clients that request them. This component requires extending to populate the message table with messages.

Modules#

EmberAfPluginMessagingServerMessage

API#

bool
emberAfPluginMessagingServerGetMessage(uint8_t endpoint, EmberAfPluginMessagingServerMessage *message)

Get the message used by the messaging server plugin.

void
emberAfPluginMessagingServerSetMessage(uint8_t endpoint, const EmberAfPluginMessagingServerMessage *message)

Set the message used by the Messaging server plugin.

void
emberAfPluginMessagingServerDisplayMessage(EmberNodeId nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint)

Get the message used by the messaging server plugin.

void
emberAfPluginMessagingServerCancelMessage(EmberNodeId nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint)

Get the message used by the messaging server plugin.

API Documentation#

emberAfPluginMessagingServerGetMessage#

bool emberAfPluginMessagingServerGetMessage (uint8_t endpoint, EmberAfPluginMessagingServerMessage * message)

Get the message used by the messaging server plugin.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/Aendpoint

The relevant endpoint.

EmberAfPluginMessagingServerMessage *N/Amessage

The EmberAfPluginMessagingServerMessage structure describing the message.

This function gets the message and metadata that the plugin sends to clients. For "start now" messages that are current or scheduled, the duration is adjusted to reflect how many minutes remain for the message. Otherwise, the start time and duration of "start now" messages reflect the actual start and the original duration.

Returns

  • True if the message is valid or false is the message does not exist or is expired.


emberAfPluginMessagingServerSetMessage#

void emberAfPluginMessagingServerSetMessage (uint8_t endpoint, const EmberAfPluginMessagingServerMessage * message)

Set the message used by the Messaging server plugin.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/Aendpoint

The relevant endpoint.

const EmberAfPluginMessagingServerMessage *N/Amessage

The EmberAfPluginMessagingServerMessage structure describing the message. If NULL, the message is removed from the server.

This function sets the message and metadata that the plugin will send to clients. Setting the start time to zero instructs clients to start the message now. For "start now" messages, the plugin will automatically adjust the duration reported to clients based on the original start time of the message.


emberAfPluginMessagingServerDisplayMessage#

void emberAfPluginMessagingServerDisplayMessage (EmberNodeId nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint)

Get the message used by the messaging server plugin.

Parameters
TypeDirectionArgument NameDescription
EmberNodeIdN/AnodeId

The relevant endpoint.

uint8_tN/AsrcEndpoint

The EmberAfPluginMessagingServerMessage structure describing the message.

uint8_tN/AdstEndpoint

This function gets the message and metadata that the plugin sends to clients. For "start now" messages that are current or scheduled, the duration is adjusted to reflect how many minutes remain for the message. Otherwise, the start time and duration of "start now" messages reflect the actual start and the original duration.

Returns

  • True if the message is valid or false is the message does not exist or is expired.


emberAfPluginMessagingServerCancelMessage#

void emberAfPluginMessagingServerCancelMessage (EmberNodeId nodeId, uint8_t srcEndpoint, uint8_t dstEndpoint)

Get the message used by the messaging server plugin.

Parameters
TypeDirectionArgument NameDescription
EmberNodeIdN/AnodeId

The relevant endpoint.

uint8_tN/AsrcEndpoint

The EmberAfPluginMessagingServerMessage structure describing the message.

uint8_tN/AdstEndpoint

This function gets the message and metadata that the plugin sends to clients. For "start now" messages that are current or scheduled, the duration is adjusted to reflect how many minutes remain for the message. Otherwise, the start time and duration of "start now" messages reflect the actual start and the original duration.

Returns

  • True if the message is valid or false is the message does not exist or is expired.


Macro Definition Documentation#

ZCL_MESSAGING_CLUSTER_TRANSMISSION_MASK#

#define ZCL_MESSAGING_CLUSTER_TRANSMISSION_MASK
Value:
(BIT(1) | BIT(0))

ZCL_MESSAGING_CLUSTER_IMPORTANCE_MASK#

#define ZCL_MESSAGING_CLUSTER_IMPORTANCE_MASK
Value:
(BIT(3) | BIT(2))

ZCL_MESSAGING_CLUSTER_RESERVED_MASK#

#define ZCL_MESSAGING_CLUSTER_RESERVED_MASK
Value:
(BIT(6) | BIT(5) | BIT(4))

ZCL_MESSAGING_CLUSTER_CONFIRMATION_MASK#

#define ZCL_MESSAGING_CLUSTER_CONFIRMATION_MASK
Value:
BIT(7)

ZCL_MESSAGING_CLUSTER_START_TIME_NOW#

#define ZCL_MESSAGING_CLUSTER_START_TIME_NOW
Value:
0x00000000UL

ZCL_MESSAGING_CLUSTER_END_TIME_NEVER#

#define ZCL_MESSAGING_CLUSTER_END_TIME_NEVER
Value:
0xFFFFFFFFUL

ZCL_MESSAGING_CLUSTER_DURATION_UNTIL_CHANGED#

#define ZCL_MESSAGING_CLUSTER_DURATION_UNTIL_CHANGED
Value:
0xFFFF