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
transport.h File Reference

generic transport header More...

#include <inttypes.h>
#include "mcu_periph/link_device.h"
#include "std.h"
+ Include dependency graph for transport.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  transport_rx
 Generic reception transport header. More...
 
struct  transport_tx
 Generic transmission transport header. More...
 

Macros

#define TRANSPORT_PAYLOAD_LEN   256
 

Typedefs

typedef uint8_t(* size_of_t )(void *, uint8_t)
 Function pointers definition. More...
 
typedef int(* check_available_space_t )(void *, struct link_device *, uint8_t)
 
typedef void(* put_bytes_t )(void *, struct link_device *, enum TransportDataType, enum TransportDataFormat, uint8_t, const void *)
 
typedef void(* put_named_byte_t )(void *, struct link_device *, enum TransportDataType, enum TransportDataFormat, uint8_t, const char *)
 
typedef void(* start_message_t )(void *, struct link_device *, uint8_t)
 
typedef void(* end_message_t )(void *, struct link_device *)
 
typedef void(* overrun_t )(void *, struct link_device *)
 
typedef void(* count_bytes_t )(void *, struct link_device *, uint8_t)
 

Enumerations

enum  TransportDataType {
  DL_TYPE_ARRAY_LENGTH, DL_TYPE_CHAR, DL_TYPE_UINT8, DL_TYPE_INT8,
  DL_TYPE_UINT16, DL_TYPE_INT16, DL_TYPE_UINT32, DL_TYPE_INT32,
  DL_TYPE_UINT64, DL_TYPE_INT64, DL_TYPE_FLOAT, DL_TYPE_DOUBLE,
  DL_TYPE_TIMESTAMP
}
 Data type. More...
 
enum  TransportDataFormat { DL_FORMAT_SCALAR, DL_FORMAT_ARRAY }
 Data format (scalar or array) More...
 

Detailed Description

generic transport header

Definition in file transport.h.


Data Structure Documentation

struct transport_rx

Generic reception transport header.

Definition at line 39 of file transport.h.

Data Fields
uint8_t error overrun and error flags
volatile bool_t msg_received message received flag
uint8_t ovrn
uint8_t payload[TRANSPORT_PAYLOAD_LEN] payload buffer
volatile uint8_t payload_len payload buffer length
struct transport_tx

Generic transmission transport header.

Definition at line 89 of file transport.h.

+ Collaboration diagram for transport_tx:
Data Fields
check_available_space_t check_available_space check if transmit buffer is not full
count_bytes_t count_bytes count bytes to send
end_message_t end_message transport trailer
void * impl pointer to parent implementation
overrun_t overrun overrun
put_bytes_t put_bytes send bytes
put_named_byte_t put_named_byte send a single byte or its name
size_of_t size_of get size of payload with transport header and trailer
start_message_t start_message transport header

Macro Definition Documentation

#define TRANSPORT_PAYLOAD_LEN   256

Definition at line 34 of file transport.h.

Typedef Documentation

typedef int(* check_available_space_t)(void *, struct link_device *, uint8_t)

Definition at line 77 of file transport.h.

typedef void(* count_bytes_t)(void *, struct link_device *, uint8_t)

Definition at line 85 of file transport.h.

typedef void(* end_message_t)(void *, struct link_device *)

Definition at line 83 of file transport.h.

typedef void(* overrun_t)(void *, struct link_device *)

Definition at line 84 of file transport.h.

typedef void(* put_bytes_t)(void *, struct link_device *, enum TransportDataType, enum TransportDataFormat, uint8_t, const void *)

Definition at line 78 of file transport.h.

typedef void(* put_named_byte_t)(void *, struct link_device *, enum TransportDataType, enum TransportDataFormat, uint8_t, const char *)

Definition at line 80 of file transport.h.

typedef uint8_t(* size_of_t)(void *, uint8_t)

Function pointers definition.

they are used to cast the real functions with the correct type to store in the transport structure

Definition at line 76 of file transport.h.

typedef void(* start_message_t)(void *, struct link_device *, uint8_t)

Definition at line 82 of file transport.h.

Enumeration Type Documentation

Data format (scalar or array)

Enumerator
DL_FORMAT_SCALAR 
DL_FORMAT_ARRAY 

Definition at line 66 of file transport.h.

Data type.

Enumerator
DL_TYPE_ARRAY_LENGTH 
DL_TYPE_CHAR 
DL_TYPE_UINT8 
DL_TYPE_INT8 
DL_TYPE_UINT16 
DL_TYPE_INT16 
DL_TYPE_UINT32 
DL_TYPE_INT32 
DL_TYPE_UINT64 
DL_TYPE_INT64 
DL_TYPE_FLOAT 
DL_TYPE_DOUBLE 
DL_TYPE_TIMESTAMP 

Definition at line 48 of file transport.h.