Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: example-ublox-at-cellular-interface-ext example-low-power-sleep example-C030-out-of-box-demo example-C030-out-of-box-demo ... more
Pipe< T > Class Template Reference
pipe, this class implements a buffered pipe that can be savely written and read between two context. More...
#include <pipe.h>
Public Member Functions | |
~Pipe (void) | |
Destructor frees a allocated buffer. | |
bool | writeable (void) |
Check if buffer is writeable (=not full) | |
int | free (void) |
Return the number of free elements in the buffer. | |
bool | readable (void) |
Check if there are any emelemnt available (readble / not empty) | |
int | size (void) |
Get the number of values available in the buffer return the number of element available. | |
T | getc (void) |
get a single value from buffered pipe (this function will block if no values available) | |
int | get (T *p, int n, bool t=false) |
int | set (int ix) |
set the parsing index and return the number of available elments starting this position. | |
T | next (void) |
get the next element from parsing position and increment parsing index | |
void | done (void) |
commit the index, mark the current parsing index as consumed data. |
Detailed Description
template<class T>
class Pipe< T >
pipe, this class implements a buffered pipe that can be savely written and read between two context.
E.g. Written from a task and read from a interrupt.
Definition at line 24 of file pipe.h.
Constructor & Destructor Documentation
Member Function Documentation
void done | ( | void | ) |
int free | ( | void | ) |
int get | ( | T * | p, |
int | n, | ||
bool | t = false |
||
) |
T getc | ( | void | ) |
T next | ( | void | ) |
bool readable | ( | void | ) |
int set | ( | int | ix ) |
int size | ( | void | ) |
Generated on Tue Jul 12 2022 14:18:20 by
