Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
Common tools for periodic telemetry interface Allows subsystem to register callback functions. More...
#include <inttypes.h>
#include "std.h"
#include "mcu_periph/link_device.h"
#include "subsystems/datalink/transport.h"
#include "messages.h"
Go to the source code of this file.
Data Structures | |
struct | telemetry_cb_slots |
struct | periodic_telemetry |
Periodic telemetry structure. More... | |
Macros | |
#define | TELEMETRY_NB_CBS 4 |
number of callbacks that can be registered per msg More... | |
Typedefs | |
typedef void(* | telemetry_cb )(struct transport_tx *trans, struct link_device *dev) |
Telemetry callback definition. More... | |
typedef const char | telemetry_msg [64] |
periodic telemetry msg name definition More... | |
Functions | |
static int8_t | register_periodic_telemetry (struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb) |
Register a telemetry callback function. More... | |
void | periodic_telemetry_err_report (uint8_t _process, uint8_t _mode, uint8_t _id) |
Send an error report when trying to send message that as not been register. More... | |
Common tools for periodic telemetry interface Allows subsystem to register callback functions.
Definition in file telemetry_common.h.
struct telemetry_cb_slots |
Definition at line 49 of file telemetry_common.h.
Data Fields | ||
---|---|---|
uint8_t | id | id of telemetry message |
telemetry_cb | slots[TELEMETRY_NB_CBS] |
struct periodic_telemetry |
Periodic telemetry structure.
Contains the total number of messages (from generated telemetry file) and the list of registered callbacks
Definition at line 58 of file telemetry_common.h.
Data Fields | ||
---|---|---|
struct telemetry_cb_slots * | cbs | array of callbacks defined through TELEMETRY_MSG |
uint8_t | nb | number of messages |
#define TELEMETRY_NB_CBS 4 |
number of callbacks that can be registered per msg
Definition at line 47 of file telemetry_common.h.
Referenced by register_periodic_telemetry().
typedef void(* telemetry_cb)(struct transport_tx *trans, struct link_device *dev) |
Telemetry callback definition.
Definition at line 40 of file telemetry_common.h.
typedef const char telemetry_msg[64] |
periodic telemetry msg name definition
Definition at line 44 of file telemetry_common.h.
Send an error report when trying to send message that as not been register.
_process | telemetry process id |
_mode | telemetry mode |
_id | id of the message |
_process | telemetry process id |
_mode | telemetry mode |
_id | id of the message in telemetry system (see var/<AC>/generated/periodic_telemetry.h) |
Definition at line 78 of file telemetry.c.
References DefaultChannel, and DefaultDevice.
|
inlinestatic |
Register a telemetry callback function.
empty implementation is provided if PERIODIC_TELEMETRY is not set or set to FALSE
_pt | periodic telemetry structure to register |
<em>id | message ID (use PPRZ_MSG_ID<message_name> define) |
_cb | callback function, called according to telemetry mode and specified period |
Definition at line 73 of file telemetry_common.h.