Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
pprz_transport.c File Reference

Building and parsing Paparazzi frames. More...

+ Include dependency graph for pprz_transport.c:

Go to the source code of this file.

Functions

static void put_1byte (struct pprz_transport *trans, struct link_device *dev, const uint8_t byte)
 
static void put_bytes (struct pprz_transport *trans, struct link_device *dev, enum TransportDataType type, enum TransportDataFormat format, uint8_t len, const void *bytes)
 
static void put_named_byte (struct pprz_transport *trans, struct link_device *dev, enum TransportDataType type, enum TransportDataFormat format, uint8_t byte, const char *name)
 
static uint8_t size_of (struct pprz_transport *trans, uint8_t len)
 
static void start_message (struct pprz_transport *trans, struct link_device *dev, uint8_t payload_len)
 
static void end_message (struct pprz_transport *trans, struct link_device *dev)
 
static void overrun (struct pprz_transport *trans, struct link_device *dev)
 
static void count_bytes (struct pprz_transport *trans, struct link_device *dev, uint8_t bytes)
 
static int check_available_space (struct pprz_transport *trans, struct link_device *dev, uint8_t bytes)
 
void pprz_transport_init (struct pprz_transport *t)
 

Variables

struct pprz_transport pprz_tp
 

Detailed Description

Building and parsing Paparazzi frames.

Pprz frame:

|STX|length|... payload=(length-4) bytes ...|Checksum A|Checksum B|

where checksum is computed over length and payload:

ck_A = ck_B = length
for each byte b in payload
ck_A += b;
ck_b += ck_A;

Definition in file pprz_transport.c.

Function Documentation

static int check_available_space ( struct pprz_transport trans,
struct link_device dev,
uint8_t  bytes 
)
static

Definition at line 111 of file pprz_transport.c.

References link_device::check_free_space, and link_device::periph.

Referenced by pprz_transport_init().

+ Here is the caller graph for this function:

static void count_bytes ( struct pprz_transport trans,
struct link_device dev,
uint8_t  bytes 
)
static

Definition at line 105 of file pprz_transport.c.

References link_device::nb_bytes.

Referenced by pprz_transport_init().

+ Here is the caller graph for this function:

static void end_message ( struct pprz_transport trans,
struct link_device dev 
)
static

Definition at line 92 of file pprz_transport.c.

References pprz_transport::ck_a_tx, pprz_transport::ck_b_tx, link_device::periph, link_device::put_byte, and link_device::send_message.

Referenced by pprz_transport_init().

+ Here is the caller graph for this function:

static void overrun ( struct pprz_transport trans,
struct link_device dev 
)
static

Definition at line 99 of file pprz_transport.c.

References link_device::nb_ovrn.

Referenced by pprz_transport_init().

+ Here is the caller graph for this function:

static void put_1byte ( struct pprz_transport trans,
struct link_device dev,
const uint8_t  byte 
)
static

Definition at line 51 of file pprz_transport.c.

References pprz_transport::ck_a_tx, pprz_transport::ck_b_tx, link_device::periph, and link_device::put_byte.

Referenced by put_bytes(), and put_named_byte().

+ Here is the caller graph for this function:

static void put_bytes ( struct pprz_transport trans,
struct link_device dev,
enum TransportDataType  type,
enum TransportDataFormat  format,
uint8_t  len,
const void *  bytes 
)
static

Definition at line 58 of file pprz_transport.c.

References put_1byte().

Referenced by pprz_transport_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void put_named_byte ( struct pprz_transport trans,
struct link_device dev,
enum TransportDataType  type,
enum TransportDataFormat  format,
uint8_t  byte,
const char *  name 
)
static

Definition at line 69 of file pprz_transport.c.

References put_1byte().

Referenced by pprz_transport_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uint8_t size_of ( struct pprz_transport trans,
uint8_t  len 
)
static

Definition at line 76 of file pprz_transport.c.

Referenced by pprz_transport_init(), and start_message().

+ Here is the caller graph for this function:

static void start_message ( struct pprz_transport trans,
struct link_device dev,
uint8_t  payload_len 
)
static

Definition at line 82 of file pprz_transport.c.

References pprz_transport::ck_a_tx, pprz_transport::ck_b_tx, link_device::nb_msgs, link_device::periph, link_device::put_byte, size_of(), and STX.

Referenced by pprz_transport_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

struct pprz_transport pprz_tp

Definition at line 49 of file pprz_transport.c.

Referenced by downlink_init().