This class provides an API to communicate with a u-blox GNSS chip. The files here were originally part of the C027_Support library (https://developer.mbed.org/teams/ublox/code/C027_Support/ at revision 138:dafbbf31bf76) but have been separated out, primarily for use on the u-blox C030 board where the cellular interace portion of the C027_Support library will instead be provided through the new mbed Cellular API.
Dependents:
example-ublox-at-cellular-interface-ext
example-low-power-sleep
example-C030-out-of-box-demo
example-C030-out-of-box-demo
... more
« Back to documentation index
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
Destructor frees a allocated buffer.
Definition at line 43 of file pipe.h .
Member Function Documentation
commit the index, mark the current parsing index as consumed data.
Definition at line 233 of file pipe.h .
Return the number of free elements in the buffer.
Returns: the number of free elements
Definition at line 78 of file pipe.h .
int get
(
T *
p ,
int
n ,
bool
t = false
)
get elements from the buffered pipe
Parameters:
p the elements extracted
n the maximum number elements to extract
t set to true if blocking, false otherwise
Returns: number elements extracted
Definition at line 176 of file pipe.h .
get a single value from buffered pipe (this function will block if no values available)
Returns: the element extracted
Definition at line 160 of file pipe.h .
get the next element from parsing position and increment parsing index
Returns: the extracted element.
Definition at line 223 of file pipe.h .
Check if there are any emelemnt available (readble / not empty)
Returns: true if readable/not empty
Definition at line 141 of file pipe.h .
set the parsing index and return the number of available elments starting this position.
Parameters:
Returns: the number of elements starting at this position
Definition at line 212 of file pipe.h .
Get the number of values available in the buffer return the number of element available.
Definition at line 149 of file pipe.h .
Check if buffer is writeable (=not full)
Returns: true if writeable
Definition at line 70 of file pipe.h .