License#
Copyright 2018 Silicon Laboratories Inc. www.silabs.com
SPDX-License-Identifier: Zlib
The licensor of this software is Silicon Laboratories Inc.
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
This notice may not be removed or altered from any source distribution.
/***************************************************************************/
#ifndef _MAILBOX_SERVER_H_
#define _MAILBOX_SERVER_H_
#include "mailbox/mailbox-protocol.h"
#include "mailbox/mailbox-types.h"
EmberAfMailboxStatus emberAfPluginMailboxServerAddMessage(EmberNodeId destination,
uint8_t *message,
EmberMessageLength messageLength,
uint8_t tag,
bool useSecurity);
// ------------------------------------------------------------------------------
// Callbacks
void emberAfPluginMailboxServerMessageDeliveredCallback(EmberAfMailboxStatus status,
EmberNodeId messageDestination,
uint8_t tag);
#endif //_MAILBOX_SERVER_H_
Callbacks#
Mailbox Server Message Delivered Callback.
Functions#
Add a message to the mailbox server queue. The message is stored in the internal queue until the destination node queries the mailbox server node for messages or upon timeout.
Callbacks Documentation#
emberAfPluginMailboxServerMessageDeliveredCallback#
void emberAfPluginMailboxServerMessageDeliveredCallback (EmberAfMailboxStatus status, EmberNodeId messageDestination, uint8_t tag)
Mailbox Server Message Delivered Callback.
[in] | status | An EmberAfMailboxStatus value of:
|
[in] | messageDestination | The node ID of the destination. |
[in] | tag | The tag value passed in the emberAfPluginMailboxServerAddMessage() API. |
This callback is invoked at the server when a message submitted locally by the server was successfully delivered or when it timed-out.
See Also
110
of file /mnt/raid/workspaces/ws.tfWcRzYcf/overlay/gsdk/protocol/flex/mailbox/mailbox-server/mailbox-server.h
Function Documentation#
emberAfPluginMailboxServerAddMessage#
EmberAfMailboxStatus emberAfPluginMailboxServerAddMessage (EmberNodeId destination, uint8_t * message, EmberMessageLength messageLength, uint8_t tag, bool useSecurity)
Add a message to the mailbox server queue. The message is stored in the internal queue until the destination node queries the mailbox server node for messages or upon timeout.
[in] | destination | The node ID of the destination for this data message. |
[in] | message | A pointer to the message to be enqueued. |
[in] | messageLength | The length in bytes of the message to be enqueued. |
[in] | tag | A tag value which will be returned in the corresponding emberAfPluginMailboxServerMessageDeliveredCallback() callback. The application can use to match the callbacks with the call. |
[in] | useSecurity | Set it true if the data message should be sent to the server using security. |
Returns
An EmberAfMailboxStatus value of:
EMBER_MAILBOX_STATUS_SUCCESS if the message was successfully added to the packet queue.
EMBER_MAILBOX_STATUS_INVALID_CALL if the passed message is invalid.
EMBER_MAILBOX_STATUS_INVALID_ADDRESS if the passed destination address is invalid.
EMBER_MAILBOX_STATUS_MESSAGE_TOO_LONG if the payload size of the passed message exceeds the maximum allowable payload for the passed transmission options.
EMBER_MAILBOX_STATUS_MESSAGE_TABLE_FULL if the packet table is already full.
EMBER_MAILBOX_STATUS_MESSAGE_NO_BUFFERS if not enough memory buffers are available for storing the message content.
See Also
79
of file /mnt/raid/workspaces/ws.tfWcRzYcf/overlay/gsdk/protocol/flex/mailbox/mailbox-server/mailbox-server.h