Message Queue Demo
Overview
There is an example implementation of the Message Queue Demo application available in the apps folder. In this implementation, it contains all the API functions and demos for how to use them.
Features
This application The structure is initialised, push and pop from the structure via the Queue concept, data is obtained from the structure, and all filter structure elements are flushed.
In every API for this driver, the Structure input argument is provided by the user.
The sample application includes Test Suite APIs. The test suite API was used to test the filter moving average driver API functions in a single shot with custom input.
Example Usecase
Linear queue or message queue, Data in a message queue is pushed, popped, peeked, and flushed until the buffer reaches its maximum capacity. Data will be stored in a linear manner. Below is the use case for the ring buffer operation.
Example input data:
****** MENU ******
1.To insert the element in the queue
2.To Delete the element in the queue (Pop)
3.To Peek the element in the queue (Peek)
4.To get used space in the queue
5.To check whether the queue is full or not full
6.To check whether the queue is empty or not empty
7.To Get the free size of the queue
8.To Flush all the elements in the queue(Flush)
9.Validate Message Queue
10.Quit
Push operation:
Enter the integer : 4
Integer data successfully pushed to the queue
Peek operation:
Peek succeed
Peek Message Data : 0x4
pop operation:
pop succeed:
Pop data : 0x4
Message Queue Driver
Please refer below section,