PropWare
2.1.2
C++ objects and CMake build system for Parallax Propeller
|
Click here for docs on the
develop
branch.
#include <gpsparser.h>
Public Member Functions | |
bool | Start (const int rx_pin, const int tx_pin, const int baud) |
~GPSParser () | |
char * | Get () |
char * | Get (char string[], const int maxBytes=kNmeaMaxLength) |
bool | Start (const int rx_pin, const int tx_pin, const int baud) |
~GPSParser () | |
char * | Get () |
char * | Get (char string[], const int maxBytes=kNmeaMaxLength) |
Friends | |
class | ::UnityTests |
Receives and parses NMEA0183 GPS streams into C strings.
Requires 1 cog to operate.
Definition at line 20 of file gpsparser.h.
libpropeller::GPSParser::~GPSParser | ( | ) |
Stop the GPS parsing, and the cog that was started.
Definition at line 40 of file gpsparser.h.
libpropeller::GPSParser::~GPSParser | ( | ) |
Stop the GPS parsing, and the cog that was started.
Definition at line 40 of file gpsparser.h.
char* libpropeller::GPSParser::Get | ( | ) |
Gets a NMEA string. Note that the returned string address is valid (will not be overwritten) until the next time GetStr() is called.
The returned string includes all characters from the GPS except for the and
(<CR><LF>) at the end.
Partial sentences may be thrown away (if a sentence is not being currently recorded).
Ignores the PGTOP type sentence.
Definition at line 57 of file gpsparser.h.
char* libpropeller::GPSParser::Get | ( | ) |
Gets a NMEA string. Note that the returned string address is valid (will not be overwritten) until the next time GetStr() is called.
The returned string includes all characters from the GPS except for the and
(<CR><LF>) at the end.
Partial sentences may be thrown away (if a sentence is not being currently recorded).
Ignores the PGTOP type sentence.
Definition at line 57 of file gpsparser.h.
char* libpropeller::GPSParser::Get | ( | char | string[], |
const int | maxBytes = kNmeaMaxLength |
||
) |
Same as Get(), but with the option of specifying a buffer to use instead of the internal buffer.
string | The buffer to use. Must be at least 85 characters long (the NMEA string length). |
maxBytes | The maximum number of bytes to record in this string. Defaults to maximum NMEA sentence length. |
Definition at line 73 of file gpsparser.h.
char* libpropeller::GPSParser::Get | ( | char | string[], |
const int | maxBytes = kNmeaMaxLength |
||
) |
Same as Get(), but with the option of specifying a buffer to use instead of the internal buffer.
string | The buffer to use. Must be at least 85 characters long (the NMEA string length). |
maxBytes | The maximum number of bytes to record in this string. Defaults to maximum NMEA sentence length. |
Definition at line 73 of file gpsparser.h.
bool libpropeller::GPSParser::Start | ( | const int | rx_pin, |
const int | tx_pin, | ||
const int | baud | ||
) |
Create the parser and launch a new cog.
rx_pin | the serial pin to receive data from the GPS. |
tx_pin | the pin to transmit data to the GPS. If not used, set to -1. |
baud | the baud rate to use for tranmission and receiving. |
Definition at line 29 of file gpsparser.h.
bool libpropeller::GPSParser::Start | ( | const int | rx_pin, |
const int | tx_pin, | ||
const int | baud | ||
) |
Create the parser and launch a new cog.
rx_pin | the serial pin to receive data from the GPS. |
tx_pin | the pin to transmit data to the GPS. If not used, set to -1. |
baud | the baud rate to use for tranmission and receiving. |
Definition at line 29 of file gpsparser.h.