Paparazzi UAS  v5.15_devel-109-gee85905
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
extra_pprz_dl.c File Reference

Extra datalink and telemetry using PPRZ protocol. More...

+ Include dependency graph for extra_pprz_dl.c:

Go to the source code of this file.

Macros

#define PERIODIC_C_EXTRA
 

Functions

void extra_pprz_dl_init (void)
 Init function. More...
 
void extra_pprz_dl_event (void)
 Datalink Event. More...
 
void extra_pprz_dl_periodic (void)
 Periodic function. More...
 

Variables

bool extra_dl_msg_available
 
uint8_t extra_dl_buffer [MSG_SIZE]
 
struct pprz_transport extra_pprz_tp
 

Detailed Description

Extra datalink and telemetry using PPRZ protocol.

NOTES (for future reference): This note is not needed unless we want to define our own messages - in such case you would define the two structs below and then define individual messages and registered them in the same way as periodic telemetry. struct telemetry_cb_slots telemetry_cbs_logger[TELEMETRY_PPRZ_NB_MSG] = TELEMETRY_PPRZ_CBS; struct periodic_telemetry logger_telemetry = { TELEMETRY_PPRZ_NB_MSG, telemetry_cbs_logger };

The registration should be done in the init function: register_periodic_telemetry(&extra_telemetry, PPRZ_MSG_ID_xxx, send_xxx_message);

Two extra notes for the periodic function: 1) this sends registered messages from ExtraTelemetry process (as mentioned above) over dedicated port do: periodic_telemetry_send_ExtraTelemetry(&extra_telemetry, &pprz_tp_extra.trans_tx, &(EXTRA_TELEMETRY_PORT).device); 2) to send ExtraTelemetry messages over default channel just change to: periodic_telemetry_send_ExtraTelemetry(DefaultPeriodic, &(DefaultChannel).trans_tx, &(DefaultDevice).device);

Definition in file extra_pprz_dl.c.

Macro Definition Documentation

#define PERIODIC_C_EXTRA

Definition at line 44 of file extra_pprz_dl.c.

Function Documentation

void extra_pprz_dl_event ( void  )

Datalink Event.

Definition at line 60 of file extra_pprz_dl.c.

References DlCheckAndParse(), extra_dl_buffer, extra_dl_msg_available, and extra_pprz_tp.

+ Here is the call graph for this function:

void extra_pprz_dl_init ( void  )

Init function.

Definition at line 54 of file extra_pprz_dl.c.

References extra_pprz_tp.

void extra_pprz_dl_periodic ( void  )

Periodic function.

should be called at TELEMETRY_FREQUENCY

Definition at line 67 of file extra_pprz_dl.c.

References DefaultPeriodic, and extra_pprz_tp.

Variable Documentation

bool extra_dl_msg_available

Definition at line 49 of file extra_pprz_dl.c.

Referenced by extra_pprz_dl_event().