PX4 Firmware
PX4 Autopilot Software http://px4.io
vehicle_status.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * Copyright (C) 2013-2016 PX4 Development Team. All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in
13  * the documentation and/or other materials provided with the
14  * distribution.
15  * 3. Neither the name PX4 nor the names of its contributors may be
16  * used to endorse or promote products derived from this software
17  * without specific prior written permission.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
26  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
29  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30  * POSSIBILITY OF SUCH DAMAGE.
31  *
32  ****************************************************************************/
33 
34 /* Auto-generated by genmsg_cpp from file vehicle_status.msg */
35 
36 
37 #pragma once
38 
39 
40 #include <uORB/uORB.h>
41 
42 
43 #ifndef __cplusplus
44 #define VEHICLE_STATUS_ARMING_STATE_INIT 0
45 #define VEHICLE_STATUS_ARMING_STATE_STANDBY 1
46 #define VEHICLE_STATUS_ARMING_STATE_ARMED 2
47 #define VEHICLE_STATUS_ARMING_STATE_STANDBY_ERROR 3
48 #define VEHICLE_STATUS_ARMING_STATE_SHUTDOWN 4
49 #define VEHICLE_STATUS_ARMING_STATE_IN_AIR_RESTORE 5
50 #define VEHICLE_STATUS_ARMING_STATE_MAX 6
51 #define VEHICLE_STATUS_FAILURE_NONE 0
52 #define VEHICLE_STATUS_FAILURE_ROLL 1
53 #define VEHICLE_STATUS_FAILURE_PITCH 2
54 #define VEHICLE_STATUS_FAILURE_ALT 4
55 #define VEHICLE_STATUS_HIL_STATE_OFF 0
56 #define VEHICLE_STATUS_HIL_STATE_ON 1
57 #define VEHICLE_STATUS_NAVIGATION_STATE_MANUAL 0
58 #define VEHICLE_STATUS_NAVIGATION_STATE_ALTCTL 1
59 #define VEHICLE_STATUS_NAVIGATION_STATE_POSCTL 2
60 #define VEHICLE_STATUS_NAVIGATION_STATE_AUTO_MISSION 3
61 #define VEHICLE_STATUS_NAVIGATION_STATE_AUTO_LOITER 4
62 #define VEHICLE_STATUS_NAVIGATION_STATE_AUTO_RTL 5
63 #define VEHICLE_STATUS_NAVIGATION_STATE_AUTO_RCRECOVER 6
64 #define VEHICLE_STATUS_NAVIGATION_STATE_AUTO_RTGS 7
65 #define VEHICLE_STATUS_NAVIGATION_STATE_AUTO_LANDENGFAIL 8
66 #define VEHICLE_STATUS_NAVIGATION_STATE_AUTO_LANDGPSFAIL 9
67 #define VEHICLE_STATUS_NAVIGATION_STATE_ACRO 10
68 #define VEHICLE_STATUS_NAVIGATION_STATE_UNUSED 11
69 #define VEHICLE_STATUS_NAVIGATION_STATE_DESCEND 12
70 #define VEHICLE_STATUS_NAVIGATION_STATE_TERMINATION 13
71 #define VEHICLE_STATUS_NAVIGATION_STATE_OFFBOARD 14
72 #define VEHICLE_STATUS_NAVIGATION_STATE_STAB 15
73 #define VEHICLE_STATUS_NAVIGATION_STATE_RATTITUDE 16
74 #define VEHICLE_STATUS_NAVIGATION_STATE_AUTO_TAKEOFF 17
75 #define VEHICLE_STATUS_NAVIGATION_STATE_AUTO_LAND 18
76 #define VEHICLE_STATUS_NAVIGATION_STATE_AUTO_FOLLOW_TARGET 19
77 #define VEHICLE_STATUS_NAVIGATION_STATE_AUTO_PRECLAND 20
78 #define VEHICLE_STATUS_NAVIGATION_STATE_ORBIT 21
79 #define VEHICLE_STATUS_NAVIGATION_STATE_MAX 22
80 #define VEHICLE_STATUS_RC_IN_MODE_DEFAULT 0
81 #define VEHICLE_STATUS_RC_IN_MODE_OFF 1
82 #define VEHICLE_STATUS_RC_IN_MODE_GENERATED 2
83 #define VEHICLE_STATUS_VEHICLE_TYPE_UNKNOWN 0
84 #define VEHICLE_STATUS_VEHICLE_TYPE_ROTARY_WING 1
85 #define VEHICLE_STATUS_VEHICLE_TYPE_FIXED_WING 2
86 #define VEHICLE_STATUS_VEHICLE_TYPE_ROVER 3
87 
88 #endif
89 
90 
91 #ifdef __cplusplus
93 #else
95 #endif
96  uint64_t timestamp;
101  uint8_t nav_state;
102  uint8_t arming_state;
103  uint8_t hil_state;
104  bool failsafe;
105  uint8_t system_type;
106  uint8_t system_id;
107  uint8_t component_id;
108  uint8_t vehicle_type;
109  bool is_vtol;
115  uint8_t rc_input_mode;
122  uint8_t _padding0[7]; // required for logger
123 
124 
125 #ifdef __cplusplus
126  static constexpr uint8_t ARMING_STATE_INIT = 0;
127  static constexpr uint8_t ARMING_STATE_STANDBY = 1;
128  static constexpr uint8_t ARMING_STATE_ARMED = 2;
129  static constexpr uint8_t ARMING_STATE_STANDBY_ERROR = 3;
130  static constexpr uint8_t ARMING_STATE_SHUTDOWN = 4;
131  static constexpr uint8_t ARMING_STATE_IN_AIR_RESTORE = 5;
132  static constexpr uint8_t ARMING_STATE_MAX = 6;
133  static constexpr uint8_t FAILURE_NONE = 0;
134  static constexpr uint8_t FAILURE_ROLL = 1;
135  static constexpr uint8_t FAILURE_PITCH = 2;
136  static constexpr uint8_t FAILURE_ALT = 4;
137  static constexpr uint8_t HIL_STATE_OFF = 0;
138  static constexpr uint8_t HIL_STATE_ON = 1;
139  static constexpr uint8_t NAVIGATION_STATE_MANUAL = 0;
140  static constexpr uint8_t NAVIGATION_STATE_ALTCTL = 1;
141  static constexpr uint8_t NAVIGATION_STATE_POSCTL = 2;
142  static constexpr uint8_t NAVIGATION_STATE_AUTO_MISSION = 3;
143  static constexpr uint8_t NAVIGATION_STATE_AUTO_LOITER = 4;
144  static constexpr uint8_t NAVIGATION_STATE_AUTO_RTL = 5;
145  static constexpr uint8_t NAVIGATION_STATE_AUTO_RCRECOVER = 6;
146  static constexpr uint8_t NAVIGATION_STATE_AUTO_RTGS = 7;
147  static constexpr uint8_t NAVIGATION_STATE_AUTO_LANDENGFAIL = 8;
148  static constexpr uint8_t NAVIGATION_STATE_AUTO_LANDGPSFAIL = 9;
149  static constexpr uint8_t NAVIGATION_STATE_ACRO = 10;
150  static constexpr uint8_t NAVIGATION_STATE_UNUSED = 11;
151  static constexpr uint8_t NAVIGATION_STATE_DESCEND = 12;
152  static constexpr uint8_t NAVIGATION_STATE_TERMINATION = 13;
153  static constexpr uint8_t NAVIGATION_STATE_OFFBOARD = 14;
154  static constexpr uint8_t NAVIGATION_STATE_STAB = 15;
155  static constexpr uint8_t NAVIGATION_STATE_RATTITUDE = 16;
156  static constexpr uint8_t NAVIGATION_STATE_AUTO_TAKEOFF = 17;
157  static constexpr uint8_t NAVIGATION_STATE_AUTO_LAND = 18;
158  static constexpr uint8_t NAVIGATION_STATE_AUTO_FOLLOW_TARGET = 19;
159  static constexpr uint8_t NAVIGATION_STATE_AUTO_PRECLAND = 20;
160  static constexpr uint8_t NAVIGATION_STATE_ORBIT = 21;
161  static constexpr uint8_t NAVIGATION_STATE_MAX = 22;
162  static constexpr uint8_t RC_IN_MODE_DEFAULT = 0;
163  static constexpr uint8_t RC_IN_MODE_OFF = 1;
164  static constexpr uint8_t RC_IN_MODE_GENERATED = 2;
165  static constexpr uint8_t VEHICLE_TYPE_UNKNOWN = 0;
166  static constexpr uint8_t VEHICLE_TYPE_ROTARY_WING = 1;
167  static constexpr uint8_t VEHICLE_TYPE_FIXED_WING = 2;
168  static constexpr uint8_t VEHICLE_TYPE_ROVER = 3;
169 
170 #endif
171 };
172 
173 /* register this as object request broker structure */
174 ORB_DECLARE(vehicle_status);
175 
176 
177 #ifdef __cplusplus
178 void print_message(const vehicle_status_s& message);
179 #endif
#define VEHICLE_TYPE_FIXED_WING
uint32_t onboard_control_sensors_enabled
uint8_t data_link_lost_counter
uint64_t nav_state_timestamp
API for the uORB lightweight object broker.
uint8_t failure_detector_status
Definition: I2C.hpp:51
ORB_DECLARE(vehicle_status)
bool high_latency_data_link_lost
uint32_t onboard_control_sensors_health
uint32_t onboard_control_sensors_present