GATE
|
A message queue registers targets where messages can be sent to and received from. More...
#include <queues.h>
Public Member Functions | |
gate_result_t | start () |
Starts message queue. | |
gate_result_t | stop () |
Stops message queue. | |
gate_enumint_t | get_status () |
Returns a status indicator about the message queue's operation mode. | |
gate_result_t | add_target (gate_string_t const *target_address, gate_msgqueue_target_id_t *ptr_target_id) |
Registers a native target address and reserves a target_id were messages are sent to. | |
gate_result_t | get_target (gate_msgqueue_target_id_t target_id, gate_string_t *ptr_target_address) |
Returns a status indicator about the message queue's operation mode. | |
gate_result_t | resolve_target (gate_string_t const *target_address, gate_msgqueue_target_id_t *ptr_target_id) |
Returns a status indicator about the message queue's operation mode. | |
gate_result_t | remove_target (gate_msgqueue_target_id_t target_id) |
Returns a status indicator about the message queue's operation mode. | |
gate_result_t | publish (gate_msgqueue_target_id_t target_id, gate_uint32_t message_type, void const *data, gate_size_t length) |
Publishes a message to a registered target. | |
gate_result_t | subscribe (gate_msgqueue_target_id_t target_id, gate_msgqueue_receiver_t receiver, void *user_param, gate_msgqueue_subscriber_t *ptr_subscriber) |
Registers a callback to receive message from a registered target. | |
gate_result_t | unsubscribe (gate_msgqueue_subscriber_t subscriber) |
Unregisters a callback by its subscriber id from subscribe() | |
Public Member Functions inherited from gate_startable_t | |
Public Member Functions inherited from gate_object_t | |
char const * | get_interface_name () |
Returns on object's interface path name. | |
void | release () |
Decrease object's reference counter, releases the object when count reaches zero. | |
int | retain () |
Increase object's reference counter. | |
A message queue registers targets where messages can be sent to and received from.
gate_result_t start | ( | ) |
gate_result_t stop | ( | ) |
gate_enumint_t get_status | ( | ) |
Returns a status indicator about the message queue's operation mode.
Implements gate_startable_t.
gate_result_t add_target | ( | gate_string_t const * | target_address, |
gate_msgqueue_target_id_t * | ptr_target_id ) |
Registers a native target address and reserves a target_id
were messages are sent to.
[in] | target_address | unique address to be interpreted by implementation |
[out] | ptr_target_id | pointer to target_id, a generated unique identifier |
gate_result_t get_target | ( | gate_msgqueue_target_id_t | target_id, |
gate_string_t * | ptr_target_address ) |
Returns a status indicator about the message queue's operation mode.
[in] | target_id | x |
[out] | ptr_target_address | x |
gate_result_t resolve_target | ( | gate_string_t const * | target_address, |
gate_msgqueue_target_id_t * | ptr_target_id ) |
Returns a status indicator about the message queue's operation mode.
[in] | target_address | x |
[out] | ptr_target_id | x |
gate_result_t remove_target | ( | gate_msgqueue_target_id_t | target_id | ) |
Returns a status indicator about the message queue's operation mode.
[in] | target_id | x |
gate_result_t publish | ( | gate_msgqueue_target_id_t | target_id, |
gate_uint32_t | message_type, | ||
void const * | data, | ||
gate_size_t | length ) |
Publishes a message to a registered target.
[in] | target_id | Target ID to which the message is published |
[in] | message_type | protocol specific message ID |
[in] | data | pointer to message content to be published |
[in] | length | lenght of published message content in bytes |
gate_result_t subscribe | ( | gate_msgqueue_target_id_t | target_id, |
gate_msgqueue_receiver_t | receiver, | ||
void * | user_param, | ||
gate_msgqueue_subscriber_t * | ptr_subscriber ) |
Registers a callback to receive message from a registered target.
[in] | target_id | Registered message target ID to receive messages from |
[in] | receiver | Callback function to receive messages |
[in] | user_param | User parameter to be added to each callback invocation |
[out] | ptr_subscriber | Pointer to subscriber Id that identifies this subscription |
gate_result_t unsubscribe | ( | gate_msgqueue_subscriber_t | subscriber | ) |
Unregisters a callback by its subscriber id from subscribe()
[in] | subscriber | Subscriber-ID to be unregistered |