#include "bufferarray.h"
#include "config.h"
#include <mutex>
#include <pthread.h>
#include <string>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iowatch.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/param.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/types.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <termios.h>
#include <signal.h>
#include <fcntl.h>
#include "link.h"
#include "mp_serial.h"
#include "ncp_log.h"
#include "datalink.h"
Go to the source code of this file.
|
| static void | usr1handler (int sig) |
| | Signal handler does nothing. More...
|
| |
| void | log_data (unsigned short options, unsigned short category, std::string description, unsigned char *buffer, int length) |
| |
| static void * | data_pump_thread (void *arg) |
| |
◆ BAUD_RATES_TABLE_SIZE
◆ BUFLEN
◆ BUFMASK
◆ hasData
| #define hasData |
( |
|
dir | ) |
(dir##Write != dir##Read) |
◆ hasSpace
| #define hasSpace |
( |
|
dir | ) |
(((dir##Write + 1) & BUFMASK) != dir##Read) |
◆ inc1
| #define inc1 |
( |
|
idx | ) |
inca(idx, 1) |
◆ inca
| #define inca |
( |
|
idx, |
|
|
|
amount |
|
) |
| |
◆ normalize
| #define normalize |
( |
|
idx | ) |
do { idx &= BUFMASK; } while (0) |
◆ data_pump_thread()
| static void * data_pump_thread |
( |
void * |
arg | ) |
|
|
static |
◆ log_data()
| void log_data |
( |
unsigned short |
options, |
|
|
unsigned short |
category, |
|
|
std::string |
description, |
|
|
unsigned char * |
buffer, |
|
|
int |
length |
|
) |
| |
◆ usr1handler()
| static void usr1handler |
( |
int |
sig | ) |
|
|
static |
Signal handler does nothing.
It just exists for having the select() below return an interrupted system call.
Definition at line 66 of file datalink.cc.
◆ kBaudRatesTable
| const int kBaudRatesTable[] |
|
static |
Initial value:= {
115200,
57600,
38400,
19200,
9600,
}
Definition at line 207 of file datalink.cc.