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

COSMOS SLIP support include file. More...

#include "support/configCosmos.h"
#include "support/cosmos-errno.h"
#include <cstring>
Include dependency graph for sliplib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SLIP_FEND   0xC0
 SLIP Buffer End character. More...
 
#define SLIP_FESC   0xDB
 SLIP Buffer Escape character. More...
 
#define SLIP_TFEND   0xDC
 SLIP Buffer Escaped End character. More...
 
#define SLIP_TFESC   0xDD
 SLIP Buffer Escaped Escape character. More...
 

Typedefs

typedef vector< uint8_t > slip_t
 

Functions

int32_t slip_check_crc (uint8_t *sbuf, uint16_t ssize)
 Check SLIP packet CRC. More...
 
int32_t slip_unpack (uint8_t *sbuf, uint16_t ssize, uint8_t *rbuf, uint16_t rsize)
 Unpack SLIP packet. More...
 
int32_t slip_decode (uint8_t *sbuf, uint16_t ssize, uint8_t *rbuf, uint16_t rsize)
 Decode SLIP packet. More...
 
int32_t slip_pack (uint8_t *rbuf, uint16_t rsize, uint8_t *sbuf, uint16_t ssize)
 Pack data in to SLIP packet. More...
 
int32_t slip_encode (uint8_t *rbuf, uint16_t rsize, uint8_t *sbuf, uint16_t ssize)
 Encode data in to SLIP packet. More...
 
uint16_t slip_calc_crc (uint8_t *buf, uint16_t size)
 Calculate CRC-16-CCITT. More...
 
uint16_t slip_get_crc (uint8_t *buf, uint16_t index)
 Get CRC from SLIP buffer. More...
 
uint16_t slip_set_crc (uint8_t *buf, uint16_t index)
 Set CRC for SLIP buffer. More...
 
int32_t slip_check_crc (slip_t &sbuf)
 
int32_t slip_unpack (slip_t &sbuf, slip_t &rbuf)
 
int32_t slip_decode (slip_t &sbuf, slip_t &rbuf)
 
int32_t slip_pack (slip_t &rbuf, slip_t &sbuf)
 
int32_t slip_encode (slip_t &rbuf, slip_t &sbuf)
 
uint16_t slip_calc_crc (slip_t &buf)
 
uint16_t slip_get_crc (slip_t &buf)
 
uint16_t slip_set_crc (slip_t &buf)
 

Detailed Description

COSMOS SLIP support include file.