APIs for mailbox client. More...

Functions

EmberAfMailboxStatus emberAfPluginMailboxClientMessageSubmit ( EmberNodeId mailboxServer, EmberNodeId messageDestination, uint8_t *message, EmberMessageLength messageLength, uint8_t tag, bool useSecurity)
Submits a data message to a mailbox server. If this API returns an EmberAfMailboxStatus value of EMBER_MAILBOX_STATUS_SUCCESS , the corresponding asynchronous callback emberAfPluginMailboxClientMessageSubmitCallback() will be invoked to indicate whether the message was successfully submitted to the mailbox server or to inform the application of the reason of failure. More...
EmberAfMailboxStatus emberAfPluginMailboxClientCheckInbox ( EmberNodeId mailboxServer, bool useSecurity)
Queries a mailbox server for pending messages. If this API returns an EmberAfMailboxStatus value of EMBER_MAILBOX_STATUS_SUCCESS , the corresponding asynchronous callback emberAfPluginMailboxClientCheckInboxCallback() will be invoked either to provide the retrieved message or to indicate the reason for failure. More...
void emberAfPluginMailboxClientMessageSubmitCallback ( EmberAfMailboxStatus status, EmberNodeId mailboxServer, EmberNodeId messageDestination, uint8_t tag)
Mailbox Client Message Submit Callback. More...
void emberAfPluginMailboxClientMessageDeliveredCallback ( EmberAfMailboxStatus status, EmberNodeId mailboxServer, EmberNodeId messageDestination, uint8_t tag)
Mailbox Client Message Delivered Callback. More...
void emberAfPluginMailboxClientCheckInboxCallback ( EmberAfMailboxStatus status, EmberNodeId mailboxServer, EmberNodeId messageSource, uint8_t *message, EmberMessageLength messageLength, uint8_t tag, bool moreMessages)
Mailbox Client Check Inbox Callback. More...

Detailed Description

APIs for mailbox client.

License

Copyright 2018 Silicon Laboratories Inc. www.silabs.com

The licensor of this software is Silicon Laboratories Inc. Your use of this software is governed by the terms of Silicon Labs Master Software License Agreement (MSLA) available at www.silabs.com/about-us/legal/master-software-license-agreement. This software is distributed to you in Source Code format and is governed by the sections of the MSLA applicable to Source Code.

See mailbox-client.h for source code.

Function Documentation

EmberAfMailboxStatus emberAfPluginMailboxClientCheckInbox ( EmberNodeId mailboxServer,
bool useSecurity
)

Queries a mailbox server for pending messages. If this API returns an EmberAfMailboxStatus value of EMBER_MAILBOX_STATUS_SUCCESS , the corresponding asynchronous callback emberAfPluginMailboxClientCheckInboxCallback() will be invoked either to provide the retrieved message or to indicate the reason for failure.

Parameters
mailboxServer The mailbox server short ID to be queried.
useSecurity A flag indicating whether the request command should be sent secured. Note that secured pending messages can only be retrieved performing a secured query while unsecured pending messages can be retrieved using either an unsecured or a secured query.
Returns
An EmberAfMailboxStatus value of:
void emberAfPluginMailboxClientCheckInboxCallback ( EmberAfMailboxStatus status,
EmberNodeId mailboxServer,
EmberNodeId messageSource,
uint8_t * message,
EmberMessageLength messageLength,
uint8_t tag,
bool moreMessages
)

Mailbox Client Check Inbox Callback.

This callback is invoked asynchronously after a successful call to the emberAfPluginMailboxClientCheckInbox() API. If a message was retrieved from the mailbox server, this callback passes it to the application. Otherwise, it indicates the reason for failure to the application.

Parameters
status An EmberAfMailboxStatus value of:
messageSource The source node address of the retrieved message. Note that this parameter is meaningful only if the status parameter has an EmberAfMailboxStatus value of EMBER_MAILBOX_STATUS_SUCCESS .
message A pointer to the retrieved message payload. Note that this parameter is meaningful only if the status parameter has an EmberAfMailboxStatus value of EMBER_MAILBOX_STATUS_SUCCESS .
messageLength The length in bytes of the retrived message payload. Note that this parameter is meaningful only if the status parameter has an EmberAfMailboxStatus value of EMBER_MAILBOX_STATUS_SUCCESS .
tag The tag value used by the source mailbox client. Note that this parameter is meaningful only if the status parameter has an EmberAfMailboxStatus value of EMBER_MAILBOX_STATUS_SUCCESS .
moreMessages This flag indicates whether the mailbox server has more pending messages for this mailbox client. Note that this parameter is meaningful only if the status parameter has an EmberAfMailboxStatus value of EMBER_MAILBOX_STATUS_SUCCESS .
void emberAfPluginMailboxClientMessageDeliveredCallback ( EmberAfMailboxStatus status,
EmberNodeId mailboxServer,
EmberNodeId messageDestination,
uint8_t tag
)

Mailbox Client Message Delivered Callback.

A callback that may be invoked either if the a message that was submitted to a mailbox server reached its final destination or it timed-out. Note that the callback is not always called. If the status message from the server is lost, the callback won't be called.

Parameters
status An EmberAfMailboxStatus value of:
mailboxServer The mailbox server short ID where the message was submitted to.
messageDestination The message destination.
tag The message tag.
EmberAfMailboxStatus emberAfPluginMailboxClientMessageSubmit ( EmberNodeId mailboxServer,
EmberNodeId messageDestination,
uint8_t * message,
EmberMessageLength messageLength,
uint8_t tag,
bool useSecurity
)

Submits a data message to a mailbox server. If this API returns an EmberAfMailboxStatus value of EMBER_MAILBOX_STATUS_SUCCESS , the corresponding asynchronous callback emberAfPluginMailboxClientMessageSubmitCallback() will be invoked to indicate whether the message was successfully submitted to the mailbox server or to inform the application of the reason of failure.

Parameters
mailboxServer The mailbox server short ID.
messageDestination The data message destination short ID.
message A pointer to the message to be sent.
messageLength The length in bytes of the message to be sent.
tag A tag value the application can use to match asynchronous callbacks.
useSecurity A flag indicating whether the data message should be sent to the server using security or not.
Returns
An EmberAfMailboxStatus value of:
void emberAfPluginMailboxClientMessageSubmitCallback ( EmberAfMailboxStatus status,
EmberNodeId mailboxServer,
EmberNodeId messageDestination,
uint8_t tag
)

Mailbox Client Message Submit Callback.

A callback invoked after a successful emberAfPluginMailboxClientMessageSubmit() API call.

Parameters
status An EmberAfMailboxStatus value of:
mailboxServer The mailbox server short ID.
messageDestination The message destination short ID.
tag The tag value passed in the emberAfPluginMailboxClientMessageSubmit() API.