PX4 Firmware
PX4 Autopilot Software http://px4.io
mavlink_messages.cpp File Reference

MAVLink 2.0 message formatters implementation. More...

#include "mavlink_main.h"
#include "mavlink_messages.h"
#include "mavlink_command_sender.h"
#include "mavlink_simple_analyzer.h"
#include "mavlink_high_latency2.h"
#include <commander/px4_custom_mode.h>
#include <drivers/drv_pwm_output.h>
#include <lib/conversion/rotation.h>
#include <lib/ecl/geo/geo.h>
#include <lib/mathlib/mathlib.h>
#include <lib/matrix/matrix/math.hpp>
#include <px4_platform_common/time.h>
#include <systemlib/mavlink_log.h>
#include <math.h>
#include <uORB/topics/actuator_armed.h>
#include <uORB/topics/actuator_controls.h>
#include <uORB/topics/actuator_outputs.h>
#include <uORB/topics/airspeed.h>
#include <uORB/topics/battery_status.h>
#include <uORB/topics/camera_trigger.h>
#include <uORB/topics/camera_capture.h>
#include <uORB/topics/cpuload.h>
#include <uORB/topics/debug_key_value.h>
#include <uORB/topics/debug_value.h>
#include <uORB/topics/debug_vect.h>
#include <uORB/topics/debug_array.h>
#include <uORB/topics/differential_pressure.h>
#include <uORB/topics/distance_sensor.h>
#include <uORB/topics/estimator_status.h>
#include <uORB/topics/geofence_result.h>
#include <uORB/topics/home_position.h>
#include <uORB/topics/input_rc.h>
#include <uORB/topics/manual_control_setpoint.h>
#include <uORB/topics/mavlink_log.h>
#include <uORB/topics/vehicle_trajectory_waypoint.h>
#include <uORB/topics/obstacle_distance.h>
#include <uORB/topics/optical_flow.h>
#include <uORB/topics/orbit_status.h>
#include <uORB/topics/position_controller_status.h>
#include <uORB/topics/position_setpoint_triplet.h>
#include <uORB/topics/sensor_combined.h>
#include <uORB/topics/sensor_bias.h>
#include <uORB/topics/tecs_status.h>
#include <uORB/topics/telemetry_status.h>
#include <uORB/topics/transponder_report.h>
#include <uORB/topics/vehicle_angular_velocity.h>
#include <uORB/topics/vehicle_attitude.h>
#include <uORB/topics/vehicle_attitude_setpoint.h>
#include <uORB/topics/vehicle_command.h>
#include <uORB/topics/vehicle_control_mode.h>
#include <uORB/topics/vehicle_global_position.h>
#include <uORB/topics/vehicle_gps_position.h>
#include <uORB/topics/vehicle_land_detected.h>
#include <uORB/topics/vehicle_local_position.h>
#include <uORB/topics/vehicle_local_position_setpoint.h>
#include <uORB/topics/vehicle_odometry.h>
#include <uORB/topics/vehicle_rates_setpoint.h>
#include <uORB/topics/vehicle_status.h>
#include <uORB/topics/vehicle_status_flags.h>
#include <uORB/topics/vtol_vehicle_status.h>
#include <uORB/topics/wind_estimate.h>
#include <uORB/topics/mount_orientation.h>
#include <uORB/topics/collision_report.h>
#include <uORB/topics/sensor_accel.h>
#include <uORB/topics/sensor_gyro.h>
#include <uORB/topics/sensor_mag.h>
#include <uORB/topics/vehicle_air_data.h>
#include <uORB/topics/vehicle_magnetometer.h>
#include <uORB/uORB.h>

Go to the source code of this file.

Classes

class  MavlinkStreamHeartbeat
 
class  MavlinkStreamStatustext
 
class  MavlinkStreamCommandLong
 
class  MavlinkStreamSysStatus
 
class  MavlinkStreamBatteryStatus
 
class  MavlinkStreamHighresIMU
 
class  MavlinkStreamScaledIMU
 
class  MavlinkStreamScaledIMU2
 
class  MavlinkStreamScaledIMU3
 
class  MavlinkStreamAttitude
 
class  MavlinkStreamAttitudeQuaternion
 
class  MavlinkStreamVFRHUD
 
class  MavlinkStreamGPSRawInt
 
class  MavlinkStreamGPS2Raw
 
class  MavlinkStreamSystemTime
 
class  MavlinkStreamTimesync
 
