Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
abi_common.h File Reference

Common tools for ABI middleware. More...

Include dependency graph for abi_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  abi_struct
 Event structure to store callbacks in a linked list. More...

Macros

#define ABI_EXTERN   extern
#define ABI_CHECK_MAIN_THREAD   FALSE
 ABI messages must be sent from the main thread (the one running the periodic and event functions): their receivers are not thread-safe.
#define abi_check_thread(_msg_id)
#define ABI_BROADCAST   255
 Broadcast address.
#define ABI_DISABLE   0
 Reserved ABI ID to disable callback.
#define TEMPERATURE_TYPE_AIR   0
 Types of the TEMPERATURE_RAW message, what the temperature measures.
#define TEMPERATURE_TYPE_DIFF   1
 differential pressure (pitot) sensor
#define TEMPERATURE_TYPE_BARO   2
 barometer die
#define TEMPERATURE_TYPE_IMU   3
 IMU die.
#define TEMPERATURE_TYPE_OTHER   4
 anything else
#define ABI_FOREACH(head, el)
 Macros for linked list.
#define ABI_PREPEND(head, add)

Typedefs

typedef void(* abi_callback) (void)
 Generic callback definition.
typedef struct abi_struct abi_event

Detailed Description

Common tools for ABI middleware.

Definition in file abi_common.h.


Data Structure Documentation

◆ abi_struct

struct abi_struct

Event structure to store callbacks in a linked list.

Definition at line 96 of file abi_common.h.

Collaboration diagram for abi_struct:
Data Fields
abi_callback cb
uint8_t id
struct abi_struct * next

Macro Definition Documentation

◆ ABI_BROADCAST

◆ ABI_CHECK_MAIN_THREAD

#define ABI_CHECK_MAIN_THREAD   FALSE

ABI messages must be sent from the main thread (the one running the periodic and event functions): their receivers are not thread-safe.

With ABI_CHECK_MAIN_THREAD every message checks it, and one sent from another thread stops the program at that call (abort in NPS/SITL, halt on ChibiOS), to find it with the debugger. Default TRUE in NPS/SITL, FALSE otherwise. Needs the threads module.

Definition at line 62 of file abi_common.h.

◆ abi_check_thread

#define abi_check_thread ( _msg_id)
Value:
{}

Definition at line 70 of file abi_common.h.

◆ ABI_DISABLE

◆ ABI_EXTERN

#define ABI_EXTERN   extern

Definition at line 49 of file abi_common.h.

◆ ABI_FOREACH

#define ABI_FOREACH ( head,
el )
Value:
for(el=head; el; el=el->next)

Macros for linked list.

Definition at line 104 of file abi_common.h.

Referenced by cmd_abi().

◆ ABI_PREPEND

#define ABI_PREPEND ( head,
add )
Value:
{ (add)->next = head; head = add; }

Definition at line 105 of file abi_common.h.

◆ TEMPERATURE_TYPE_AIR

#define TEMPERATURE_TYPE_AIR   0

Types of the TEMPERATURE_RAW message, what the temperature measures.

outside air temperature probe

Definition at line 89 of file abi_common.h.

Referenced by air_data_rank_temp(), airspeed_uavcan_cb(), meteo_stick_event(), and nps_autopilot_run_step().

◆ TEMPERATURE_TYPE_BARO

◆ TEMPERATURE_TYPE_DIFF

#define TEMPERATURE_TYPE_DIFF   1

differential pressure (pitot) sensor

Definition at line 90 of file abi_common.h.

Referenced by air_data_rank_temp(), mag_pitot_parse_msg(), ms45xx_i2c_event(), and sdp3x_event().

◆ TEMPERATURE_TYPE_IMU

#define TEMPERATURE_TYPE_IMU   3

◆ TEMPERATURE_TYPE_OTHER

#define TEMPERATURE_TYPE_OTHER   4

anything else

Definition at line 93 of file abi_common.h.

Referenced by temp_raw_cb().

Typedef Documentation

◆ abi_callback

typedef void(* abi_callback) (void)

Generic callback definition.

Definition at line 74 of file abi_common.h.

◆ abi_event

typedef struct abi_struct abi_event

Definition at line 101 of file abi_common.h.