![]() |
Synergy Software Package User's Manual
|
#include <sf_message_api.h>
Data Fields | |
| ssp_err_t(* | open )(sf_message_ctrl_t *const p_ctrl, sf_message_cfg_t const *const p_cfg) |
| ssp_err_t(* | close )(sf_message_ctrl_t *const p_ctrl) |
| ssp_err_t(* | bufferAcquire )(sf_message_ctrl_t const *const p_ctrl, sf_message_header_t **pp_buffer, sf_message_acquire_cfg_t const *const p_acquire_cfg, uint32_t const wait_option) |
| ssp_err_t(* | bufferRelease )(sf_message_ctrl_t *const p_ctrl, sf_message_header_t *const p_buffer, sf_message_release_option_t const option) |
| ssp_err_t(* | post )(sf_message_ctrl_t *const p_ctrl, sf_message_header_t const *const p_buffer, sf_message_post_cfg_t const *const p_post_cfg, sf_message_post_err_t *const p_post_err, uint32_t const wait_option) |
| ssp_err_t(* | pend )(sf_message_ctrl_t const *const p_ctrl, TX_QUEUE const *const p_queue, sf_message_header_t **pp_buffer, uint32_t const wait_option) |
| ssp_err_t(* | versionGet )(ssp_version_t *const p_version) |
Messaging Framework API structure. Implementations will use the following API.
| ssp_err_t(* sf_message_api_t::bufferAcquire) (sf_message_ctrl_t const *const p_ctrl, sf_message_header_t **pp_buffer, sf_message_acquire_cfg_t const *const p_acquire_cfg, uint32_t const wait_option) |
Acquire buffer for message passing from the block.
| [in] | p_ctrl | Pointer to the messaging control block |
| [in,out] | pp_buffer | Pointer to the pointer to the allocated buffer memory |
| [in] | p_acquire_cfg | Pointer to the buffer acquisition configuration |
| [in] | wait_option | Wait option (TX_NO_WAIT, TX_WAIT_FOREVER or numerical values) |
| ssp_err_t(* sf_message_api_t::bufferRelease) (sf_message_ctrl_t *const p_ctrl, sf_message_header_t *const p_buffer, sf_message_release_option_t const option) |
Release buffer obtained from SF_MESSAGE_BufferAcquire().
| [in] | p_ctrl | Pointer to the messaging control block |
| [in] | p_buffer | Pointer to the buffer allocated by SF_MESSAGE_BufferAcquire() |
| [in] | option | Buffer release option (SF_MESSAGE_RELEASE_OPTION_NONE, SF_MESSAGE_RELEASE_OPTION_ACK, SF_MESSAGE_RELEASE_OPTION_NAK, SF_MESSAGE_RELEASE_OPTION_FORCED_RELEASE) |
| ssp_err_t(* sf_message_api_t::close) (sf_message_ctrl_t *const p_ctrl) |
Finalize message framework.
| [in,out] | p_ctrl | Pointer to the messaging control block |
| ssp_err_t(* sf_message_api_t::open) (sf_message_ctrl_t *const p_ctrl, sf_message_cfg_t const *const p_cfg) |
Initialize message framework. Initiate the messaging framework control block, configure the work memory corresponding to the configuration parameters.
| [in,out] | p_ctrl | Pointer to the messaging control block |
| [in] | p_cfg | Pointer to configuration structure |
| ssp_err_t(* sf_message_api_t::pend) (sf_message_ctrl_t const *const p_ctrl, TX_QUEUE const *const p_queue, sf_message_header_t **pp_buffer, uint32_t const wait_option) |
Pend message.
| [in] | p_ctrl | Pointer to the messaging control block |
| [in] | p_queue | Pointer to a threadX message queue object |
| [in,out] | pp_buffer | Pointer to the pointer to the buffer where message is stored. |
| [in] | wait_option | Wait option (TX_NO_WAIT, TX_WAIT_FOREVER or numerical values) |
| ssp_err_t(* sf_message_api_t::post) (sf_message_ctrl_t *const p_ctrl, sf_message_header_t const *const p_buffer, sf_message_post_cfg_t const *const p_post_cfg, sf_message_post_err_t *const p_post_err, uint32_t const wait_option) |
Post message to the subscribers.
| [in] | p_ctrl | Pointer to the messaging control block |
| [in] | p_buffer | Pointer to the buffer allocated by SF_MESSAGE_BufferAcquire() |
| [in] | p_post_cfg | Pointer to the message post configuration |
| [in] | wait_option | Wait option (TX_NO_WAIT, TX_WAIT_FOREVER or numerical values) |
| ssp_err_t(* sf_message_api_t::versionGet) (ssp_version_t *const p_version) |
Get the version of the messaging framework.
| [in] | p_version | Pointer to the memory where to store the version number |