GNSS-SDR 0.0.21
An Open Source GNSS Software Defined Receiver
Loading...
Searching...
No Matches
rtklib_stream.h File Reference

streaming functions More...

#include "rtklib.h"

Go to the source code of this file.

Macros

#define TINTACT   200 /* period for stream active (ms) */
#define SERIBUFFSIZE   4096 /* serial buffer size (bytes) */
#define TIMETAGH_LEN   64 /* time tag file header length */
#define MAXCLI   32 /* max client connection for tcp svr */
#define MAXSTATMSG   32 /* max length of status message */
#define VER_RTKLIB   "2.4.2"
#define NTRIP_AGENT   "RTKLIB/" VER_RTKLIB
#define NTRIP_CLI_PORT   2101 /* default ntrip-client connection port */
#define NTRIP_SVR_PORT   80 /* default ntrip-server connection port */
#define NTRIP_MAXRSP   32768 /* max size of ntrip response */
#define NTRIP_MAXSTR   256 /* max length of mountpoint string */
#define NTRIP_RSP_OK_CLI   "ICY 200 OK\r\n" /* ntrip response: client */
#define NTRIP_RSP_OK_SVR   "OK\r\n" /* ntrip response: server */
#define NTRIP_RSP_SRCTBL   "SOURCETABLE 200 OK\r\n" /* ntrip response: source table */
#define NTRIP_RSP_TBLEND   "ENDSOURCETABLE"
#define NTRIP_RSP_HTTP   "HTTP/" /* ntrip response: http */
#define NTRIP_RSP_ERROR   "ERROR" /* ntrip response: error */
#define FTP_CMD   "wget" /* ftp/http command */
#define FTP_TIMEOUT   30 /* ftp/http timeout (s) */

Functions

serial_topenserial (const char *path, int mode, char *msg)
void closeserial (serial_t *serial)
int readserial (serial_t *serial, unsigned char *buff, int n, char *msg)
int writeserial (serial_t *serial, unsigned char *buff, int n, char *msg)
int stateserial (serial_t *serial)
int openfile_ (file_t *file, gtime_t time, char *msg)
void closefile_ (file_t *file)
file_topenfile (const char *path, int mode, char *msg)
void closefile (file_t *file)
void swapfile (file_t *file, gtime_t time, char *msg)
void swapclose (file_t *file)
int statefile (file_t *file)
int readfile (file_t *file, unsigned char *buff, int nmax, char *msg)
int writefile (file_t *file, unsigned char *buff, int n, char *msg)
void syncfile (file_t *file1, file_t *file2)
void decodetcppath (const char *path, char *addr, char *port, char *user, char *passwd, char *mntpnt, char *str)
int errsock ()
int setsock (socket_t sock, char *msg)
socket_t accept_nb (socket_t sock, struct sockaddr *addr, socklen_t *len)
int connect_nb (socket_t sock, struct sockaddr *addr, socklen_t len)
int recv_nb (socket_t sock, unsigned char *buff, int n)
int send_nb (socket_t sock, unsigned char *buff, int n)
int gentcp (tcp_t *tcp, int type, char *msg)
void discontcp (tcp_t *tcp, int tcon)
tcpsvr_topentcpsvr (const char *path, char *msg)
void closetcpsvr (tcpsvr_t *tcpsvr)
void updatetcpsvr (tcpsvr_t *tcpsvr, char *msg)
int accsock (tcpsvr_t *tcpsvr, char *msg)
int waittcpsvr (tcpsvr_t *tcpsvr, char *msg)
int readtcpsvr (tcpsvr_t *tcpsvr, unsigned char *buff, int n, char *msg)
int writetcpsvr (tcpsvr_t *tcpsvr, unsigned char *buff, int n, char *msg)
int statetcpsvr (tcpsvr_t *tcpsvr)
int consock (tcpcli_t *tcpcli, char *msg)
tcpcli_topentcpcli (const char *path, char *msg)
void closetcpcli (tcpcli_t *tcpcli)
int waittcpcli (tcpcli_t *tcpcli, char *msg)
int readtcpcli (tcpcli_t *tcpcli, unsigned char *buff, int n, char *msg)
int writetcpcli (tcpcli_t *tcpcli, unsigned char *buff, int n, char *msg)
int statetcpcli (tcpcli_t *tcpcli)
int encbase64 (char *str, const unsigned char *byte, int n)
int reqntrip_s (ntrip_t *ntrip, char *msg)
int reqntrip_c (ntrip_t *ntrip, char *msg)
int rspntrip_s (ntrip_t *ntrip, char *msg)
int rspntrip_c (ntrip_t *ntrip, char *msg)
int waitntrip (ntrip_t *ntrip, char *msg)
ntrip_topenntrip (const char *path, int type, char *msg)
void closentrip (ntrip_t *ntrip)
int readntrip (ntrip_t *ntrip, unsigned char *buff, int n, char *msg)
int writentrip (ntrip_t *ntrip, unsigned char *buff, int n, char *msg)
int statentrip (ntrip_t *ntrip)
void decodeftppath (const char *path, char *addr, char *file, char *user, char *passwd, int *topts)
gtime_t nextdltime (const int *topts, int stat)
void * ftpthread (void *arg)
ftp_topenftp (const char *path, int type, char *msg)
void closeftp (ftp_t *ftp)
int readftp (ftp_t *ftp, unsigned char *buff, int n, char *msg)
int stateftp (ftp_t *ftp)
void strinitcom ()
void strinit (stream_t *stream)
int stropen (stream_t *stream, int type, int mode, const char *path)
void strclose (stream_t *stream)
void strsync (stream_t *stream1, stream_t *stream2)
void strlock (stream_t *stream)
void strunlock (stream_t *stream)
int strread (stream_t *stream, unsigned char *buff, int n)
int strwrite (stream_t *stream, unsigned char *buff, int n)
int strstat (stream_t *stream, char *msg)
void strsum (stream_t *stream, int *inb, int *inr, int *outb, int *outr)
void strsetopt (const int *opt)
void strsettimeout (stream_t *stream, int inactive_timeout, int tirecon)
void strsetdir (const char *dir)
void strsetproxy (const char *addr)
gtime_t strgettime (stream_t *stream)
void strsendnmea (stream_t *stream, const double *pos)
int gen_hex (const char *msg, unsigned char *buff)
void strsendcmd (stream_t *str, const char *cmd)

