etk::Fifo< MY_TYPE > Class Template Reference
#include <Fifo.hpp>
Public Member Functions | |
Fifo () | |
~Fifo () | |
bool | wait (MY_TYPE &_data) |
bool | wait (MY_TYPE &_data, uint32_t _timeOutInUs) |
int32_t | count () |
void | post (MY_TYPE &_data) |
void | post (const MY_TYPE &_data) |
void | clean () |
Detailed Description
template<class MY_TYPE = int32_t>
class etk::Fifo< MY_TYPE >
Fifo tamplate is a simple messaged fifo element to transfer data message from a thead to an other.
- Parameters
-
[in] MY_TYPE Type of the fifo message are tranfered.
Constructor & Destructor Documentation
§ Fifo()
Create a fifo with no message.
§ ~Fifo()
Remove the fifo and all message inside.
Member Function Documentation
§ clean()
template<class MY_TYPE = int32_t>
|
inline |
Remove all the message in the fifo.
§ count()
template<class MY_TYPE = int32_t>
|
inline |
Get the number of message in the fifo.
- Returns
- Number of message in the fifo.
§ post() [1/2]
template<class MY_TYPE = int32_t>
|
inline |
Send a message at the other thread by setting a new message in the fifo.
- Parameters
-
[in] _data New data to add at the fifo.
§ post() [2/2]
template<class MY_TYPE = int32_t>
|
inline |
Send a message at the other thread by setting a new message in the fifo.
- Parameters
-
[in] _data New data to add at the fifo.
§ wait() [1/2]
template<class MY_TYPE = int32_t>
|
inline |
Wait a message from the other thread. (no timeout set)
- Parameters
-
[out] _data Data find in the fifo.
- Returns
- true A data has been find.
- false No data found or closed fifo
§ wait() [2/2]
template<class MY_TYPE = int32_t>
|
inline |
Wait a message from the other thread, with a specified timeout.
- Parameters
-
[out] _data keeped data from the fifo. [in] _timeOutInUs Time-out to wait a message in the fifo. It mightbespecify in micro-second.
- Returns
- true We keep a massage.
- false No message found while time-out appear.
The documentation for this class was generated from the following file:
- framework/atria-soft/etk/etk/os/Fifo.hpp