Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
Building and parsing Paparazzi frames. More...
#include <inttypes.h>
#include "subsystems/datalink/downlink.h"
#include "subsystems/datalink/pprz_transport.h"
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 |
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:
Definition in file pprz_transport.c.
|
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().
|
static |
Definition at line 105 of file pprz_transport.c.
References link_device::nb_bytes.
Referenced by pprz_transport_init().
|
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().
|
static |
Definition at line 99 of file pprz_transport.c.
References link_device::nb_ovrn.
Referenced by pprz_transport_init().
void pprz_transport_init | ( | struct pprz_transport * | t | ) |
Definition at line 117 of file pprz_transport.c.
References transport_tx::check_available_space, check_available_space(), transport_tx::count_bytes, count_bytes(), end_message(), transport_tx::end_message, FALSE, transport_tx::impl, transport_rx::msg_received, transport_tx::overrun, overrun(), put_bytes(), transport_tx::put_bytes, put_named_byte(), transport_tx::put_named_byte, size_of(), transport_tx::size_of, start_message(), transport_tx::start_message, pprz_transport::status, pprz_transport::trans_rx, pprz_transport::trans_tx, and UNINIT.
Referenced by downlink_init(), extra_pprz_dl_init(), and intermcu_init().
|
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().
|
static |
Definition at line 58 of file pprz_transport.c.
References put_1byte().
Referenced by pprz_transport_init().
|
static |
Definition at line 69 of file pprz_transport.c.
References put_1byte().
Referenced by pprz_transport_init().
|
static |
Definition at line 76 of file pprz_transport.c.
Referenced by pprz_transport_init(), and start_message().
|
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().
struct pprz_transport pprz_tp |
Definition at line 49 of file pprz_transport.c.
Referenced by downlink_init().