class  MavlinkStreamADSBVehicle
 
class  MavlinkStreamUTMGlobalPosition
 
class  MavlinkStreamCollision
 
class  MavlinkStreamCameraTrigger
 
class  MavlinkStreamCameraImageCaptured
 
class  MavlinkStreamGlobalPositionInt
 
class  MavlinkStreamOdometry
 
class  MavlinkStreamLocalPositionNED
 
class  MavlinkStreamEstimatorStatus
 
class  MavlinkStreamAttPosMocap
 
class  MavlinkStreamHomePosition
 
class  MavlinkStreamServoOutputRaw< N >
 
class  MavlinkStreamActuatorControlTarget< N >
 
class  MavlinkStreamHILActuatorControls
 
class  MavlinkStreamPositionTargetGlobalInt
 
class  MavlinkStreamLocalPositionSetpoint
 
class  MavlinkStreamAttitudeTarget
 
class  MavlinkStreamRCChannels
 
class  MavlinkStreamManualControl
 
class  MavlinkStreamTrajectoryRepresentationWaypoints
 
class  MavlinkStreamOpticalFlowRad
 
class  MavlinkStreamNamedValueFloat
 
class  MavlinkStreamDebug
 
class  MavlinkStreamDebugVect
 
class  MavlinkStreamDebugFloatArray
 
class  MavlinkStreamNavControllerOutput
 
class  MavlinkStreamCameraCapture
 
class  MavlinkStreamDistanceSensor
 
class  MavlinkStreamExtendedSysState
 
class  MavlinkStreamAltitude
 
class  MavlinkStreamWind
 
class  MavlinkStreamMountOrientation
 
class  MavlinkStreamGroundTruth
 
class  MavlinkStreamPing
 
class  MavlinkStreamOrbitStatus
 
class  MavlinkStreamObstacleDistance
 

Functions

static uint16_t cm_uint16_from_m_float (float m)
 
static void get_mavlink_mode_state (const struct vehicle_status_s *const status, uint8_t *mavlink_state, uint8_t *mavlink_base_mode, uint32_t *mavlink_custom_mode)
 
void get_mavlink_navigation_mode (const struct vehicle_status_s *const status, uint8_t *mavlink_base_mode, union px4_custom_mode *custom_mode)
 
const char * get_stream_name (const uint16_t msg_id)
 
MavlinkStreamcreate_mavlink_stream (const char *stream_name, Mavlink *mavlink)
 

Variables

static const StreamListItem streams_list []
 

Detailed Description

MAVLink 2.0 message formatters implementation.

Author
Lorenz Meier loren.nosp@m.z@px.nosp@m.4.io
Anton Babushkin anton.nosp@m..bab.nosp@m.ushki.nosp@m.n@me.nosp@m..com

Definition in file mavlink_messages.cpp.

Function Documentation

◆ cm_uint16_from_m_float()

uint16_t cm_uint16_from_m_float ( float  m)
static

Definition at line 122 of file mavlink_messages.cpp.

References f().

Referenced by MavlinkStreamGPSRawInt::send(), and MavlinkStreamGPS2Raw::send().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_mavlink_stream()

MavlinkStream* create_mavlink_stream ( const char *  stream_name,
Mavlink mavlink 
)

Definition at line 5142 of file mavlink_messages.cpp.

Referenced by Mavlink::configure_stream(), and StreamListItem::StreamListItem().

Here is the caller graph for this function:

◆ get_mavlink_mode_state()

void get_mavlink_mode_state ( const struct vehicle_status_s *const  status,
uint8_t *  mavlink_state,
uint8_t *  mavlink_base_mode,
uint32_t *  mavlink_custom_mode 
)
static

Definition at line 274 of file mavlink_messages.cpp.

References vehicle_status_s::arming_state, px4_custom_mode::data, and get_mavlink_navigation_mode().

Referenced by MavlinkStreamHeartbeat::send(), and MavlinkStreamHILActuatorControls::send().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_mavlink_navigation_mode()

◆ get_stream_name()

const char* get_stream_name ( const uint16_t  msg_id)

Definition at line 5130 of file mavlink_messages.cpp.

Referenced by MavlinkReceiver::set_message_interval(), and StreamListItem::StreamListItem().

Here is the caller graph for this function:

Variable Documentation

◆ streams_list

const StreamListItem streams_list[]
static

Definition at line 5070 of file mavlink_messages.cpp.