Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
datalink.h File Reference

Handling of messages coming from ground and other A/Cs. More...

#include "std.h"
#include "pprzlink/dl_protocol.h"
+ Include dependency graph for datalink.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EXTERN   extern
 
#define PPRZ   1
 Datalink kinds. More...
 
#define XBEE   2
 
#define SUPERBITRF   3
 
#define W5100   4
 
#define BLUEGIGA   5
 
#define MSG_SIZE   256
 
#define DatalinkFillDlBuffer(_buf, _len)
 Convenience macro to fill dl_buffer. More...
 

Functions

EXTERN void dl_parse_msg (struct link_device *dev, struct transport_tx *trans, uint8_t *buf)
 Should be called when chars are available in dl_buffer. More...
 
EXTERN void firmware_parse_msg (struct link_device *dev, struct transport_tx *trans, uint8_t *buf)
 Firmware specfic msg handler. More...
 
static void DlCheckAndParse (struct link_device *dev, struct transport_tx *trans, uint8_t *buf, bool *msg_available, bool update_dl)
 Check for new message and parse. More...
 

Variables

EXTERN bool dl_msg_available
 Flag provided to control calls to dl_parse_msg. More...
 
EXTERN uint16_t datalink_time
 time in seconds since last datalink message was received More...
 
EXTERN uint16_t datalink_nb_msgs
 number of datalink/uplink messages received More...
 
EXTERN uint8_t dl_buffer [MSG_SIZE]
 

Detailed Description

Handling of messages coming from ground and other A/Cs.

Definition in file datalink.h.

Macro Definition Documentation

#define BLUEGIGA   5

Definition at line 44 of file datalink.h.

#define DatalinkFillDlBuffer (   _buf,
  _len 
)
Value:
{ \
uint16_t _i = 0; \
for (_i = 0; _i < _len; _i++) { \
dl_buffer[_i] = _buf[_i]; \
} \
}
unsigned short uint16_t
Definition: types.h:16

Convenience macro to fill dl_buffer.

Definition at line 70 of file datalink.h.

Referenced by gec_dl_event(), superbitrf_receive_packet_cb(), and w5100_check_and_parse().

#define EXTERN   extern

Definition at line 33 of file datalink.h.

#define MSG_SIZE   256

Definition at line 55 of file datalink.h.

#define PPRZ   1

Datalink kinds.

Definition at line 40 of file datalink.h.

#define SUPERBITRF   3

Definition at line 42 of file datalink.h.

#define W5100   4

Definition at line 43 of file datalink.h.

Referenced by w5100_event().

#define XBEE   2

Definition at line 41 of file datalink.h.

Function Documentation

EXTERN void dl_parse_msg ( struct link_device *  dev,
struct transport_tx *  trans,
uint8_t buf 
)

Should be called when chars are available in dl_buffer.

Definition at line 114 of file setup_actuators.c.

References DefaultChannel, DefaultDevice, dev, firmware_parse_msg(), gps_inject_data(), IdOfMsg, LED_TOGGLE, parse_rc_3ch_datalink(), parse_rc_4ch_datalink(), and val.

Referenced by DlCheckAndParse(), and telemetry_intermcu_on_msg().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void DlCheckAndParse ( struct link_device *  dev,
struct transport_tx *  trans,
uint8_t buf,
bool *  msg_available,
bool  update_dl 
)
inlinestatic

Check for new message and parse.

Definition at line 79 of file datalink.h.

References datalink_nb_msgs, datalink_time, and dl_parse_msg().

Referenced by bluegiga_dl_event(), extra_pprz_dl_event(), gec_dl_event(), pprz_dl_event(), set_datalink_message(), superbitrf_dl_event(), w5100_event(), and xbee_dl_event().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

EXTERN uint16_t datalink_nb_msgs

number of datalink/uplink messages received

Definition at line 53 of file datalink.h.

Referenced by DlCheckAndParse().

EXTERN uint16_t datalink_time

time in seconds since last datalink message was received

Definition at line 50 of file datalink.h.

Referenced by DlCheckAndParse().

EXTERN uint8_t dl_buffer[MSG_SIZE]

Definition at line 56 of file datalink.h.

EXTERN bool dl_msg_available

Flag provided to control calls to dl_parse_msg.

NOT used in this module

Definition at line 47 of file datalink.h.