APM:Libraries
Macros | Functions | Variables
GCS_MAVLink.h File Reference
#include "compat.h"
#include "include/mavlink/v2.0/ardupilotmega/version.h"
#include "include/mavlink/v2.0/mavlink_types.h"
#include "include/mavlink/v2.0/ardupilotmega/mavlink.h"
Include dependency graph for GCS_MAVLink.h:

Go to the source code of this file.

Macros

#define MAVLINK_COMM_NUM_CHANNELS   1
 
#define MAVLINK_CRC_EXTRA   1
 
#define MAVLINK_COMM_NUM_BUFFERS   1
 
#define MAVLINK_USE_CONVENIENCE_FUNCTIONS
 

Functions

void osd_queue (uint8_t c)
 
static void comm_send_ch (mavlink_channel_t chan, uint8_t ch)
 
static uint8_t comm_receive_ch (mavlink_channel_t chan)
 
static uint16_t comm_get_available (mavlink_channel_t chan)
 
static int comm_get_txspace (mavlink_channel_t chan)
 
uint8_t mavlink_check_target (uint8_t sysid, uint8_t compid)
 
uint8_t mav_var_type (enum ap_var_type t)
 

Variables

AP_HAL::BetterStreammavlink_comm_0_port
 MAVLink stream used for HIL interaction. More...
 
AP_HAL::BetterStreammavlink_comm_1_port
 MAVLink stream used for ground control communication. More...
 
mavlink_system_t mavlink_system
 MAVLink system definition. More...
 

Macro Definition Documentation

◆ MAVLINK_COMM_NUM_BUFFERS

#define MAVLINK_COMM_NUM_BUFFERS   1

◆ MAVLINK_COMM_NUM_CHANNELS

#define MAVLINK_COMM_NUM_CHANNELS   1

Definition at line 12 of file GCS_MAVLink.h.

◆ MAVLINK_CRC_EXTRA

#define MAVLINK_CRC_EXTRA   1

Definition at line 13 of file GCS_MAVLink.h.

◆ MAVLINK_USE_CONVENIENCE_FUNCTIONS

#define MAVLINK_USE_CONVENIENCE_FUNCTIONS

Definition at line 76 of file GCS_MAVLink.h.

Function Documentation

◆ comm_get_available()

static uint16_t comm_get_available ( mavlink_channel_t  chan)
inlinestatic

Check for available data on the nominated MAVLink channel

Parameters
chanChannel to check
Returns
Number of bytes available

Definition at line 57 of file GCS_MAVLink.h.

Referenced by GCS_MAVLINK::update().

Here is the caller graph for this function:

◆ comm_get_txspace()

static int comm_get_txspace ( mavlink_channel_t  chan)
inlinestatic

Check for available transmit space on the nominated MAVLink channel

Parameters
chanChannel to check
Returns
Number of bytes available, -1 for error

Definition at line 67 of file GCS_MAVLink.h.

Referenced by MAVLink_routing::check_and_forward(), MAVLink_routing::handle_heartbeat(), GCS_MAVLINK::queued_param_send(), GCS_MAVLINK::send_collision_all(), DataFlash_MAVLink::send_log_block(), and MAVLink_routing::send_to_components().

Here is the caller graph for this function:

◆ comm_receive_ch()

static uint8_t comm_receive_ch ( mavlink_channel_t  chan)
inlinestatic

Read a byte from the nominated MAVLink channel

Parameters
chanChannel to receive on
Returns
Byte read

Definition at line 48 of file GCS_MAVLink.h.

◆ comm_send_ch()

static void comm_send_ch ( mavlink_channel_t  chan,
uint8_t  ch 
)
inlinestatic

Send a byte to the nominated MAVLink channel

Parameters
chanChannel to send to
chByte to send

Definition at line 38 of file GCS_MAVLink.h.

Here is the call graph for this function:

◆ mav_var_type()

uint8_t mav_var_type ( enum ap_var_type  t)

Definition at line 69 of file GCS_MAVLink.cpp.

Referenced by GCS_MAVLINK::queued_param_send(), GCS_MAVLINK::send_parameter_reply(), and GCS::send_parameter_value().

Here is the caller graph for this function:

◆ mavlink_check_target()

uint8_t mavlink_check_target ( uint8_t  sysid,
uint8_t  compid 
)

◆ osd_queue()

void osd_queue ( uint8_t  c)

Referenced by comm_send_ch().

Here is the caller graph for this function:

Variable Documentation

◆ mavlink_comm_0_port

AP_HAL::BetterStream* mavlink_comm_0_port

MAVLink stream used for HIL interaction.

◆ mavlink_comm_1_port

AP_HAL::BetterStream* mavlink_comm_1_port

MAVLink stream used for ground control communication.

◆ mavlink_system

mavlink_system_t mavlink_system