Detailed Description

streaming functions

Authors
  • 2007-2013, T. Takasu
  • 2017, Javier Arribas
  • 2017, Carles Fernandez

This is a derived work from RTKLIB http://www.rtklib.com/ The original source code at https://github.com/tomojitakasu/RTKLIB is released under the BSD 2-clause license with an additional exclusive clause that does not apply here. This additional clause is reproduced below:

" The software package includes some companion executive binaries or shared libraries necessary to execute APs on Windows. These licenses succeed to the original ones of these software. "

Neither the executive binaries nor the shared libraries are required by, used or included in GNSS-SDR.


Copyright (C) 2007-2013, T. Takasu Copyright (C) 2017, Javier Arribas Copyright (C) 2017, Carles Fernandez All rights reserved.

SPDX-License-Identifier: BSD-2-Clause


Definition in file rtklib_stream.h.

Macro Definition Documentation

◆ FTP_CMD

#define FTP_CMD   "wget" /* ftp/http command */

Definition at line 58 of file rtklib_stream.h.

◆ FTP_TIMEOUT

#define FTP_TIMEOUT   30 /* ftp/http timeout (s) */

Definition at line 59 of file rtklib_stream.h.

◆ MAXCLI

#define MAXCLI   32 /* max client connection for tcp svr */

Definition at line 42 of file rtklib_stream.h.

◆ MAXSTATMSG

#define MAXSTATMSG   32 /* max length of status message */

Definition at line 43 of file rtklib_stream.h.

◆ NTRIP_AGENT

#define NTRIP_AGENT   "RTKLIB/" VER_RTKLIB

Definition at line 46 of file rtklib_stream.h.

◆ NTRIP_CLI_PORT

#define NTRIP_CLI_PORT   2101 /* default ntrip-client connection port */

Definition at line 47 of file rtklib_stream.h.

◆ NTRIP_MAXRSP

#define NTRIP_MAXRSP   32768 /* max size of ntrip response */

Definition at line 49 of file rtklib_stream.h.

◆ NTRIP_MAXSTR

#define NTRIP_MAXSTR   256 /* max length of mountpoint string */

Definition at line 50 of file rtklib_stream.h.

◆ NTRIP_RSP_ERROR

#define NTRIP_RSP_ERROR   "ERROR" /* ntrip response: error */

Definition at line 56 of file rtklib_stream.h.

◆ NTRIP_RSP_HTTP

#define NTRIP_RSP_HTTP   "HTTP/" /* ntrip response: http */

Definition at line 55 of file rtklib_stream.h.

◆ NTRIP_RSP_OK_CLI

#define NTRIP_RSP_OK_CLI   "ICY 200 OK\r\n" /* ntrip response: client */

Definition at line 51 of file rtklib_stream.h.

◆ NTRIP_RSP_OK_SVR

#define NTRIP_RSP_OK_SVR   "OK\r\n" /* ntrip response: server */

Definition at line 52 of file rtklib_stream.h.

◆ NTRIP_RSP_SRCTBL

#define NTRIP_RSP_SRCTBL   "SOURCETABLE 200 OK\r\n" /* ntrip response: source table */

Definition at line 53 of file rtklib_stream.h.

◆ NTRIP_RSP_TBLEND

#define NTRIP_RSP_TBLEND   "ENDSOURCETABLE"

Definition at line 54 of file rtklib_stream.h.

◆ NTRIP_SVR_PORT

#define NTRIP_SVR_PORT   80 /* default ntrip-server connection port */

Definition at line 48 of file rtklib_stream.h.

◆ SERIBUFFSIZE

#define SERIBUFFSIZE   4096 /* serial buffer size (bytes) */

Definition at line 40 of file rtklib_stream.h.

◆ TIMETAGH_LEN

#define TIMETAGH_LEN   64 /* time tag file header length */

Definition at line 41 of file rtklib_stream.h.

◆ TINTACT

#define TINTACT   200 /* period for stream active (ms) */

Definition at line 39 of file rtklib_stream.h.

◆ VER_RTKLIB

#define VER_RTKLIB   "2.4.2"

Definition at line 45 of file rtklib_stream.h.