Mailbox Client Plugin
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:
- EMBER_MAILBOX_STATUS_SUCCESS if the query command was successfully passed to the network layer to be transmitted to the mailbox server.
- EMBER_MAILBOX_STATUS_INVALID_ADDRESS if the passed mailbox server short ID is an invalid address.
- EMBER_MAILBOX_STATUS_BUSY if the client is still performing a submit message or a query for message action.
- EMBER_MAILBOX_STATUS_STACK_ERROR if the network layer refused the command (the outgoing queue is currently full).
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: - EMBER_MAILBOX_STATUS_SUCCESS if a message was retrieved from the mailbox server.
- EMBER_MAILBOX_STATUS_MESSAGE_NO_DATA if the server has currently no message for this mailbox client.
- EMBER_MAILBOX_STATUS_MESSAGE_NO_RESPONSE if the client timed-out waiting for a query response from the mailbox server.
- EMBER_MAILBOX_STATUS_STACK_ERROR if the stack failed to deliver the query message to the mailbox server.
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: - EMBER_MAILBOX_STATUS_SUCCESS indicates that the message was successfully delivered to the final destination.
- EMBER_MAILBOX_STATUS_MESSAGE_TIMED_OUT indicates that the message timed-out and was removed from the server queue.
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:
- EMBER_MAILBOX_STATUS_SUCCESS if the message was successfully passed to the network layer to be transmitted to the mailbox server.
- EMBER_MAILBOX_STATUS_INVALID_CALL if the passed data message is invalid.
- EMBER_MAILBOX_STATUS_INVALID_ADDRESS if the server ID or the destination ID is an invalid address.
- EMBER_MAILBOX_STATUS_MESSAGE_TOO_LONG if the passed message does not fit in a single mailbox data message.
- EMBER_MAILBOX_STATUS_BUSY if the client is still performing a submit message or a query for message action.
- EMBER_MAILBOX_STATUS_STACK_ERROR if the network layer refused the message (the outgoing queue is currently full).
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: - EMBER_MAILBOX_STATUS_SUCCESS if the data message was accepted by the mailbox server.
- EMBER_MAILBOX_STATUS_STACK_ERROR if the message couldn't be delivered to the mailbox server.
- EMBER_MAILBOX_STATUS_MESSAGE_NO_RESPONSE if the client timed-out waiting for a response from the server.
- EMBER_MAILBOX_STATUS_MESSAGE_TABLE_FULL if the mailbox server table is currently full.
- EMBER_MAILBOX_STATUS_MESSAGE_NO_BUFFERS if the server can't allocate enough memory to store the message.
mailboxServer
The mailbox server short ID. messageDestination
The message destination short ID. tag
The tag value passed in the emberAfPluginMailboxClientMessageSubmit() API.