63 lines
1.3 KiB
C++
63 lines
1.3 KiB
C++
//
|
|
// Linux GPS
|
|
//
|
|
|
|
/* prevent multiple inclusions */
|
|
#ifndef __SirfParser__
|
|
#define __SirfParser__
|
|
|
|
/* includes *****************************************************************/
|
|
|
|
#include <vector>
|
|
|
|
#include "netlib.h"
|
|
|
|
#include "GpsListener.h"
|
|
#include "GpsParser.h"
|
|
|
|
#include "NmeaParser.h"
|
|
#include "NmeaProtocol.h"
|
|
#include "SirfProtocol.h"
|
|
|
|
/* defines ******************************************************************/
|
|
|
|
/* macros *******************************************************************/
|
|
|
|
/* structs & typedefs *******************************************************/
|
|
|
|
/* c class definitions ******************************************************/
|
|
|
|
//
|
|
class SirfParser : public NmeaParser, public SirfProtocol {
|
|
// public data
|
|
public:
|
|
|
|
// protected data
|
|
protected:
|
|
|
|
// private data
|
|
private:
|
|
// data
|
|
u_char state; // parser state
|
|
|
|
// private methods
|
|
|
|
// public methods
|
|
public:
|
|
// constructors
|
|
SirfParser();
|
|
|
|
// destructor
|
|
virtual ~SirfParser();
|
|
|
|
// virtual functions
|
|
int GpsDecode( const char *buf, int max ) { return SirfDecode( (const u_char *)buf, max); };
|
|
int GpsParse( const char *buf, int max ) { return SirfParse( buf, max ); };
|
|
|
|
// public methods
|
|
int SirfDecode( const u_char *buf, int max );
|
|
int SirfParse( const char *buf, int max );
|
|
};
|
|
|
|
#endif
|