mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 03:43:33 +08:00
uorb autogeneration
This commit is contained in:
committed by
Lorenz Meier
parent
3aa2297497
commit
76387b1693
@@ -57,10 +57,6 @@
|
||||
#include <uORB/uORB.h>
|
||||
#include <uORB/topics/vehicle_command.h>
|
||||
#include <uORB/topics/actuator_controls.h>
|
||||
#include <uORB/topics/actuator_controls_0.h>
|
||||
#include <uORB/topics/actuator_controls_1.h>
|
||||
#include <uORB/topics/actuator_controls_2.h>
|
||||
#include <uORB/topics/actuator_controls_3.h>
|
||||
#include <uORB/topics/wind_estimate.h>
|
||||
#include <uORB/topics/parameter_update.h>
|
||||
#include <uORB/topics/vehicle_global_position.h>
|
||||
|
||||
@@ -81,10 +81,6 @@
|
||||
#include <uORB/topics/vehicle_command.h>
|
||||
#include <uORB/topics/subsystem_info.h>
|
||||
#include <uORB/topics/actuator_controls.h>
|
||||
#include <uORB/topics/actuator_controls_0.h>
|
||||
#include <uORB/topics/actuator_controls_1.h>
|
||||
#include <uORB/topics/actuator_controls_2.h>
|
||||
#include <uORB/topics/actuator_controls_3.h>
|
||||
#include <uORB/topics/actuator_armed.h>
|
||||
#include <uORB/topics/parameter_update.h>
|
||||
#include <uORB/topics/differential_pressure.h>
|
||||
|
||||
@@ -62,8 +62,6 @@
|
||||
#include <uORB/topics/fw_virtual_attitude_setpoint.h>
|
||||
#include <uORB/topics/manual_control_setpoint.h>
|
||||
#include <uORB/topics/actuator_controls.h>
|
||||
#include <uORB/topics/actuator_controls_virtual_fw.h>
|
||||
#include <uORB/topics/actuator_controls_virtual_mc.h>
|
||||
#include <uORB/topics/vehicle_rates_setpoint.h>
|
||||
#include <uORB/topics/fw_virtual_rates_setpoint.h>
|
||||
#include <uORB/topics/mc_virtual_rates_setpoint.h>
|
||||
|
||||
@@ -47,8 +47,6 @@
|
||||
#include "mavlink_parameters.h"
|
||||
#include "mavlink_main.h"
|
||||
|
||||
ORB_DEFINE(uavcan_parameter_request, struct uavcan_parameter_request_s);
|
||||
ORB_DEFINE(uavcan_parameter_value, struct uavcan_parameter_value_s);
|
||||
#define HASH_PARAM "_HASH_CHECK"
|
||||
|
||||
MavlinkParametersManager::MavlinkParametersManager(Mavlink *mavlink) : MavlinkStream(mavlink),
|
||||
|
||||
@@ -70,8 +70,6 @@
|
||||
#include <uORB/topics/vehicle_attitude_setpoint.h>
|
||||
#include <uORB/topics/manual_control_setpoint.h>
|
||||
#include <uORB/topics/actuator_controls.h>
|
||||
#include <uORB/topics/actuator_controls_virtual_fw.h>
|
||||
#include <uORB/topics/actuator_controls_virtual_mc.h>
|
||||
#include <uORB/topics/vehicle_rates_setpoint.h>
|
||||
#include <uORB/topics/fw_virtual_rates_setpoint.h>
|
||||
#include <uORB/topics/mc_virtual_rates_setpoint.h>
|
||||
|
||||
@@ -52,10 +52,6 @@
|
||||
#include <uORB/uORB.h>
|
||||
#include <uORB/topics/parameter_update.h>
|
||||
#include <uORB/topics/actuator_controls.h>
|
||||
#include <uORB/topics/actuator_controls_0.h>
|
||||
#include <uORB/topics/actuator_controls_1.h>
|
||||
#include <uORB/topics/actuator_controls_2.h>
|
||||
#include <uORB/topics/actuator_controls_3.h>
|
||||
#include <uORB/topics/actuator_armed.h>
|
||||
#include <uORB/topics/sensor_combined.h>
|
||||
#include <uORB/topics/vehicle_attitude.h>
|
||||
|
||||
@@ -78,10 +78,6 @@
|
||||
#include <uORB/topics/vehicle_attitude_setpoint.h>
|
||||
#include <uORB/topics/vehicle_rates_setpoint.h>
|
||||
#include <uORB/topics/actuator_outputs.h>
|
||||
#include <uORB/topics/actuator_controls_0.h>
|
||||
#include <uORB/topics/actuator_controls_1.h>
|
||||
#include <uORB/topics/actuator_controls_2.h>
|
||||
#include <uORB/topics/actuator_controls_3.h>
|
||||
#include <uORB/topics/actuator_controls.h>
|
||||
#include <uORB/topics/vehicle_command.h>
|
||||
#include <uORB/topics/vehicle_local_position.h>
|
||||
|
||||
@@ -136,9 +136,6 @@ UT_array *param_values;
|
||||
/** array info for the modified parameters array */
|
||||
const UT_icd param_icd = {sizeof(struct param_wbuf_s), NULL, NULL, NULL};
|
||||
|
||||
/** parameter update topic */
|
||||
ORB_DEFINE(parameter_update, struct parameter_update_s);
|
||||
|
||||
/** parameter update topic handle */
|
||||
static orb_advert_t param_topic = NULL;
|
||||
|
||||
|
||||
@@ -158,9 +158,6 @@ UT_array *param_values;
|
||||
/** array info for the modified parameters array */
|
||||
const UT_icd param_icd = {sizeof(struct param_wbuf_s), NULL, NULL, NULL};
|
||||
|
||||
/** parameter update topic */
|
||||
ORB_DEFINE(parameter_update, struct parameter_update_s);
|
||||
|
||||
/** parameter update topic handle */
|
||||
static orb_advert_t param_topic = NULL;
|
||||
|
||||
|
||||
@@ -36,8 +36,9 @@ include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
link_libraries(msg_gen)
|
||||
|
||||
set(SRCS
|
||||
objects_common.cpp
|
||||
uORBUtils.cpp
|
||||
uORB.cpp
|
||||
uORBMain.cpp
|
||||
|
||||
@@ -144,6 +144,12 @@ void Subscription<T>::update()
|
||||
SubscriptionBase::update((void *)(&_data));
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool Subscription<T>::check_updated()
|
||||
{
|
||||
return SubscriptionBase::updated();
|
||||
}
|
||||
|
||||
template <class T>
|
||||
const T &Subscription<T>::get() { return _data; }
|
||||
|
||||
|
||||
@@ -185,6 +185,10 @@ public:
|
||||
*/
|
||||
void update();
|
||||
|
||||
/**
|
||||
* Create an update function that uses the embedded struct.
|
||||
*/
|
||||
bool check_updated();
|
||||
/*
|
||||
* This function gets the T struct data
|
||||
* */
|
||||
|
||||
@@ -1,305 +0,0 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2012-2016 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file objects_common.cpp
|
||||
*
|
||||
* Common object definitions without a better home.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup topics List of all uORB topics.
|
||||
*/
|
||||
|
||||
#include <px4_config.h>
|
||||
|
||||
#include <drivers/drv_orb_dev.h>
|
||||
|
||||
#include "topics/sensor_mag.h"
|
||||
ORB_DEFINE(sensor_mag, struct sensor_mag_s);
|
||||
|
||||
#include "topics/sensor_accel.h"
|
||||
ORB_DEFINE(sensor_accel, struct sensor_accel_s);
|
||||
|
||||
#include "topics/sensor_gyro.h"
|
||||
ORB_DEFINE(sensor_gyro, struct sensor_gyro_s);
|
||||
|
||||
#include "topics/sensor_baro.h"
|
||||
ORB_DEFINE(sensor_baro, struct sensor_baro_s);
|
||||
|
||||
#include "topics/output_pwm.h"
|
||||
ORB_DEFINE(output_pwm, struct output_pwm_s);
|
||||
|
||||
#include "topics/input_rc.h"
|
||||
ORB_DEFINE(input_rc, struct input_rc_s);
|
||||
|
||||
#include "topics/pwm_input.h"
|
||||
ORB_DEFINE(pwm_input, struct pwm_input_s);
|
||||
|
||||
#include "topics/vehicle_attitude.h"
|
||||
ORB_DEFINE(vehicle_attitude, struct vehicle_attitude_s);
|
||||
|
||||
#include "topics/control_state.h"
|
||||
ORB_DEFINE(control_state, struct control_state_s);
|
||||
|
||||
#include "topics/sensor_combined.h"
|
||||
ORB_DEFINE(sensor_combined, struct sensor_combined_s);
|
||||
|
||||
#include "topics/hil_sensor.h"
|
||||
ORB_DEFINE(hil_sensor, struct hil_sensor_s);
|
||||
|
||||
#include "topics/vehicle_gps_position.h"
|
||||
ORB_DEFINE(vehicle_gps_position, struct vehicle_gps_position_s);
|
||||
|
||||
#include "topics/vehicle_land_detected.h"
|
||||
ORB_DEFINE(vehicle_land_detected, struct vehicle_land_detected_s);
|
||||
|
||||
#include "topics/satellite_info.h"
|
||||
ORB_DEFINE(satellite_info, struct satellite_info_s);
|
||||
|
||||
#include "topics/home_position.h"
|
||||
ORB_DEFINE(home_position, struct home_position_s);
|
||||
|
||||
#include "topics/vehicle_status.h"
|
||||
ORB_DEFINE(vehicle_status, struct vehicle_status_s);
|
||||
|
||||
#include "topics/vtol_vehicle_status.h"
|
||||
ORB_DEFINE(vtol_vehicle_status, struct vtol_vehicle_status_s);
|
||||
|
||||
#include "topics/safety.h"
|
||||
ORB_DEFINE(safety, struct safety_s);
|
||||
|
||||
#include "topics/battery_status.h"
|
||||
ORB_DEFINE(battery_status, struct battery_status_s);
|
||||
|
||||
#include "topics/servorail_status.h"
|
||||
ORB_DEFINE(servorail_status, struct servorail_status_s);
|
||||
|
||||
#include "topics/system_power.h"
|
||||
ORB_DEFINE(system_power, struct system_power_s);
|
||||
|
||||
#include "topics/vehicle_global_position.h"
|
||||
ORB_DEFINE(vehicle_global_position, struct vehicle_global_position_s);
|
||||
|
||||
#include "topics/vehicle_local_position.h"
|
||||
ORB_DEFINE(vehicle_local_position, struct vehicle_local_position_s);
|
||||
|
||||
#include "topics/att_pos_mocap.h"
|
||||
ORB_DEFINE(att_pos_mocap, struct att_pos_mocap_s);
|
||||
|
||||
#include "topics/vehicle_rates_setpoint.h"
|
||||
ORB_DEFINE(vehicle_rates_setpoint, struct vehicle_rates_setpoint_s);
|
||||
#include "topics/mc_virtual_rates_setpoint.h"
|
||||
ORB_DEFINE(mc_virtual_rates_setpoint, struct mc_virtual_rates_setpoint_s);
|
||||
#include "topics/fw_virtual_rates_setpoint.h"
|
||||
ORB_DEFINE(fw_virtual_rates_setpoint, struct fw_virtual_rates_setpoint_s);
|
||||
|
||||
#include "topics/rc_channels.h"
|
||||
ORB_DEFINE(rc_channels, struct rc_channels_s);
|
||||
|
||||
#include "topics/vehicle_command.h"
|
||||
ORB_DEFINE(vehicle_command, struct vehicle_command_s);
|
||||
|
||||
#include "topics/vehicle_control_mode.h"
|
||||
ORB_DEFINE(vehicle_control_mode, struct vehicle_control_mode_s);
|
||||
|
||||
#include "topics/vehicle_local_position_setpoint.h"
|
||||
ORB_DEFINE(vehicle_local_position_setpoint, struct vehicle_local_position_setpoint_s);
|
||||
|
||||
#include "topics/position_setpoint_triplet.h"
|
||||
ORB_DEFINE(position_setpoint_triplet, struct position_setpoint_triplet_s);
|
||||
|
||||
#include "topics/vehicle_global_velocity_setpoint.h"
|
||||
ORB_DEFINE(vehicle_global_velocity_setpoint, struct vehicle_global_velocity_setpoint_s);
|
||||
|
||||
#include "topics/mission.h"
|
||||
ORB_DEFINE(mission, struct mission_s);
|
||||
// XXX onboard and offboard mission are still declared here until this is
|
||||
// generator supported
|
||||
#include <navigator/navigation.h>
|
||||
ORB_DEFINE(offboard_mission, struct mission_s);
|
||||
ORB_DEFINE(onboard_mission, struct mission_s);
|
||||
|
||||
#include "topics/mission_result.h"
|
||||
ORB_DEFINE(mission_result, struct mission_result_s);
|
||||
|
||||
#include "topics/geofence_result.h"
|
||||
ORB_DEFINE(geofence_result, struct geofence_result_s);
|
||||
|
||||
#include "topics/fence.h"
|
||||
ORB_DEFINE(fence, struct fence_s);
|
||||
|
||||
#include "topics/fence_vertex.h"
|
||||
ORB_DEFINE(fence_vertex, struct fence_vertex_s);
|
||||
|
||||
#include "topics/vehicle_attitude_setpoint.h"
|
||||
ORB_DEFINE(vehicle_attitude_setpoint, struct vehicle_attitude_setpoint_s);
|
||||
|
||||
#include "topics/mc_virtual_attitude_setpoint.h"
|
||||
ORB_DEFINE(mc_virtual_attitude_setpoint, struct mc_virtual_attitude_setpoint_s);
|
||||
|
||||
#include "topics/fw_virtual_attitude_setpoint.h"
|
||||
ORB_DEFINE(fw_virtual_attitude_setpoint, struct fw_virtual_attitude_setpoint_s);
|
||||
|
||||
#include "topics/manual_control_setpoint.h"
|
||||
ORB_DEFINE(manual_control_setpoint, struct manual_control_setpoint_s);
|
||||
|
||||
#include "topics/offboard_control_mode.h"
|
||||
ORB_DEFINE(offboard_control_mode, struct offboard_control_mode_s);
|
||||
|
||||
#include "topics/optical_flow.h"
|
||||
ORB_DEFINE(optical_flow, struct optical_flow_s);
|
||||
|
||||
#include "topics/filtered_bottom_flow.h"
|
||||
ORB_DEFINE(filtered_bottom_flow, struct filtered_bottom_flow_s);
|
||||
|
||||
#include "topics/airspeed.h"
|
||||
ORB_DEFINE(airspeed, struct airspeed_s);
|
||||
|
||||
#include "topics/differential_pressure.h"
|
||||
ORB_DEFINE(differential_pressure, struct differential_pressure_s);
|
||||
|
||||
#include "topics/subsystem_info.h"
|
||||
ORB_DEFINE(subsystem_info, struct subsystem_info_s);
|
||||
|
||||
/* actuator controls, as requested by controller */
|
||||
#include "topics/actuator_controls.h"
|
||||
#include "topics/actuator_controls_0.h"
|
||||
ORB_DEFINE(actuator_controls_0, struct actuator_controls_0_s);
|
||||
#include "topics/actuator_controls_1.h"
|
||||
ORB_DEFINE(actuator_controls_1, struct actuator_controls_1_s);
|
||||
#include "topics/actuator_controls_2.h"
|
||||
ORB_DEFINE(actuator_controls_2, struct actuator_controls_2_s);
|
||||
#include "topics/actuator_controls_3.h"
|
||||
ORB_DEFINE(actuator_controls_3, struct actuator_controls_3_s);
|
||||
//Virtual control groups, used for VTOL operation
|
||||
#include "topics/actuator_controls_virtual_mc.h"
|
||||
ORB_DEFINE(actuator_controls_virtual_mc, struct actuator_controls_virtual_mc_s);
|
||||
#include "topics/actuator_controls_virtual_fw.h"
|
||||
ORB_DEFINE(actuator_controls_virtual_fw, struct actuator_controls_virtual_fw_s);
|
||||
|
||||
#include "topics/actuator_armed.h"
|
||||
ORB_DEFINE(actuator_armed, struct actuator_armed_s);
|
||||
|
||||
#include "topics/actuator_outputs.h"
|
||||
ORB_DEFINE(actuator_outputs, struct actuator_outputs_s);
|
||||
|
||||
#include "topics/actuator_direct.h"
|
||||
ORB_DEFINE(actuator_direct, struct actuator_direct_s);
|
||||
|
||||
#include "topics/multirotor_motor_limits.h"
|
||||
ORB_DEFINE(multirotor_motor_limits, struct multirotor_motor_limits_s);
|
||||
|
||||
#include "topics/telemetry_status.h"
|
||||
ORB_DEFINE(telemetry_status, struct telemetry_status_s);
|
||||
|
||||
#include "topics/test_motor.h"
|
||||
ORB_DEFINE(test_motor, struct test_motor_s);
|
||||
|
||||
#include "topics/debug_key_value.h"
|
||||
ORB_DEFINE(debug_key_value, struct debug_key_value_s);
|
||||
|
||||
#include "topics/fw_pos_ctrl_status.h"
|
||||
ORB_DEFINE(fw_pos_ctrl_status, struct fw_pos_ctrl_status_s);
|
||||
|
||||
#include "topics/esc_status.h"
|
||||
ORB_DEFINE(esc_status, struct esc_status_s);
|
||||
|
||||
#include "topics/esc_report.h"
|
||||
ORB_DEFINE(esc_report, struct esc_report_s);
|
||||
|
||||
#include "topics/encoders.h"
|
||||
ORB_DEFINE(encoders, struct encoders_s);
|
||||
|
||||
#include "topics/estimator_status.h"
|
||||
ORB_DEFINE(estimator_status, struct estimator_status_s);
|
||||
|
||||
#include "topics/vision_position_estimate.h"
|
||||
ORB_DEFINE(vision_position_estimate, struct vision_position_estimate_s);
|
||||
|
||||
#include "topics/vehicle_force_setpoint.h"
|
||||
ORB_DEFINE(vehicle_force_setpoint, struct vehicle_force_setpoint_s);
|
||||
|
||||
#include "topics/tecs_status.h"
|
||||
ORB_DEFINE(tecs_status, struct tecs_status_s);
|
||||
|
||||
#include "topics/wind_estimate.h"
|
||||
ORB_DEFINE(wind_estimate, struct wind_estimate_s);
|
||||
|
||||
#include "topics/rc_parameter_map.h"
|
||||
ORB_DEFINE(rc_parameter_map, struct rc_parameter_map_s);
|
||||
|
||||
#include "topics/time_offset.h"
|
||||
ORB_DEFINE(time_offset, struct time_offset_s);
|
||||
|
||||
#include "topics/mc_att_ctrl_status.h"
|
||||
ORB_DEFINE(mc_att_ctrl_status, struct mc_att_ctrl_status_s);
|
||||
|
||||
#include "topics/distance_sensor.h"
|
||||
ORB_DEFINE(distance_sensor, struct distance_sensor_s);
|
||||
|
||||
#include "topics/camera_trigger.h"
|
||||
ORB_DEFINE(camera_trigger, struct camera_trigger_s);
|
||||
|
||||
#include "topics/vehicle_command_ack.h"
|
||||
ORB_DEFINE(vehicle_command_ack, struct vehicle_command_ack_s);
|
||||
|
||||
#include "topics/ekf2_innovations.h"
|
||||
ORB_DEFINE(ekf2_innovations, struct ekf2_innovations_s);
|
||||
|
||||
#include "topics/ekf2_replay.h"
|
||||
ORB_DEFINE(ekf2_replay, struct ekf2_replay_s);
|
||||
|
||||
#include "topics/qshell_req.h"
|
||||
ORB_DEFINE(qshell_req, struct qshell_req_s);
|
||||
|
||||
#include "topics/mavlink_log.h"
|
||||
ORB_DEFINE(mavlink_log, struct mavlink_log_s);
|
||||
|
||||
#include "topics/follow_target.h"
|
||||
ORB_DEFINE(follow_target, struct follow_target_s);
|
||||
|
||||
#include "topics/commander_state.h"
|
||||
ORB_DEFINE(commander_state, struct commander_state_s);
|
||||
|
||||
#include "topics/transponder_report.h"
|
||||
ORB_DEFINE(transponder_report, struct transponder_report_s);
|
||||
|
||||
#include "topics/gps_inject_data.h"
|
||||
ORB_DEFINE(gps_inject_data, struct gps_inject_data_s);
|
||||
|
||||
#include "topics/adc_report.h"
|
||||
ORB_DEFINE(adc_report, struct adc_report_s);
|
||||
|
||||
#include "topics/cpuload.h"
|
||||
ORB_DEFINE(cpuload, struct cpuload_s);
|
||||
@@ -52,6 +52,7 @@
|
||||
struct orb_metadata {
|
||||
const char *o_name; /**< unique object name */
|
||||
const size_t o_size; /**< object size */
|
||||
const char *o_fields; /**< semicolon separated list of fields */
|
||||
};
|
||||
|
||||
typedef const struct orb_metadata *orb_id_t;
|
||||
@@ -110,11 +111,13 @@ enum ORB_PRIO {
|
||||
*
|
||||
* @param _name The name of the topic.
|
||||
* @param _struct The structure the topic provides.
|
||||
* @param _fields All fields in a semicolon separated list e.g: "float[3] position;bool armed"
|
||||
*/
|
||||
#define ORB_DEFINE(_name, _struct) \
|
||||
#define ORB_DEFINE(_name, _struct, _fields) \
|
||||
const struct orb_metadata __orb_##_name = { \
|
||||
#_name, \
|
||||
sizeof(_struct) \
|
||||
sizeof(_struct), \
|
||||
_fields \
|
||||
}; struct hack
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2012-2015 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef MODULES_UORB_UORBTOPICS_H_
|
||||
#define MODULES_UORB_UORBTOPICS_H_
|
||||
|
||||
#include <uORB/uORB.h>
|
||||
|
||||
/*
|
||||
* Returns count of all declared topics.
|
||||
* It is equal to size of array from orb_get_topics()
|
||||
*/
|
||||
extern size_t orb_topics_count() __EXPORT;
|
||||
|
||||
/*
|
||||
* Returns array of topics metadata
|
||||
*/
|
||||
extern const struct orb_metadata **orb_get_topics() __EXPORT;
|
||||
|
||||
#endif /* MODULES_UORB_UORBTOPICS_H_ */
|
||||
@@ -41,23 +41,26 @@ struct orb_test {
|
||||
int val;
|
||||
hrt_abstime time;
|
||||
};
|
||||
ORB_DEFINE(orb_test, struct orb_test);
|
||||
ORB_DEFINE(orb_multitest, struct orb_test);
|
||||
ORB_DEFINE(orb_test, struct orb_test, "ORB_TEST:int val;hrt_abstime time;");
|
||||
ORB_DEFINE(orb_multitest, struct orb_test, "ORB_MULTITEST:int val;hrt_abstime time;");
|
||||
|
||||
|
||||
struct orb_test_medium {
|
||||
int val;
|
||||
hrt_abstime time;
|
||||
char junk[64];
|
||||
};
|
||||
ORB_DEFINE(orb_test_medium, struct orb_test_medium);
|
||||
ORB_DEFINE(orb_test_medium_multi, struct orb_test_medium);
|
||||
ORB_DEFINE(orb_test_medium, struct orb_test_medium, "ORB_TEST_MEDIUM:int val;hrt_abstime time;char[64] junk;");
|
||||
ORB_DEFINE(orb_test_medium_multi, struct orb_test_medium,
|
||||
"ORB_TEST_MEDIUM_MULTI:int val;hrt_abstime time;char[64] junk;");
|
||||
|
||||
|
||||
struct orb_test_large {
|
||||
int val;
|
||||
hrt_abstime time;
|
||||
char junk[512];
|
||||
};
|
||||
ORB_DEFINE(orb_test_large, struct orb_test_large);
|
||||
ORB_DEFINE(orb_test_large, struct orb_test_large, "ORB_TEST_LARGE:int val;hrt_abstime time;char[512] junk;");
|
||||
|
||||
|
||||
namespace uORBTest
|
||||
|
||||
@@ -69,8 +69,6 @@
|
||||
#include <uORB/topics/fw_virtual_attitude_setpoint.h>
|
||||
#include <uORB/topics/manual_control_setpoint.h>
|
||||
#include <uORB/topics/actuator_controls.h>
|
||||
#include <uORB/topics/actuator_controls_virtual_mc.h>
|
||||
#include <uORB/topics/actuator_controls_virtual_fw.h>
|
||||
#include <uORB/topics/vehicle_rates_setpoint.h>
|
||||
#include <uORB/topics/mc_virtual_rates_setpoint.h>
|
||||
#include <uORB/topics/fw_virtual_rates_setpoint.h>
|
||||
|
||||
Reference in New Issue
Block a user