class: etk::Fifo
Description:
Fifo tamplate is a simple messaged fifo element to
transfer data message from a thead to an other.
Constructor and Destructor:
+ Fifo (void );
+ ~Fifo (void );
Synopsis:
+ bool wait (MY_TYPE & _data);
+ bool wait (MY_TYPE & _data,
uint32_t _timeOutInUs);
+ int32_t count (void );
+ void post (MY_TYPE & _data);
+ void clean (void );
Detail:
Fifo
+ Fifo (void );
Create a fifo with no message.
~Fifo
+ ~Fifo (void );
Remove the fifo and all message inside.
wait
+ bool wait (MY_TYPE & _data);
Wait a message from the other thread. (no timeout set)
Parameter [output]: | _data | Data find in the fifo. |
Return: | | true A data has been find.<br/>false No data found or closed fifo |
wait
+ bool wait (MY_TYPE & _data,
uint32_t _timeOutInUs);
Wait a message from the other thread, with a specified timeout.
count
+ int32_t count (void );
Get the number of message in the fifo.
Return: | | Number of message in the fifo. |
post
+ void post (MY_TYPE & _data);
Send a message at the other thread by setting a new message in the fifo.
clean
+ void clean (void );
Remove all the message in the fifo.