Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
downlink.h File Reference

Common code for AP and FBW telemetry. More...

#include <inttypes.h>
#include "generated/modules.h"
#include "messages.h"
#include "generated/airframe.h"
#include "subsystems/datalink/pprz_transport.h"
#include "subsystems/datalink/xbee.h"
+ Include dependency graph for downlink.h:

Go to the source code of this file.

Macros

#define DefaultChannel   DOWNLINK_TRANSPORT
 SITL. More...
 
#define DefaultDevice   DOWNLINK_DEVICE
 
#define __Transport(dev, _x)   dev##_x
 
#define _Transport(dev, _x)   __Transport(dev, _x)
 
#define Transport(_chan, _fun)   _Transport(_chan, _fun)
 
#define DownlinkIDsSize(_trans, _dev, _x)   (_x+2)
 Set of macros for generated code (messages.h) from messages.xml. More...
 
#define DownlinkSizeOf(_trans, _dev, _x)   Transport(_trans, SizeOf(_dev, DownlinkIDsSize(_trans, _dev, _x)))
 
#define DownlinkCheckFreeSpace(_trans, _dev, _x)   Transport(_trans, CheckFreeSpace(_dev, (uint8_t)(_x)))
 
#define DownlinkPutUint8(_trans, _dev, _x)   Transport(_trans, PutUint8(_dev, _x))
 
#define DownlinkPutInt8ByAddr(_trans, _dev, _x)   Transport(_trans, PutInt8ByAddr(_dev, _x))
 
#define DownlinkPutUint8ByAddr(_trans, _dev, _x)   Transport(_trans, PutUint8ByAddr(_dev, _x))
 
#define DownlinkPutInt16ByAddr(_trans, _dev, _x)   Transport(_trans, PutInt16ByAddr(_dev, _x))
 
#define DownlinkPutUint16ByAddr(_trans, _dev, _x)   Transport(_trans, PutUint16ByAddr(_dev, _x))
 
#define DownlinkPutInt32ByAddr(_trans, _dev, _x)   Transport(_trans, PutInt32ByAddr(_dev, _x))
 
#define DownlinkPutUint32ByAddr(_trans, _dev, _x)   Transport(_trans, PutUint32ByAddr(_dev, _x))
 
#define DownlinkPutFloatByAddr(_trans, _dev, _x)   Transport(_trans, PutFloatByAddr(_dev, _x))
 
#define DownlinkPutDoubleByAddr(_trans, _dev, _x)   Transport(_trans, PutDoubleByAddr(_dev, _x))
 
#define DownlinkPutFloatArray(_trans, _dev, _n, _x)   Transport(_trans, PutFloatArray(_dev, _n, _x))
 
#define DownlinkPutDoubleArray(_trans, _dev, _n, _x)   Transport(_trans, PutDoubleArray(_dev, _n, _x))
 
#define DownlinkPutInt16Array(_trans, _dev, _n, _x)   Transport(_trans, PutInt16Array(_dev, _n, _x))
 
#define DownlinkPutUint16Array(_trans, _dev, _n, _x)   Transport(_trans, PutUint16Array(_dev, _n, _x))
 
#define DownlinkPutInt32Array(_trans, _dev, _n, _x)   Transport(_trans, PutInt32Array(_dev, _n, _x))
 
#define DownlinkPutUint32Array(_trans, _dev, _n, _x)   Transport(_trans, PutUint32Array(_dev, _n, _x))
 
#define DownlinkPutUint8Array(_trans, _dev, _n, _x)   Transport(_trans, PutUint8Array(_dev, _n, _x))
 
#define DownlinkOverrun(_trans, _dev)   downlink_nb_ovrn++;
 
#define DownlinkCountBytes(_trans, _dev, _n)   downlink_nb_bytes += _n;
 
#define DownlinkStartMessage(_trans, _dev, _name, msg_id, payload_len)
 
#define DownlinkEndMessage(_trans, _dev)   Transport(_trans, Trailer(_dev))
 

Variables

uint8_t downlink_nb_ovrn
 Counter of messages not sent because of unavailibity of the output buffer. More...
 
uint16_t downlink_nb_bytes
 
uint16_t downlink_nb_msgs
 

Detailed Description

Common code for AP and FBW telemetry.

Definition in file downlink.h.

Macro Definition Documentation

#define __Transport (   dev,
  _x 
)    dev##_x

Definition at line 78 of file downlink.h.

#define _Transport (   dev,
  _x 
)    __Transport(dev, _x)

Definition at line 79 of file downlink.h.

#define DefaultChannel   DOWNLINK_TRANSPORT

SITL.

!SITL

Definition at line 62 of file downlink.h.

