A FIFO is used to pass structures from one task to another. Note: Structures to be passed must have an unused (void *)
pointer as its first element. This precludes passing C++ objects with virtual member functions.
More...
#include <nbrtos.h>
Inherits OS_TASK_DLY_OBJ.
|
| OS_FIFO () |
| Create and initialize a FIFO object.
|
|
uint8_t | Init () |
| Sets the FIFO object to its initial state. More...
|
|
uint8_t | Post (OS_FIFO_EL *pToPost) |
| This function posts to a FIFO object. More...
|
|
uint8_t | PostFirst (OS_FIFO_EL *pToPost) |
| This function is identical to Post(), but the element posted is put on the beginning of the FIFO list. More...
|
|
OS_FIFO_EL * | Pend (uint32_t timeoutTicks, uint8_t &result) |
| This function pends on a FIFO for a specified number of ticks. More...
|
|
OS_FIFO_EL * | PendNoWait (uint8_t &result) |
| Checks to see if a structure has been posted to a FIFO, but does not wait. More...
|
|
OS_FIFO_EL * | Pend (uint32_t timeoutTicks=WAIT_FOREVER) |
| This function pends on a FIFO for a specified number of ticks. This is the same as Pend(uint32_t timeoutTicks, uint8_t &result), but does not provide a result code. More...
|
|
OS_FIFO_EL * | PendNoWait () |
| Checks to see if a structure has been posted to a FIFO, but does not wait. This is the same as PendNoWait(uint8_t &result), but does not provide a result code. More...
|
|
A FIFO is used to pass structures from one task to another. Note: Structures to be passed must have an unused (void *)
pointer as its first element. This precludes passing C++ objects with virtual member functions.
◆ Init()
uint8_t OS_FIFO::Init |
( |
| ) |
|
◆ Pend() [1/2]
OS_FIFO_EL * OS_FIFO::Pend |
( |
uint32_t |
timeoutTicks, |
|
|
uint8_t & |
result |
|
) |
| |
|
inline |
This function pends on a FIFO for a specified number of ticks.
- Parameters
-
| timeoutTicks | The number of time ticks to wait. |
[out] | result | A variable to receive the result code (OS_NO_ERR if successful or OS_TIMEOUT if it fails). |
- Return values
-
Structure | If successful |
NULL | If it timed out |
- See also
- NBRTOS Error Codes
-
PendNoWait(uint8_t &result)
-
Pend(uint32_t timeoutTicks)
◆ Pend() [2/2]
OS_FIFO_EL * OS_FIFO::Pend |
( |
uint32_t |
timeoutTicks = WAIT_FOREVER | ) |
|
|
inline |
◆ PendNoWait() [1/2]
OS_FIFO_EL * OS_FIFO::PendNoWait |
( |
| ) |
|
|
inline |
◆ PendNoWait() [2/2]
OS_FIFO_EL * OS_FIFO::PendNoWait |
( |
uint8_t & |
result | ) |
|
◆ Post()
uint8_t OS_FIFO::Post |
( |
OS_FIFO_EL * |
pToPost | ) |
|
◆ PostFirst()
uint8_t OS_FIFO::PostFirst |
( |
OS_FIFO_EL * |
pToPost | ) |
|
This function is identical to Post(), but the element posted is put on the beginning of the FIFO list.
The task that pends next will get the structure/object posted here, instead of any prior objects posted to the FIFO.
- Parameters
-
pToPost | A pointer to the user's structure cast as an OS_FIFO_EL to be posted to the FIFO. |
- Return values
-
- See also
- NBRTOS Error Codes
-
Post(OS_FIFO_EL *pToPost)
The documentation for this class was generated from the following files: