29 #ifndef TELEMETRY_COMMON_H
30 #define TELEMETRY_COMMON_H
38 #include "pprzlink/pprzlink_device.h"
39 #include "pprzlink/pprzlink_transport.h"
40 #include "pprzlink/messages.h"
44 typedef void (*
telemetry_cb)(
struct transport_tx *trans,
struct link_device *
dev);
51 #define TELEMETRY_NB_CBS 4
78 #if PERIODIC_TELEMETRY
82 uint8_t _id __attribute__((unused)),
telemetry_cb _cb __attribute__((unused))) {
return -1; }
85 #if USE_PERIODIC_TELEMETRY_REPORT
static const struct usb_device_descriptor dev
telemetry_cb slots[TELEMETRY_NB_CBS]
const char telemetry_msg[64]
periodic telemetry msg name definition
#define TELEMETRY_NB_CBS
number of callbacks that can be registered per msg
void telemetry_reporting_task(void)
Periodic task.
void(* telemetry_cb)(struct transport_tx *trans, struct link_device *dev)
Telemetry callback definition.
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.
uint8_t id
id of telemetry message
struct telemetry_cb_slots * cbs
array of callbacks defined through TELEMETRY_MSG
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.
uint8_t nb
number of messages
Periodic telemetry structure.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
signed char int8_t
Typedef defining 8 bit char type.