Referenced by adc_generic_periodic(), add_slot(), ahrs_update_mag(), airspeed_amsys_read_event(), airspeed_ets_read_event(), alt_filter_periodic(), AOA_adc_update(), ArduIMU_event(), aspirin2_subsystem_downlink_raw(), atmega_i2c_cam_ctrl_event(), atmega_i2c_cam_ctrl_send(), baro_amsys_read_event(), baro_bmp_event(), baro_ets_read_event(), baro_ms5611_event(), baro_ms5611_periodic(), baro_scp_event(), calibration(), charge_sens_event(), dc_info(), dl_parse_msg(), dpicco_event(), dust_gp2y_event(), enose_periodic(), fbw_downlink_periodic_task(), flight_benchmark_periodic(), formation_flight(), geiger_counter_event(), gps_ubx_ucenter_configure(), gsm_event(), hmc5843_module_periodic(), humid_hih_periodic(), humid_htm_event(), humid_sht_event_i2c(), humid_sht_periodic(), humid_sht_periodic_i2c(), IMU_Daten_verarbeiten(), imu_navgo_downlink_raw(), imu_umarim_downlink_raw(), ins_report_task(), ir_mlx_event(), ir_mlx_periodic(), light_solar_periodic(), light_temt_periodic(), lm75_event(), mag_hmc58xx_report(), main_event_task(), main_on_baro_abs(), main_on_vane_msg(), main_periodic(), main_periodic_task(), max11040_periodic(), micromag_event(), monitor_task(), MPPT_ask(), MPPT_periodic(), nav_catapult(), nav_move_waypoint(), navigation_task(), navigation_update_wp_from_speed(), on_gyro_accel_event(), on_vane_msg(), parse_dl_get_setting(), parse_dl_move_wp(), parse_dl_ping(), parse_dl_setting(), parse_ins_msg(), pcap01_event(), periodic_2Hz_openlog(), periodic_downlink_carto(), periodic_report_sysmon(), periodic_task_fbw(), potential_task(), ppzuavimu_module_downlink_raw(), reporting_task(), Send(), spi1_irq_handler(), srf08_event(), start_formation(), stop_formation(), tcas_periodic_task_1Hz(), telecommand_task(), telemetry_periodic(), temod_event(), temp_tcouple_adc_periodic(), test_baro_on_baro_abs(), test_baro_on_baro_diff(), test_baro_periodic(), test_bldc_periodic(), test_uart_event(), tmp102_event(), trigger_ext_periodic(), wind_gfi_event(), windturbine_periodic(), and xtend_rssi_periodic().

#define DefaultDevice   DOWNLINK_DEVICE

Definition at line 66 of file downlink.h.

Referenced by adc_generic_periodic(), add_slot(), ahrs_update_mag(), airspeed_amsys_read_event(), airspeed_ets_read_event(), alt_filter_periodic(), AOA_adc_update(), ArduIMU_event(), aspirin2_subsystem_downlink_raw(), atmega_i2c_cam_ctrl_event(), atmega_i2c_cam_ctrl_send(), baro_amsys_read_event(), baro_bmp_event(), baro_ets_read_event(), baro_ms5611_event(), baro_ms5611_periodic(), baro_scp_event(), calibration(), charge_sens_event(), dc_info(), dl_parse_msg(), dpicco_event(), dust_gp2y_event(), enose_periodic(), fbw_downlink_periodic_task(), flight_benchmark_periodic(), formation_flight(), geiger_counter_event(), gps_ubx_ucenter_configure(), gsm_event(), hmc5843_module_periodic(), humid_hih_periodic(), humid_htm_event(), humid_sht_event_i2c(), humid_sht_periodic(), humid_sht_periodic_i2c(), IMU_Daten_verarbeiten(), imu_navgo_downlink_raw(), imu_umarim_downlink_raw(), ins_report_task(), ir_mlx_event(), ir_mlx_periodic(), light_solar_periodic(), light_temt_periodic(), lm75_event(), mag_hmc58xx_report(), main_event_task(), main_on_baro_abs(), main_on_vane_msg(), main_periodic(), main_periodic_task(), max11040_periodic(), micromag_event(), monitor_task(), MPPT_ask(), MPPT_periodic(), nav_catapult(), nav_move_waypoint(), navigation_task(), navigation_update_wp_from_speed(), on_gyro_accel_event(), on_vane_msg(), parse_dl_get_setting(), parse_dl_move_wp(), parse_dl_ping(), parse_dl_setting(), parse_ins_msg(), pcap01_event(), periodic_2Hz_openlog(), periodic_downlink_carto(), periodic_report_sysmon(), periodic_task_fbw(), potential_task(), ppzuavimu_module_downlink_raw(), reporting_task(), Send(), spi1_irq_handler(), srf08_event(), start_formation(), stop_formation(), tcas_periodic_task_1Hz(), telecommand_task(), telemetry_periodic(), temod_event(), temp_tcouple_adc_periodic(), test_baro_on_baro_abs(), test_baro_on_baro_diff(), test_baro_periodic(), test_bldc_periodic(), test_uart_event(), tmp102_event(), trigger_ext_periodic(), wind_gfi_event(), windturbine_periodic(), and xtend_rssi_periodic().

#define DownlinkCheckFreeSpace (   _trans,
  _dev,
  _x 
)    Transport(_trans, CheckFreeSpace(_dev, (uint8_t)(_x)))

Definition at line 88 of file downlink.h.

