PX4 Firmware
PX4 Autopilot Software http://px4.io
vehicle_command.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_command.msg */
35 
36 
37 #pragma once
38 
39 
40 #include <uORB/uORB.h>
41 
42 
43 #ifndef __cplusplus
44 #define VEHICLE_COMMAND_VEHICLE_CMD_CUSTOM_0 0
45 #define VEHICLE_COMMAND_VEHICLE_CMD_CUSTOM_1 1
46 #define VEHICLE_COMMAND_VEHICLE_CMD_CUSTOM_2 2
47 #define VEHICLE_COMMAND_VEHICLE_CMD_NAV_WAYPOINT 16
48 #define VEHICLE_COMMAND_VEHICLE_CMD_NAV_LOITER_UNLIM 17
49 #define VEHICLE_COMMAND_VEHICLE_CMD_NAV_LOITER_TURNS 18
50 #define VEHICLE_COMMAND_VEHICLE_CMD_NAV_LOITER_TIME 19
51 #define VEHICLE_COMMAND_VEHICLE_CMD_NAV_RETURN_TO_LAUNCH 20
52 #define VEHICLE_COMMAND_VEHICLE_CMD_NAV_LAND 21
53 #define VEHICLE_COMMAND_VEHICLE_CMD_NAV_TAKEOFF 22
54 #define VEHICLE_COMMAND_VEHICLE_CMD_NAV_PRECLAND 23
55 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_ORBIT 34
56 #define VEHICLE_COMMAND_VEHICLE_CMD_NAV_ROI 80
57 #define VEHICLE_COMMAND_VEHICLE_CMD_NAV_PATHPLANNING 81
58 #define VEHICLE_COMMAND_VEHICLE_CMD_NAV_VTOL_TAKEOFF 84
59 #define VEHICLE_COMMAND_VEHICLE_CMD_NAV_VTOL_LAND 85
60 #define VEHICLE_COMMAND_VEHICLE_CMD_NAV_GUIDED_LIMITS 90
61 #define VEHICLE_COMMAND_VEHICLE_CMD_NAV_GUIDED_MASTER 91
62 #define VEHICLE_COMMAND_VEHICLE_CMD_NAV_GUIDED_ENABLE 92
63 #define VEHICLE_COMMAND_VEHICLE_CMD_NAV_DELAY 93
64 #define VEHICLE_COMMAND_VEHICLE_CMD_NAV_LAST 95
65 #define VEHICLE_COMMAND_VEHICLE_CMD_CONDITION_DELAY 112
66 #define VEHICLE_COMMAND_VEHICLE_CMD_CONDITION_CHANGE_ALT 113
67 #define VEHICLE_COMMAND_VEHICLE_CMD_CONDITION_DISTANCE 114
68 #define VEHICLE_COMMAND_VEHICLE_CMD_CONDITION_YAW 115
69 #define VEHICLE_COMMAND_VEHICLE_CMD_CONDITION_LAST 159
70 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_SET_MODE 176
71 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_JUMP 177
72 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_CHANGE_SPEED 178
73 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_SET_HOME 179
74 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_SET_PARAMETER 180
75 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_SET_RELAY 181
76 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_REPEAT_RELAY 182
77 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_SET_SERVO 183
78 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_REPEAT_SERVO 184
79 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_FLIGHTTERMINATION 185
80 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_LAND_START 189
81 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_GO_AROUND 191
82 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_REPOSITION 192
83 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_PAUSE_CONTINUE 193
84 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_SET_ROI_LOCATION 195
85 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_SET_ROI_WPNEXT_OFFSET 196
86 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_SET_ROI_NONE 197
87 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_CONTROL_VIDEO 200
88 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_SET_ROI 201
89 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_DIGICAM_CONTROL 203
90 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_MOUNT_CONFIGURE 204
91 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_MOUNT_CONTROL 205
92 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_SET_CAM_TRIGG_DIST 206
93 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_FENCE_ENABLE 207
94 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_PARACHUTE 208
95 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_MOTOR_TEST 209
96 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_INVERTED_FLIGHT 210
97 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_SET_CAM_TRIGG_INTERVAL 214
98 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_MOUNT_CONTROL_QUAT 220
99 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_GUIDED_MASTER 221
100 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_GUIDED_LIMITS 222
101 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_LAST 240
102 #define VEHICLE_COMMAND_VEHICLE_CMD_PREFLIGHT_CALIBRATION 241
103 #define VEHICLE_COMMAND_PREFLIGHT_CALIBRATION_TEMPERATURE_CALIBRATION 3
104 #define VEHICLE_COMMAND_VEHICLE_CMD_PREFLIGHT_SET_SENSOR_OFFSETS 242
105 #define VEHICLE_COMMAND_VEHICLE_CMD_PREFLIGHT_STORAGE 245
106 #define VEHICLE_COMMAND_VEHICLE_CMD_PREFLIGHT_REBOOT_SHUTDOWN 246
107 #define VEHICLE_COMMAND_VEHICLE_CMD_MISSION_START 300
108 #define VEHICLE_COMMAND_VEHICLE_CMD_COMPONENT_ARM_DISARM 400
109 #define VEHICLE_COMMAND_VEHICLE_CMD_START_RX_PAIR 500
110 #define VEHICLE_COMMAND_VEHICLE_CMD_SET_CAMERA_MODE 530
111 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_TRIGGER_CONTROL 2003
112 #define VEHICLE_COMMAND_VEHICLE_CMD_DO_VTOL_TRANSITION 3000
113 #define VEHICLE_COMMAND_VEHICLE_CMD_ARM_AUTHORIZATION_REQUEST 3001
114 #define VEHICLE_COMMAND_VEHICLE_CMD_PAYLOAD_PREPARE_DEPLOY 30001
115 #define VEHICLE_COMMAND_VEHICLE_CMD_PAYLOAD_CONTROL_DEPLOY 30002
116 #define VEHICLE_COMMAND_VEHICLE_CMD_PREFLIGHT_UAVCAN 243
117 #define VEHICLE_COMMAND_VEHICLE_CMD_LOGGING_START 2510
118 #define VEHICLE_COMMAND_VEHICLE_CMD_LOGGING_STOP 2511
119 #define VEHICLE_COMMAND_VEHICLE_CMD_CONTROL_HIGH_LATENCY 2600
120 #define VEHICLE_COMMAND_VEHICLE_CMD_RESULT_ACCEPTED 0
121 #define VEHICLE_COMMAND_VEHICLE_CMD_RESULT_TEMPORARILY_REJECTED 1
122 #define VEHICLE_COMMAND_VEHICLE_CMD_RESULT_DENIED 2
123 #define VEHICLE_COMMAND_VEHICLE_CMD_RESULT_UNSUPPORTED 3
124 #define VEHICLE_COMMAND_VEHICLE_CMD_RESULT_FAILED 4
125 #define VEHICLE_COMMAND_VEHICLE_CMD_RESULT_IN_PROGRESS 5
126 #define VEHICLE_COMMAND_VEHICLE_CMD_RESULT_ENUM_END 6
127 #define VEHICLE_COMMAND_VEHICLE_MOUNT_MODE_RETRACT 0
128 #define VEHICLE_COMMAND_VEHICLE_MOUNT_MODE_NEUTRAL 1
129 #define VEHICLE_COMMAND_VEHICLE_MOUNT_MODE_MAVLINK_TARGETING 2
130 #define VEHICLE_COMMAND_VEHICLE_MOUNT_MODE_RC_TARGETING 3
131 #define VEHICLE_COMMAND_VEHICLE_MOUNT_MODE_GPS_POINT 4
132 #define VEHICLE_COMMAND_VEHICLE_MOUNT_MODE_ENUM_END 5
133 #define VEHICLE_COMMAND_VEHICLE_ROI_NONE 0
134 #define VEHICLE_COMMAND_VEHICLE_ROI_WPNEXT 1
135 #define VEHICLE_COMMAND_VEHICLE_ROI_WPINDEX 2
136 #define VEHICLE_COMMAND_VEHICLE_ROI_LOCATION 3
137 #define VEHICLE_COMMAND_VEHICLE_ROI_TARGET 4
138 #define VEHICLE_COMMAND_VEHICLE_ROI_ENUM_END 5
139 #define VEHICLE_COMMAND_ORB_QUEUE_LENGTH 3
140 
141 #endif
142 
143 
144 #ifdef __cplusplus
146 #else
148 #endif
149  uint64_t timestamp;
150  double param5;
151  double param6;
152  float param1;
153  float param2;
154  float param3;
155  float param4;
156  float param7;
157  uint16_t command;
158  uint8_t target_system;
160  uint8_t source_system;
162  uint8_t confirmation;
164  uint8_t _padding0[4]; // required for logger
165 
166 
167 #ifdef __cplusplus
168  static constexpr uint16_t VEHICLE_CMD_CUSTOM_0 = 0;
169  static constexpr uint16_t VEHICLE_CMD_CUSTOM_1 = 1;
170  static constexpr uint16_t VEHICLE_CMD_CUSTOM_2 = 2;
171  static constexpr uint16_t VEHICLE_CMD_NAV_WAYPOINT = 16;
172  static constexpr uint16_t VEHICLE_CMD_NAV_LOITER_UNLIM = 17;
173  static constexpr uint16_t VEHICLE_CMD_NAV_LOITER_TURNS = 18;
174  static constexpr uint16_t VEHICLE_CMD_NAV_LOITER_TIME = 19;
175  static constexpr uint16_t VEHICLE_CMD_NAV_RETURN_TO_LAUNCH = 20;
176  static constexpr uint16_t VEHICLE_CMD_NAV_LAND = 21;
177  static constexpr uint16_t VEHICLE_CMD_NAV_TAKEOFF = 22;
178  static constexpr uint16_t VEHICLE_CMD_NAV_PRECLAND = 23;
179  static constexpr uint16_t VEHICLE_CMD_DO_ORBIT = 34;
180  static constexpr uint16_t VEHICLE_CMD_NAV_ROI = 80;
181  static constexpr uint16_t VEHICLE_CMD_NAV_PATHPLANNING = 81;
182  static constexpr uint16_t VEHICLE_CMD_NAV_VTOL_TAKEOFF = 84;
183  static constexpr uint16_t VEHICLE_CMD_NAV_VTOL_LAND = 85;
184  static constexpr uint16_t VEHICLE_CMD_NAV_GUIDED_LIMITS = 90;
185  static constexpr uint16_t VEHICLE_CMD_NAV_GUIDED_MASTER = 91;
186  static constexpr uint16_t VEHICLE_CMD_NAV_GUIDED_ENABLE = 92;
187  static constexpr uint16_t VEHICLE_CMD_NAV_DELAY = 93;
188  static constexpr uint16_t VEHICLE_CMD_NAV_LAST = 95;
189  static constexpr uint16_t VEHICLE_CMD_CONDITION_DELAY = 112;
190  static constexpr uint16_t VEHICLE_CMD_CONDITION_CHANGE_ALT = 113;
191  static constexpr uint16_t VEHICLE_CMD_CONDITION_DISTANCE = 114;
192  static constexpr uint16_t VEHICLE_CMD_CONDITION_YAW = 115;
193  static constexpr uint16_t VEHICLE_CMD_CONDITION_LAST = 159;
194  static constexpr uint16_t VEHICLE_CMD_DO_SET_MODE = 176;
195  static constexpr uint16_t VEHICLE_CMD_DO_JUMP = 177;
196  static constexpr uint16_t VEHICLE_CMD_DO_CHANGE_SPEED = 178;
197  static constexpr uint16_t VEHICLE_CMD_DO_SET_HOME = 179;
198  static constexpr uint16_t VEHICLE_CMD_DO_SET_PARAMETER = 180;
199  static constexpr uint16_t VEHICLE_CMD_DO_SET_RELAY = 181;
200  static constexpr uint16_t VEHICLE_CMD_DO_REPEAT_RELAY = 182;
201  static constexpr uint16_t VEHICLE_CMD_DO_SET_SERVO = 183;
202  static constexpr uint16_t VEHICLE_CMD_DO_REPEAT_SERVO = 184;
203  static constexpr uint16_t VEHICLE_CMD_DO_FLIGHTTERMINATION = 185;
204  static constexpr uint16_t VEHICLE_CMD_DO_LAND_START = 189;
205  static constexpr uint16_t VEHICLE_CMD_DO_GO_AROUND = 191;
206  static constexpr uint16_t VEHICLE_CMD_DO_REPOSITION = 192;
207  static constexpr uint16_t VEHICLE_CMD_DO_PAUSE_CONTINUE = 193;
208  static constexpr uint16_t VEHICLE_CMD_DO_SET_ROI_LOCATION = 195;
209  static constexpr uint16_t VEHICLE_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196;
210  static constexpr uint16_t VEHICLE_CMD_DO_SET_ROI_NONE = 197;
211  static constexpr uint16_t VEHICLE_CMD_DO_CONTROL_VIDEO = 200;
212  static constexpr uint16_t VEHICLE_CMD_DO_SET_ROI = 201;
213  static constexpr uint16_t VEHICLE_CMD_DO_DIGICAM_CONTROL = 203;
214  static constexpr uint16_t VEHICLE_CMD_DO_MOUNT_CONFIGURE = 204;
215  static constexpr uint16_t VEHICLE_CMD_DO_MOUNT_CONTROL = 205;
216  static constexpr uint16_t VEHICLE_CMD_DO_SET_CAM_TRIGG_DIST = 206;
217  static constexpr uint16_t VEHICLE_CMD_DO_FENCE_ENABLE = 207;
218  static constexpr uint16_t VEHICLE_CMD_DO_PARACHUTE = 208;
219  static constexpr uint16_t VEHICLE_CMD_DO_MOTOR_TEST = 209;
220  static constexpr uint16_t VEHICLE_CMD_DO_INVERTED_FLIGHT = 210;
221  static constexpr uint16_t VEHICLE_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214;
222  static constexpr uint16_t VEHICLE_CMD_DO_MOUNT_CONTROL_QUAT = 220;
223  static constexpr uint16_t VEHICLE_CMD_DO_GUIDED_MASTER = 221;
224  static constexpr uint16_t VEHICLE_CMD_DO_GUIDED_LIMITS = 222;
225  static constexpr uint16_t VEHICLE_CMD_DO_LAST = 240;
226  static constexpr uint16_t VEHICLE_CMD_PREFLIGHT_CALIBRATION = 241;
227  static constexpr uint16_t PREFLIGHT_CALIBRATION_TEMPERATURE_CALIBRATION = 3;
228  static constexpr uint16_t VEHICLE_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242;
229  static constexpr uint16_t VEHICLE_CMD_PREFLIGHT_STORAGE = 245;
230  static constexpr uint16_t VEHICLE_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246;
231  static constexpr uint16_t VEHICLE_CMD_MISSION_START = 300;
232  static constexpr uint16_t VEHICLE_CMD_COMPONENT_ARM_DISARM = 400;
233  static constexpr uint16_t VEHICLE_CMD_START_RX_PAIR = 500;
234  static constexpr uint16_t VEHICLE_CMD_SET_CAMERA_MODE = 530;
235  static constexpr uint16_t VEHICLE_CMD_DO_TRIGGER_CONTROL = 2003;
236  static constexpr uint16_t VEHICLE_CMD_DO_VTOL_TRANSITION = 3000;
237  static constexpr uint16_t VEHICLE_CMD_ARM_AUTHORIZATION_REQUEST = 3001;
238  static constexpr uint16_t VEHICLE_CMD_PAYLOAD_PREPARE_DEPLOY = 30001;
239  static constexpr uint16_t VEHICLE_CMD_PAYLOAD_CONTROL_DEPLOY = 30002;
240  static constexpr uint16_t VEHICLE_CMD_PREFLIGHT_UAVCAN = 243;
241  static constexpr uint16_t VEHICLE_CMD_LOGGING_START = 2510;
242  static constexpr uint16_t VEHICLE_CMD_LOGGING_STOP = 2511;
243  static constexpr uint16_t VEHICLE_CMD_CONTROL_HIGH_LATENCY = 2600;
244  static constexpr uint8_t VEHICLE_CMD_RESULT_ACCEPTED = 0;
245  static constexpr uint8_t VEHICLE_CMD_RESULT_TEMPORARILY_REJECTED = 1;
246  static constexpr uint8_t VEHICLE_CMD_RESULT_DENIED = 2;
247  static constexpr uint8_t VEHICLE_CMD_RESULT_UNSUPPORTED = 3;
248  static constexpr uint8_t VEHICLE_CMD_RESULT_FAILED = 4;
249  static constexpr uint8_t VEHICLE_CMD_RESULT_IN_PROGRESS = 5;
250  static constexpr uint8_t VEHICLE_CMD_RESULT_ENUM_END = 6;
251  static constexpr uint8_t VEHICLE_MOUNT_MODE_RETRACT = 0;
252  static constexpr uint8_t VEHICLE_MOUNT_MODE_NEUTRAL = 1;
253  static constexpr uint8_t VEHICLE_MOUNT_MODE_MAVLINK_TARGETING = 2;
254  static constexpr uint8_t VEHICLE_MOUNT_MODE_RC_TARGETING = 3;
255  static constexpr uint8_t VEHICLE_MOUNT_MODE_GPS_POINT = 4;
256  static constexpr uint8_t VEHICLE_MOUNT_MODE_ENUM_END = 5;
257  static constexpr uint8_t VEHICLE_ROI_NONE = 0;
258  static constexpr uint8_t VEHICLE_ROI_WPNEXT = 1;
259  static constexpr uint8_t VEHICLE_ROI_WPINDEX = 2;
260  static constexpr uint8_t VEHICLE_ROI_LOCATION = 3;
261  static constexpr uint8_t VEHICLE_ROI_TARGET = 4;
262  static constexpr uint8_t VEHICLE_ROI_ENUM_END = 5;
263  static constexpr uint8_t ORB_QUEUE_LENGTH = 3;
264 
265 #endif
266 };
267 
268 /* register this as object request broker structure */
269 ORB_DECLARE(vehicle_command);
270 
271 
272 #ifdef __cplusplus
273 void print_message(const vehicle_command_s& message);
274 #endif
API for the uORB lightweight object broker.
ORB_DECLARE(vehicle_command)
Definition: I2C.hpp:51