APM:Libraries
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | Static Private Attributes | List of all members
GCS Class Referenceabstract

global GCS object More...

#include <GCS.h>

Inheritance diagram for GCS:
[legend]
Collaboration diagram for GCS:
[legend]

Classes

struct  statustext_t
 

Public Member Functions

 GCS ()
 
void send_text (MAV_SEVERITY severity, const char *fmt,...)
 
virtual void send_statustext (MAV_SEVERITY severity, uint8_t dest_bitmask, const char *text)
 
void service_statustext (void)
 
virtual GCS_MAVLINKchan (const uint8_t ofs)=0
 
virtual const GCS_MAVLINKchan (const uint8_t ofs) const =0
 
virtual uint8_t num_gcs () const =0
 
void send_message (enum ap_message id)
 
void send_mission_item_reached_message (uint16_t mission_index)
 
void send_named_float (const char *name, float value) const
 
void send_home () const
 
void send_ekf_origin () const
 
void send_parameter_value (const char *param_name, ap_var_type param_type, float param_value)
 
void retry_deferred ()
 
void data_stream_send ()
 
void update ()
 
virtual void setup_uarts (AP_SerialManager &serial_manager)
 
bool out_of_time () const
 
void set_out_of_time (bool val)
 
void set_dataflash (DataFlash_Class *dataflash)
 
void register_frsky_telemetry_callback (AP_Frsky_Telem *frsky_telemetry)
 
bool install_alternative_protocol (mavlink_channel_t chan, GCS_MAVLINK::protocol_handler_fn_t handler)
 

Static Public Member Functions

static class GCSinstance ()
 

Public Attributes

DataFlash_Classdataflash_p
 
AP_Frsky_Telemfrsky_telemetry_p
 

Private Attributes

ObjectArray< statustext_t_statustext_queue {_status_capacity}
 
bool _out_of_time
 

Static Private Attributes

static GCS_singleton = nullptr
 
static const uint8_t _status_capacity = 5
 

Detailed Description

global GCS object

Definition at line 562 of file GCS.h.

Constructor & Destructor Documentation

◆ GCS()

GCS::GCS ( )
inline

Definition at line 567 of file GCS.h.

Here is the call graph for this function:

Member Function Documentation

◆ chan() [1/2]

virtual GCS_MAVLINK& GCS::chan ( const uint8_t  ofs)
pure virtual

Implemented in GCS_Dummy.

Referenced by install_alternative_protocol().

Here is the caller graph for this function:

◆ chan() [2/2]

virtual const GCS_MAVLINK& GCS::chan ( const uint8_t  ofs) const
pure virtual

Implemented in GCS_Dummy.

◆ data_stream_send()

void GCS::data_stream_send ( void  )

Definition at line 1340 of file GCS_Common.cpp.

◆ install_alternative_protocol()

bool GCS::install_alternative_protocol ( mavlink_channel_t  chan,
GCS_MAVLINK::protocol_handler_fn_t  handler 
)

Definition at line 52 of file GCS.cpp.

Here is the call graph for this function:

◆ instance()

static class GCS* GCS::instance ( void  )
inlinestatic

Definition at line 579 of file GCS.h.

Referenced by gcs().

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

◆ num_gcs()

virtual uint8_t GCS::num_gcs ( ) const
pure virtual

Implemented in GCS_Dummy.

Referenced by install_alternative_protocol().

Here is the caller graph for this function:

◆ out_of_time()

bool GCS::out_of_time ( ) const
inline

Definition at line 605 of file GCS.h.

◆ register_frsky_telemetry_callback()

void GCS::register_frsky_telemetry_callback ( AP_Frsky_Telem frsky_telemetry)
inline

Definition at line 626 of file GCS.h.

Referenced by AP_Frsky_Telem::init().

Here is the caller graph for this function:

◆ retry_deferred()

void GCS::retry_deferred ( )

Definition at line 1330 of file GCS_Common.cpp.

◆ send_ekf_origin()

void GCS::send_ekf_origin ( ) const

Definition at line 42 of file GCS.cpp.

◆ send_home()

void GCS::send_home ( ) const

Definition at line 37 of file GCS.cpp.

◆ send_message()

void GCS::send_message ( enum ap_message  id)

Definition at line 1321 of file GCS_Common.cpp.

Referenced by AP_Camera::log_picture(), and AP_Camera::update_trigger().

Here is the caller graph for this function:

◆ send_mission_item_reached_message()

void GCS::send_mission_item_reached_message ( uint16_t  mission_index)

Definition at line 1358 of file GCS_Common.cpp.

Referenced by instance().

Here is the caller graph for this function:

◆ send_named_float()

void GCS::send_named_float ( const char *  name,
float  value 
) const

Definition at line 32 of file GCS.cpp.

Referenced by AP_Airspeed::read().

Here is the caller graph for this function:

◆ send_parameter_value()

void GCS::send_parameter_value ( const char *  param_name,
ap_var_type  param_type,
float  param_value 
)

Definition at line 325 of file GCS_Param.cpp.

Referenced by instance(), AP_Param::save(), and AP_Param::send_parameter().

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

◆ send_statustext()

void GCS::send_statustext ( MAV_SEVERITY  severity,
uint8_t  dest_bitmask,
const char *  text 
)
virtual

Reimplemented in GCS_Dummy.

Definition at line 1237 of file GCS_Common.cpp.

Referenced by instance(), GCS_MAVLINK::send_text(), and send_text().

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

◆ send_text()

void GCS::send_text ( MAV_SEVERITY  severity,
const char *  fmt,
  ... 
)

Definition at line 8 of file GCS.cpp.

Referenced by EEPROMClass::_ErasePage(), GCS_MAVLINK::_handle_command_preflight_calibration_baro(), AP_GPS_UBLOX::_parse_gps(), AP_GPS_UBLOX::_save_cfg(), AP_Motors::add_motor_num(), AP_Arming::airspeed_checks(), AP_Arming::arm(), AP_Arming::arm_checks(), AP_Arming::barometer_checks(), AP_Arming::battery_checks(), AP_Arming::board_voltage_checks(), AP_GPS_SBF::broadcast_configuration_failure_reason(), AP_GPS_UBLOX::broadcast_configuration_failure_reason(), AP_GPS::broadcast_first_configuration_failure_reason(), AP_GPS_Backend::broadcast_gps_type(), AP_Landing_Deepstall::build_approach_path(), NavEKF2_core::calcGpsGoodToAlign(), NavEKF3_core::calcGpsGoodToAlign(), AP_Airspeed::calibrate(), AP_Baro::calibrate(), AP_AdvancedFailsafe::check(), AP_Tuning::check_controller_error(), SoaringController::check_cruise_criteria(), AP_BattMonitor::check_failsafes(), AP_Tuning::check_input(), AP_Tuning::check_selector_switch(), NavEKF2_core::checkAttitudeAlignmentStatus(), NavEKF3_core::checkAttitudeAlignmentStatus(), AP_Arming::compass_checks(), NavEKF2_core::controlMagYawReset(), NavEKF3_core::controlMagYawReset(), AP_SmartRTL::deactivate(), AP_Arming::disarm(), AP_ICEngine::engine_control(), NavEKF3_core::FuseBodyVel(), NavEKF3_core::FuseOptFlow(), AP_AdvancedFailsafe::gcs_terminate(), AP_Arming::gps_checks(), AP_Follow::handle_msg(), AP_ADSB::handle_out_cfg(), GCS_MAVLINK::handle_timesync(), AP_ADSB::handle_transceiver_report(), AP_Arming::hardware_safety_check(), AP_MotorsTri::init(), AP_SmartRTL::init(), AP_Airspeed::init(), DataFlash_Class::Init(), AP_InertialSensor::BatchSampler::init(), AP_Mission::init(), NavEKF3::InitialiseFilter(), NavEKF2::InitialiseFilter(), NavEKF3_core::InitialiseFilterBootstrap(), AP_Arming::ins_checks(), AP_Mission::jump_to_landing_sequence(), AP_Arming::logging_checks(), AP_Arming::manual_transmitter_checks(), VRBRAIN::VRBRAINRCInput::new_input(), PX4::PX4RCInput::new_input(), AP_Tuning::next_parameter(), AP_Landing_Deepstall::override_servos(), AP_MotorsHeli::parameter_check(), AP_MotorsHeli_Single::parameter_check(), AP_Landing_Deepstall::predict_travel_distance(), AP_GPS_SBF::prepare_for_arming(), AP_GPS_SBF::process_message(), AP_Arming::rc_calibration_checks(), AP_Arming::rc_checks_copter_sub(), NavEKF2_core::readMagData(), NavEKF3_core::readMagData(), NavEKF2_core::realignYawGPS(), NavEKF3_core::realignYawGPS(), AP_Landing::restart_landing_sequence(), AP_BoardConfig::sensor_config_error(), AP_Arming::servo_checks(), NavEKF2_core::setAidingMode(), NavEKF3_core::setAidingMode(), NavEKF2_core::setOrigin(), NavEKF3_core::setOrigin(), NavEKF3_core::setup_core(), AP_Camera::setup_feedback_callback(), GCS_MAVLINK::try_send_message(), AP_Landing::type_slope_adjust_landing_slope_for_rangefinder_bump(), AP_Landing::type_slope_do_land(), AP_Landing::type_slope_setup_landing_glide_slope(), AP_Landing::type_slope_verify_land(), AP_ICEngine::update(), AP_ADSB::update(), AP_Airspeed::update_calibration(), AP::PerfInfo::update_logging(), AP_Landing_Deepstall::update_steering(), SoaringController::update_thermalling(), and AP_Landing::verify_land().

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

◆ service_statustext()

void GCS::service_statustext ( void  )

Definition at line 1276 of file GCS_Common.cpp.

Referenced by instance().

Here is the caller graph for this function:

◆ set_dataflash()

void GCS::set_dataflash ( DataFlash_Class dataflash)
inline

Definition at line 615 of file GCS.h.

◆ set_out_of_time()

void GCS::set_out_of_time ( bool  val)
inline

Definition at line 608 of file GCS.h.

Referenced by GCS_MAVLINK::data_stream_send().

Here is the caller graph for this function:

◆ setup_uarts()

void GCS::setup_uarts ( AP_SerialManager serial_manager)
virtual

Definition at line 1368 of file GCS_Common.cpp.

Referenced by instance().

Here is the caller graph for this function:

◆ update()

void GCS::update ( void  )

Definition at line 1349 of file GCS_Common.cpp.

Member Data Documentation

◆ _out_of_time

bool GCS::_out_of_time
private

Definition at line 655 of file GCS.h.

Referenced by out_of_time(), and set_out_of_time().

◆ _singleton

GCS * GCS::_singleton = nullptr
staticprivate

Definition at line 639 of file GCS.h.

Referenced by instance().

◆ _status_capacity

const uint8_t GCS::_status_capacity = 5
staticprivate

Definition at line 647 of file GCS.h.

◆ _statustext_queue

ObjectArray<statustext_t> GCS::_statustext_queue {_status_capacity}
private

Definition at line 652 of file GCS.h.

◆ dataflash_p

DataFlash_Class* GCS::dataflash_p

Definition at line 620 of file GCS.h.

Referenced by set_dataflash().

◆ frsky_telemetry_p

AP_Frsky_Telem* GCS::frsky_telemetry_p

Definition at line 631 of file GCS.h.


The documentation for this class was generated from the following files: