66 lines
1.5 KiB
C++
66 lines
1.5 KiB
C++
//
|
|
// Linux GPS
|
|
//
|
|
|
|
/* prevent multiple inclusions */
|
|
#ifndef __NtripClient__
|
|
#define __NtripClient__
|
|
|
|
/* includes *****************************************************************/
|
|
|
|
#include "TcpClient.h"
|
|
#include "netlib.h"
|
|
|
|
/* defines ******************************************************************/
|
|
|
|
/* macros *******************************************************************/
|
|
|
|
/* structs & typedefs *******************************************************/
|
|
|
|
|
|
/* c class definitions ******************************************************/
|
|
|
|
//
|
|
// GpsLinux because it depennds on GPSd, the HAMLIB and NMEAP libraries
|
|
//
|
|
class NtripClient : public TcpClient {
|
|
// public data
|
|
public:
|
|
char Uri[1024];
|
|
|
|
protected:
|
|
unsigned long count;
|
|
|
|
// private data
|
|
private:
|
|
|
|
// private methods
|
|
|
|
// static data
|
|
|
|
// public methods
|
|
public:
|
|
// constructors
|
|
NtripClient();
|
|
|
|
// destructor
|
|
virtual ~NtripClient();
|
|
|
|
// virtual functions
|
|
|
|
// public methods
|
|
int NtripConnect( const char *host, const char *service,
|
|
const char *user = "anonymous", const char *pass = "",
|
|
const char *path = "" );
|
|
int NtripConnect( const char *uri );
|
|
int NtripReconnect( void ) {return NtripConnect( Uri ); };
|
|
void NtripClose(void) {Close();};
|
|
|
|
int NtripRead( unsigned char *buf, int max );
|
|
int NtripWrite( const unsigned char *buf, int max )
|
|
{return TcpClient::Send((const char *)buf,max);};
|
|
};
|
|
|
|
#endif
|
|
|