#define DownlinkCountBytes (   _trans,
  _dev,
  _n 
)    downlink_nb_bytes += _n;

Definition at line 111 of file downlink.h.

#define DownlinkEndMessage (   _trans,
  _dev 
)    Transport(_trans, Trailer(_dev))

Definition at line 120 of file downlink.h.

#define DownlinkIDsSize (   _trans,
  _dev,
  _x 
)    (_x+2)

Set of macros for generated code (messages.h) from messages.xml.

2 = ac_id + msg_id

Definition at line 85 of file downlink.h.

#define DownlinkOverrun (   _trans,
  _dev 
)    downlink_nb_ovrn++;

Definition at line 110 of file downlink.h.

#define DownlinkPutDoubleArray (   _trans,
  _dev,
  _n,
  _x 
)    Transport(_trans, PutDoubleArray(_dev, _n, _x))

Definition at line 103 of file downlink.h.

#define DownlinkPutDoubleByAddr (   _trans,
  _dev,
  _x 
)    Transport(_trans, PutDoubleByAddr(_dev, _x))

Definition at line 100 of file downlink.h.

#define DownlinkPutFloatArray (   _trans,
  _dev,
  _n,
  _x 
)    Transport(_trans, PutFloatArray(_dev, _n, _x))

Definition at line 102 of file downlink.h.

#define DownlinkPutFloatByAddr (   _trans,
  _dev,
  _x 
)    Transport(_trans, PutFloatByAddr(_dev, _x))

Definition at line 98 of file downlink.h.

#define DownlinkPutInt16Array (   _trans,
  _dev,
  _n,
  _x 
)    Transport(_trans, PutInt16Array(_dev, _n, _x))

Definition at line 104 of file downlink.h.

#define DownlinkPutInt16ByAddr (   _trans,
  _dev,
  _x 
)    Transport(_trans, PutInt16ByAddr(_dev, _x))

Definition at line 94 of file downlink.h.

#define DownlinkPutInt32Array (   _trans,
  _dev,
  _n,
  _x 
)    Transport(_trans, PutInt32Array(_dev, _n, _x))

Definition at line 106 of file downlink.h.

#define DownlinkPutInt32ByAddr (   _trans,
  _dev,
  _x 
)    Transport(_trans, PutInt32ByAddr(_dev, _x))

Definition at line 96 of file downlink.h.

#define DownlinkPutInt8ByAddr (   _trans,
  _dev,
  _x 
)    Transport(_trans, PutInt8ByAddr(_dev, _x))

Definition at line 92 of file downlink.h.

#define DownlinkPutUint16Array (   _trans,
  _dev,
  _n,
  _x 
)    Transport(_trans, PutUint16Array(_dev, _n, _x))

Definition at line 105 of file downlink.h.

#define DownlinkPutUint16ByAddr (   _trans,
  _dev,
  _x 
)    Transport(_trans, PutUint16ByAddr(_dev, _x))

Definition at line 95 of file downlink.h.

#define DownlinkPutUint32Array (   _trans,
  _dev,
  _n,
  _x 
)    Transport(_trans, PutUint32Array(_dev, _n, _x))

Definition at line 107 of file downlink.h.

#define DownlinkPutUint32ByAddr (   _trans,
  _dev,
  _x 
)    Transport(_trans, PutUint32ByAddr(_dev, _x))

Definition at line 97 of file downlink.h.

#define DownlinkPutUint8 (   _trans,
  _dev,
  _x 
)    Transport(_trans, PutUint8(_dev, _x))

Definition at line 90 of file downlink.h.

#define DownlinkPutUint8Array (   _trans,
  _dev,
  _n,
  _x 
)    Transport(_trans, PutUint8Array(_dev, _n, _x))

Definition at line 108 of file downlink.h.

#define DownlinkPutUint8ByAddr (   _trans,
  _dev,
  _x 
)    Transport(_trans, PutUint8ByAddr(_dev, _x))

Definition at line 93 of file downlink.h.

#define DownlinkSizeOf (   _trans,
  _dev,
  _x 
)    Transport(_trans, SizeOf(_dev, DownlinkIDsSize(_trans, _dev, _x)))

Definition at line 86 of file downlink.h.

#define DownlinkStartMessage (   _trans,
  _dev,
  _name,
  msg_id,
  payload_len 
)
Value:
{ \
Transport(_trans, Header(_dev, DownlinkIDsSize(_trans, _dev, payload_len))); \
Transport(_trans, PutUint8(_dev, AC_ID)); \
Transport(_trans, PutNamedUint8(_dev, _name, msg_id)); \
}

Definition at line 113 of file downlink.h.

#define Transport (   _chan,
  _fun 
)    _Transport(_chan, _fun)

Definition at line 80 of file downlink.h.

Variable Documentation

uint16_t downlink_nb_bytes

Definition at line 35 of file downlink.c.

uint16_t downlink_nb_msgs

Definition at line 36 of file downlink.c.

uint8_t downlink_nb_ovrn

Counter of messages not sent because of unavailibity of the output buffer.

Definition at line 34 of file downlink.c.