Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
datalink.c File Reference

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

#include "datalink.h"
#include "modules/datalink/downlink.h"
#include "generated/modules.h"
#include "generated/settings.h"
#include "pprzlink/messages.h"
+ Include dependency graph for datalink.c:

Go to the source code of this file.

Macros

#define MODULES_DATALINK_C
 

Functions

void datalink_init (void)
 init function More...
 
void datalink_periodic (void)
 periodic function, should be called at 1Hz More...
 
void datalink_parse_PING (struct link_device *dev, struct transport_tx *trans, uint8_t *buf)
 
void WEAK 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...
 

Variables

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

Detailed Description

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

Definition in file datalink.c.

Macro Definition Documentation

◆ MODULES_DATALINK_C

#define MODULES_DATALINK_C

Definition at line 28 of file datalink.c.

Function Documentation

◆ datalink_init()

void datalink_init ( void  )

init function

Definition at line 47 of file datalink.c.

References datalink_nb_msgs, datalink_time, and dl_msg_available.

Referenced by main_init().

+ Here is the caller graph for this function:

◆ datalink_parse_PING()

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

Definition at line 59 of file datalink.c.

References dev, and msg.

◆ datalink_periodic()

void datalink_periodic ( void  )

periodic function, should be called at 1Hz

Definition at line 54 of file datalink.c.

References datalink_time.

Referenced by main_periodic_task().

+ Here is the caller graph for this function:

◆ dl_parse_msg()

void WEAK 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 71 of file datalink.c.

References dev.

Referenced by DlCheckAndParse().

+ Here is the caller graph for this function:

Variable Documentation

◆ datalink_nb_msgs

uint16_t datalink_nb_msgs

number of datalink/uplink messages received

Definition at line 40 of file datalink.c.

Referenced by datalink_init(), DlCheckAndParse(), intermcu_event(), and send_downlink().

◆ datalink_time

uint16_t datalink_time

time in seconds since last datalink message was received

Definition at line 39 of file datalink.c.

Referenced by autopilot_failsafe_checks(), datalink_init(), datalink_periodic(), DlCheckAndParse(), intermcu_event(), send_downlink(), and xtend_rssi_periodic().

◆ dl_buffer

uint8_t dl_buffer[MSG_SIZE]

Definition at line 41 of file datalink.c.

◆ dl_msg_available

bool dl_msg_available

Flag provided to control calls to dl_parse_msg.

NOT used in this module

Definition at line 38 of file datalink.c.

Referenced by datalink_init().