Macros | Typedefs | Functions | Variables
ntripclient.cpp File Reference
#include <ctype.h>
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <time.h>
#include <regex>
#include <thread>
#include <mutex>
#include <string>
#include <iostream>
#include "serial.h"
#include "ntrip.h"
#include <signal.h>
#include <fcntl.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
Include dependency graph for ntripclient.cpp:

Go to the source code of this file.

Macros

#define AGENTSTRING   "NTRIP NtripClientPOSIX"
 
#define ALARMTIME   (2*60)
 
#define ARGOPT   "-d:m:bhp:r:s:u:n:S:R:M:IP:D:B:T:C:Y:A:l:"
 
#define closesocket(sock)   close(sock)
 
#define COMPILEDATE   " built " __DATE__
 
#define LONG_OPT(a)   a
 
#define MAXDATASIZE   1000 /* max number of bytes we can get at once */
 
#define myperror   perror
 
#define TIME_RESOLUTION   125
 

Typedefs

typedef int sockettype
 

Functions

void appendNMEA (char *buf, int i)
 
static int encode (char *buf, int size, const char *user, const char *pwd)
 
static const char * encodeurl (const char *req)
 
static int getargs (int argc, char **argv, struct Args *args)
 
Location getGNGGA ()
 
static const char * geturl (const char *url, struct Args *args)
 
void ntrip_client (Args *const args)
 
static void sighandler_alarm (int sig)
 

Variables

static char datestr [] = "$Date: 2009/09/11 09:49:19 $"
 
static const char encodingTable [64]
 
mutex g_mtx
 
string g_nmea
 
static struct option opts []
 
static char revisionstr [] = "$Revision: 1.51 $"
 
int sigstop = 0
 
int stop = 0
 

Macro Definition Documentation

#define AGENTSTRING   "NTRIP NtripClientPOSIX"

Definition at line 116 of file ntripclient.cpp.

#define ALARMTIME   (2*60)

Definition at line 107 of file ntripclient.cpp.

#define ARGOPT   "-d:m:bhp:r:s:u:n:S:R:M:IP:D:B:T:C:Y:A:l:"

Definition at line 156 of file ntripclient.cpp.

#define closesocket (   sock)    close(sock)

Definition at line 106 of file ntripclient.cpp.

#define COMPILEDATE   " built " __DATE__

Definition at line 112 of file ntripclient.cpp.

#define LONG_OPT (   a)    a

Definition at line 131 of file ntripclient.cpp.

#define MAXDATASIZE   1000 /* max number of bytes we can get at once */

Definition at line 119 of file ntripclient.cpp.

#define myperror   perror

Definition at line 108 of file ntripclient.cpp.

#define TIME_RESOLUTION   125

Definition at line 117 of file ntripclient.cpp.

Typedef Documentation

typedef int sockettype

Definition at line 97 of file ntripclient.cpp.

Function Documentation

void appendNMEA ( char *  buf,
int  i 
)

Definition at line 75 of file ntripclient.cpp.

static int encode ( char *  buf,
int  size,
const char *  user,
const char *  pwd 
)
static

Definition at line 558 of file ntripclient.cpp.

static const char* encodeurl ( const char *  req)
static

Definition at line 187 of file ntripclient.cpp.

static int getargs ( int  argc,
char **  argv,
struct Args args 
)
static

Definition at line 341 of file ntripclient.cpp.

Location getGNGGA ( )

Definition at line 43 of file ntripclient.cpp.

static const char* geturl ( const char *  url,
struct Args args 
)
static

Definition at line 211 of file ntripclient.cpp.

void ntrip_client ( Args *const  args)

Definition at line 600 of file ntripclient.cpp.

static void sighandler_alarm ( int  sig)
static

Definition at line 165 of file ntripclient.cpp.

Variable Documentation

char datestr[] = "$Date: 2009/09/11 09:49:19 $"
static

Definition at line 123 of file ntripclient.cpp.

const char encodingTable[64]
static
Initial value:
= {
'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P',
'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f',
'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v',
'w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/'
}

Definition at line 549 of file ntripclient.cpp.

mutex g_mtx

Definition at line 39 of file ntripclient.cpp.

string g_nmea

Definition at line 40 of file ntripclient.cpp.

struct option opts[]
static
Initial value:
= {
{ "bitrate", no_argument, 0, 'b'},
{ "data", required_argument, 0, 'd'},
{ "mountpoint", required_argument, 0, 'm'},
{ "initudp", no_argument, 0, 'I'},
{ "udpport", required_argument, 0, 'P'},
{ "server", required_argument, 0, 's'},
{ "password", required_argument, 0, 'p'},
{ "port", required_argument, 0, 'r'},
{ "proxyport", required_argument, 0, 'R'},
{ "proxyhost", required_argument, 0, 'S'},
{ "user", required_argument, 0, 'u'},
{ "nmea", required_argument, 0, 'n'},
{ "mode", required_argument, 0, 'M'},
{ "serdevice", required_argument, 0, 'D'},
{ "baud", required_argument, 0, 'B'},
{ "stopbits", required_argument, 0, 'T'},
{ "protocol", required_argument, 0, 'C'},
{ "parity", required_argument, 0, 'Y'},
{ "databits", required_argument, 0, 'A'},
{ "serlogfile", required_argument, 0, 'l'},
{ "help", no_argument, 0, 'h'},
{0,0,0,0}}

Definition at line 132 of file ntripclient.cpp.

char revisionstr[] = "$Revision: 1.51 $"
static

Definition at line 122 of file ntripclient.cpp.

int sigstop = 0

Definition at line 160 of file ntripclient.cpp.

int stop = 0

Definition at line 158 of file ntripclient.cpp.



dgps_ros
Author(s):
autogenerated on Wed Jan 20 2021 03:38:34