53 lines
1.1 KiB
C++
53 lines
1.1 KiB
C++
//
|
|
// Linux GPS
|
|
//
|
|
|
|
/* prevent multiple inclusions */
|
|
#ifndef __GpsDevice__
|
|
#define __GpsDevice__
|
|
|
|
/* includes *****************************************************************/
|
|
|
|
#include "netlib.h"
|
|
|
|
#include "SerialIO.h"
|
|
|
|
/* defines ******************************************************************/
|
|
|
|
/* macros *******************************************************************/
|
|
|
|
/* structs & typedefs *******************************************************/
|
|
|
|
/* c class definitions ******************************************************/
|
|
|
|
class GpsDevice : public SerialIO {
|
|
// public data
|
|
public:
|
|
// parser
|
|
|
|
// protected data
|
|
protected:
|
|
|
|
// private data
|
|
private:
|
|
// private methods
|
|
|
|
// public methods
|
|
public:
|
|
// constructors
|
|
GpsDevice();
|
|
|
|
// destructor
|
|
virtual ~GpsDevice();
|
|
|
|
// virtual functions
|
|
|
|
// public methods
|
|
int GpsOpen( const char *dev, int baud=38400 );
|
|
int GpsRead( char *buf, int max ) {return Read(buf,max); };
|
|
int GpsWrite( const char *buf, int max ) {return Write(buf,max); };
|
|
void GpsClose(void) { Close(); };
|
|
};
|
|
|
|
#endif
|