Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
abi_common.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2011 ENAC - Gautier Hattenberger
3 *
4 * This file is part of paparazzi.
5 *
6 * paparazzi is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * paparazzi is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with paparazzi; see the file COPYING. If not, write to
18 * the Free Software Foundation, 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
21
27
28#ifndef ABI_COMMON_H
29#define ABI_COMMON_H
30
31/* Include pprz math library */
32#include "std.h"
35#include "modules/gps/gps.h"
39/* Include here headers with structure definition you may want to use with ABI
40 * Ex: '#include "modules/gps/gps.h"' in order to use the GpsState structure
41 */
42
44
45/* Some magic to avoid to compile C code, only headers */
46#ifdef ABI_C
47#define ABI_EXTERN
48#else
49#define ABI_EXTERN extern
50#endif
51
58#ifndef ABI_CHECK_MAIN_THREAD
59#ifdef SITL
60#define ABI_CHECK_MAIN_THREAD TRUE
61#else
62#define ABI_CHECK_MAIN_THREAD FALSE
63#endif
64#endif
65
66#if ABI_CHECK_MAIN_THREAD && PPRZ_THREADS
68#define abi_check_thread(_msg_id) pprz_thread_assert_main("ABI message", _msg_id)
69#else
70#define abi_check_thread(_msg_id) {}
71#endif
72
74typedef void (*abi_callback)(void);
75
80#define ABI_BROADCAST 255
81
86#define ABI_DISABLE 0
87
89#define TEMPERATURE_TYPE_AIR 0
90#define TEMPERATURE_TYPE_DIFF 1
91#define TEMPERATURE_TYPE_BARO 2
92#define TEMPERATURE_TYPE_IMU 3
93#define TEMPERATURE_TYPE_OTHER 4
94
101typedef struct abi_struct abi_event;
102
104#define ABI_FOREACH(head,el) for(el=head; el; el=el->next)
105#define ABI_PREPEND(head,add) { (add)->next = head; head = add; }
106
107#endif /* ABI_COMMON_H */
108
struct abi_struct * next
Definition abi_common.h:99
abi_callback cb
Definition abi_common.h:98
uint8_t id
Definition abi_common.h:97
struct abi_struct abi_event
Definition abi_common.h:101
void(* abi_callback)(void)
Generic callback definition.
Definition abi_common.h:74
Event structure to store callbacks in a linked list.
Definition abi_common.h:96
Convenience defines for ABI sender IDs.
Uses a T4 Actuators Board as fly by wire system. This Board can control serial bus servos,...
Device independent GPS code (interface).
Hardware independent API for actuators (servos, motor controllers).
Paparazzi floating point algebra.
Paparazzi fixed point algebra.
Generic interface for radio control modules.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.