Storage Backed Queue

  • This is the Storage Backed Queue implementation with fixed size of user initialization.

  • The main buffer structure variable and the internal data buffer both should be declared on the application side and the pointers of the variables are used in the module.

Usage

  1. All API functions have the first argument as the buffer instance.

  2. Internal data buffer size and pointer are initialized with module init function.

  3. Module read and module write functions are used to read/write data bytes.

  4. Other API functions to return the status of buffer whether empty or full.

  5. Return codes of API functions are defined in header file.

Storage backed Queue calls

Function

Description

rs_sb_queue_open

Function to initialize the storage backed queue

rs_sb_queue_close

Function to de initialize the storage backed queue

rs_sb_queue_set_config

Function to sets the configuration for the storage backed queue

rs_sb_queue_set_sector_config

Function to sets the sector configuration for the storage backed queue

rs_sb_queue_push_data

Function to push the data into the storage backed queue

rs_sb_queue_pull_data

Function to pull the data from the storage backed queue

rs_sb_queue_check_available_file_count

Function to get available files count

rs_sb_queue_is_available

Function to check if data in queue is available or not

rs_sb_queue_flush

Function to reset the elements of the storage backed queue structure

rs_sb_queue_discard

Function to disacrd the elements of the storage backed queue structure

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_sb_queue.h