COSMOS core  1.0.2 (beta)
Comprehensive Open-architecture Solution for Mission Operations Systems
cssl_lib.cpp File Reference

Simple Serial library source file. More...

#include "support/configCosmos.h"
#include <stdio.h>
#include <cstring>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include "device/general/cssl_lib.h"
Include dependency graph for cssl_lib.cpp:
This graph shows which files directly or indirectly include this file:

Functions

const char * cssl_geterrormsg ()
 
int32_t cssl_geterror ()
 
int32_t cssl_start ()
 
int32_t cssl_stop ()
 
cssl_tcssl_open (const char *fname, int baud, int bits, int parity, int stop)
 
int32_t cssl_close (cssl_t *serial)
 
int32_t cssl_setup (cssl_t *serial, int baud, int bits, int parity, int stop)
 
int32_t cssl_setflowcontrol (cssl_t *serial, int rtscts, int xonxoff)
 
int32_t cssl_settimeout (cssl_t *serial, int, double timeout)
 Set read timeout. More...
 
int32_t cssl_putchar (cssl_t *serial, uint8_t c)
 
int32_t cssl_putstring (cssl_t *serial, char *str)
 
int32_t cssl_putdata (cssl_t *serial, uint8_t *data, uint32_t datalen)
 
int32_t cssl_putslip (cssl_t *serial, uint8_t *buf, size_t size)
 
int32_t cssl_putnmea (cssl_t *serial, uint8_t *buf, size_t size)
 
int32_t cssl_drain (cssl_t *serial)
 
int32_t cssl_getchar (cssl_t *serial)
 
int32_t cssl_getdata (cssl_t *serial, uint8_t *buffer, int size)
 
int32_t cssl_getxmodem (cssl_t *serial, uint8_t *buf)
 Read Xmodem frame. More...
 
int32_t cssl_getslip (cssl_t *serial, uint8_t *buf, uint16_t size)
 Read SLIP frame. More...
 
int32_t cssl_getnmea (cssl_t *serial, uint8_t *buf, uint16_t size)
 Read NMEA response. More...
 

Variables

static int cssl_started =0
 
static cssl_thead =0
 
static const char * cssl_errors []
 
static cssl_error_t cssl_error =CSSL_OK
 

Detailed Description

Simple Serial library source file.

Variable Documentation

int cssl_started =0
static
cssl_t* head =0
static
const char* cssl_errors[]
static
Initial value:
= {
"cssl: OK",
"cssl: there's no free signal",
"cssl: not started",
"cssl: null pointer",
"cssl: oops",
"cssl: out of memory",
"cssl: cannot open file"
}
cssl_error_t cssl_error =CSSL_OK
static