Dispatcher
This is Dispatcher which dispatch the messages based on the module id
Each module has certain messages to dispatch,once module registerd using bit field ,messages hold and consume the messages.
Using this api rs_dp_dispatch_msg () hold the messages related to particular module id and using this api rs_dp_consume_msgs () consume the messages gathered in the module id.
Usage
All API functions have the first argument as the module id.
Internal data buffer size and pointer are initialized with module init function.
dispatcher register the module and consume the messages using module id
Return codes of API functions are defined in header file.
Function |
Description |
|---|---|
rs_dp_dispatch_msg |
Function to dispatch the message based on the module id |
rs_dp_register_module |
Function to registers the module |
rs_dp_consume_msgs |
Function consumes the messages when message exists |
Error Code
Every API’s for the message queue module returns some success or failure values. Please refer below section,
Example Demo
Please refer below section,
Message Queue Header Details
Documentation from the relevant header as follows:
Warning
doxygenfile: Cannot find file “rs_dispatcher.h