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
pprzlog_transport.c File Reference

Building and Paparazzi frames with timestamp for data logger. More...

+ Include dependency graph for pprzlog_transport.c:

Go to the source code of this file.

Macros

#define STX_LOG   0x99
 

Functions

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

Variables

struct pprzlog_transport pprzlog_tp
 

Detailed Description

Building and Paparazzi frames with timestamp for data logger.

LOG-message: ABCDEFGHxxxxxxxI A PPRZ_STX (0x99) B LENGTH (H->H) C SOURCE (0=uart0, 1=uart1, 2=i2c0, ...) D TIMESTAMP_LSB (100 microsec raster) E TIMESTAMP F TIMESTAMP G TIMESTAMP_MSB H PPRZ_DATA 0 SENDER_ID 1 MSG_ID 2 MSG_PAYLOAD . DATA (messages.xml) I CHECKSUM (sum[B->H])

Definition in file pprzlog_transport.c.

Macro Definition Documentation

#define STX_LOG   0x99

Definition at line 49 of file pprzlog_transport.c.

Referenced by start_message().

Function Documentation

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

Definition at line 107 of file pprzlog_transport.c.

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

Referenced by pprzlog_transport_init().

+ Here is the caller graph for this function:

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

Definition at line 102 of file pprzlog_transport.c.

Referenced by pprzlog_transport_init().

+ Here is the caller graph for this function:

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

Definition at line 91 of file pprzlog_transport.c.

References pprzlog_transport::ck, link_device::periph, link_device::put_byte, and link_device::send_message.

Referenced by pprzlog_transport_init().

+ Here is the caller graph for this function:

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

Definition at line 97 of file pprzlog_transport.c.

Referenced by pprzlog_transport_init().

+ Here is the caller graph for this function:

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

Definition at line 51 of file pprzlog_transport.c.

References pprzlog_transport::ck, link_device::periph, and link_device::put_byte.

Referenced by put_bytes(), put_named_byte(), and start_message().

+ Here is the caller graph for this function:

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

Definition at line 57 of file pprzlog_transport.c.

References put_1byte().

Referenced by pprzlog_transport_init(), and start_message().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 68 of file pprzlog_transport.c.

References put_1byte().

Referenced by pprzlog_transport_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 75 of file pprzlog_transport.c.

Referenced by pprzlog_transport_init(), and start_message().

+ Here is the caller graph for this function:

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

Definition at line 80 of file pprzlog_transport.c.

References pprzlog_transport::ck, DL_FORMAT_SCALAR, DL_TYPE_TIMESTAMP, get_sys_time_usec(), link_device::periph, put_1byte(), link_device::put_byte, put_bytes(), size_of(), and STX_LOG.

Referenced by pprzlog_transport_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation