APM:Libraries
Public Member Functions | Public Attributes | Private Attributes | List of all members
AP_HAL::Scheduler Class Referenceabstract

#include <Scheduler.h>

Inheritance diagram for AP_HAL::Scheduler:
[legend]

Public Member Functions

 Scheduler ()
 
virtual void init ()=0
 
virtual void delay (uint16_t ms)=0
 
virtual void delay_microseconds (uint16_t us)=0
 
virtual void delay_microseconds_boost (uint16_t us)
 
virtual void boost_end (void)
 
virtual void register_delay_callback (AP_HAL::Proc, uint16_t min_time_ms)
 
virtual bool in_delay_callback () const
 
virtual void register_timer_process (AP_HAL::MemberProc)=0
 
virtual void register_io_process (AP_HAL::MemberProc)=0
 
virtual void suspend_timer_procs ()=0
 
virtual void resume_timer_procs ()=0
 
virtual void register_timer_failsafe (AP_HAL::Proc, uint32_t period_us)=0
 
virtual void system_initialized ()=0
 
virtual void reboot (bool hold_in_bootloader)=0
 
virtual void stop_clock (uint64_t time_usec)
 
virtual bool in_main_thread () const =0
 
virtual void create_uavcan_thread ()
 
virtual void * disable_interrupts_save (void)
 
virtual void restore_interrupts (void *)
 
virtual void call_delay_cb ()
 

Public Attributes

uint16_t _min_delay_cb_ms
 

Private Attributes

AP_HAL::Proc _delay_cb
 
bool _in_delay_callback: 1
 

Detailed Description

Definition at line 11 of file Scheduler.h.

Constructor & Destructor Documentation

◆ Scheduler()

AP_HAL::Scheduler::Scheduler ( )
inline

Definition at line 13 of file Scheduler.h.

Here is the call graph for this function:

Member Function Documentation

◆ boost_end()

virtual void AP_HAL::Scheduler::boost_end ( void  )
inlinevirtual

Reimplemented in ChibiOS::Scheduler.

Definition at line 35 of file Scheduler.h.

Referenced by AP_AHRS_NavEKF::update().

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

◆ call_delay_cb()

void Scheduler::call_delay_cb ( )
virtual

Definition at line 12 of file Scheduler.cpp.

Referenced by F4Light::Scheduler::_delay(), Linux::Scheduler::delay(), PX4::PX4Scheduler::delay(), VRBRAIN::VRBRAINScheduler::delay(), ChibiOS::Scheduler::delay(), restore_interrupts(), and HALSITL::Scheduler::Scheduler().

Here is the caller graph for this function:

◆ create_uavcan_thread()

virtual void AP_HAL::Scheduler::create_uavcan_thread ( )
inlinevirtual

Reimplemented in PX4::PX4Scheduler, and VRBRAIN::VRBRAINScheduler.

Definition at line 70 of file Scheduler.h.

◆ delay()

virtual void AP_HAL::Scheduler::delay ( uint16_t  ms)
pure virtual

Implemented in F4Light::Scheduler, ChibiOS::Scheduler, PX4::PX4Scheduler, VRBRAIN::VRBRAINScheduler, Linux::Scheduler, HALSITL::Scheduler, and Empty::Scheduler.

Referenced by AP_InertialSensor_LSM9DS1::_accel_init(), AP_InertialSensor_LSM9DS0::_accel_init(), Linux::CameraSensor_Mt9v117::_apply_patch(), Linux::CameraSensor_Mt9v117::_config_change(), AP_InertialSensor_BMI160::_configure_accel(), AP_InertialSensor_BMI160::_configure_fifo(), AP_InertialSensor_BMI160::_configure_gyro(), AP_InertialSensor_BMI160::_configure_int1_pin(), AP_InertialSensor_LSM9DS1::_gyro_init(), AP_InertialSensor_LSM9DS0::_gyro_init(), AP_Compass_LSM303D::_hardware_init(), AP_Compass_MAG3110::_hardware_init(), AP_InertialSensor_LSM9DS1::_hardware_init(), AP_InertialSensor_BMI160::_hardware_init(), AP_InertialSensor_LSM9DS0::_hardware_init(), AP_InertialSensor_Invensense::_hardware_init(), Menu::_help(), AP_Baro_LPS2XH::_imu_i2c_init(), AP_RangeFinder_MaxsonarI2CXL::_init(), AP_Baro_MS56XX::_init(), AP_Baro_KellerLD::_init(), AP_InertialSensor_RST::_init_gyro(), AP_InertialSensor::_init_gyro(), AP_InertialSensor_L3G4200D::_init_sensor(), Linux::CameraSensor_Mt9v117::_init_sensor(), Linux::UARTDriver::_parseDevicePath(), AP_AccelCal::_printf(), Linux::CameraSensor_Mt9v117::_soft_reset(), PX4::PX4UARTDriver::begin(), VRBRAIN::VRBRAINUARTDriver::begin(), ChibiOS::UARTDriver::begin(), AP_BoardConfig::board_init_safety(), AP_Baro::calibrate(), AP_InertialSensor::calibrate_trim(), Compass_PerMotor::calibration_start(), Compass::compass_cal_update(), AP_RangeFinder_BBB_PRU::detect(), drive(), PX4::PX4UARTDriver::end(), VRBRAIN::VRBRAINUARTDriver::end(), ChibiOS::UARTDriver::end(), DataFlashTest_AllTypes::flush_dataflash(), full_spectrum(), get_device(), ChibiOS::SPIDeviceManager::get_device(), AP_RangeFinder_VL53L0X::get_SPAD_info(), GCS_MAVLINK::handle_preflight_reboot(), GCS_MAVLINK::handle_serial_control(), AP_Baro_ICM20789::imu_i2c_init(), AP_Baro_ICM20789::imu_spi_init(), TSYS01::init(), AP_Baro_ICM20789::init(), AP_RangeFinder_TeraRangerI2C::init(), AP_Airspeed_MS4525::init(), OreoLED_PX4::init(), AP_Compass_BMM150::init(), AP_Compass_IST8310::init(), AP_Compass_MMC3416::init(), Compass::init(), AP_Compass_AK09916::init(), Linux::RCInput_RPI::init(), loop(), MissionTest::loop(), DataFlashTest::loop(), DataFlashTest_AllTypes::loop(), motor_order_test(), AP_Invensense_AuxiliaryBusSlave::passthrough_read(), AP_Invensense_AuxiliaryBusSlave::passthrough_write(), AP_RangeFinder_VL53L0X::performSingleRefCalibration(), AP_BoardConfig::px4_setup_px4io(), read_calibration_data(), AP_Airspeed_MS5525::read_prom(), Linux::RCOutput_PCA9685::reset_all_channels(), Menu::run(), AP_OpticalFlow_PX4Flow::scan_buses(), Scheduler(), AP_BoardConfig::sensor_config_error(), Linux::UARTDriver::set_device_path(), setup(), RC_UART::setup(), DataFlashTest::setup(), DataFlashTest_AllTypes::setup(), AP_OpticalFlow_Pixart::setup_sensor(), GCS_MAVLINK::setup_uart(), AP_InertialSensor::simple_accel_cal(), AP_OpticalFlow_Pixart::srom_download(), AP_InertialSensor_Invensense::start(), PX4::PX4UARTDriver::write(), VRBRAIN::VRBRAINUARTDriver::write(), and ChibiOS::UARTDriver::write().

Here is the caller graph for this function:

◆ delay_microseconds()

virtual void AP_HAL::Scheduler::delay_microseconds ( uint16_t  us)
pure virtual

◆ delay_microseconds_boost()

virtual void AP_HAL::Scheduler::delay_microseconds_boost ( uint16_t  us)
inlinevirtual

Reimplemented in F4Light::Scheduler, ChibiOS::Scheduler, PX4::PX4Scheduler, and VRBRAIN::VRBRAINScheduler.

Definition at line 30 of file Scheduler.h.

Referenced by AP_InertialSensor::wait_for_sample().

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

◆ disable_interrupts_save()

virtual void* AP_HAL::Scheduler::disable_interrupts_save ( void  )
inlinevirtual

Reimplemented in ChibiOS::Scheduler, and PX4::PX4Scheduler.

Definition at line 79 of file Scheduler.h.

Referenced by AP_RPM_Pin::update().

Here is the caller graph for this function:

◆ in_delay_callback()

virtual bool AP_HAL::Scheduler::in_delay_callback ( ) const
inlinevirtual

Definition at line 44 of file Scheduler.h.

Referenced by GCS_MAVLINK::data_stream_send().

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

◆ in_main_thread()

virtual bool AP_HAL::Scheduler::in_main_thread ( ) const
pure virtual

Implemented in F4Light::Scheduler, ChibiOS::Scheduler, PX4::PX4Scheduler, VRBRAIN::VRBRAINScheduler, Linux::Scheduler, and HALSITL::Scheduler.

Referenced by DataFlash_Backend::ShouldLog(), DataFlash_Backend::StartNewLogOK(), stop_clock(), and DataFlash_Backend::WriteBlockCheckStartupMessages().

Here is the caller graph for this function:

◆ init()

virtual void AP_HAL::Scheduler::init ( )
pure virtual

Implemented in F4Light::Scheduler, ChibiOS::Scheduler, PX4::PX4Scheduler, VRBRAIN::VRBRAINScheduler, Linux::Scheduler, HALSITL::Scheduler, and Empty::Scheduler.

Referenced by main_loop(), HAL_Linux::run(), HAL_Empty::run(), HAL_SITL::run(), HAL_F4Light::run(), Scheduler(), and THD_FUNCTION().

Here is the caller graph for this function:

◆ reboot()

virtual void AP_HAL::Scheduler::reboot ( bool  hold_in_bootloader)
pure virtual

Implemented in F4Light::Scheduler, ChibiOS::Scheduler, PX4::PX4Scheduler, VRBRAIN::VRBRAINScheduler, Linux::Scheduler, HALSITL::Scheduler, and Empty::Scheduler.

Referenced by Compass::compass_cal_update(), GCS_MAVLINK::handle_preflight_reboot(), in_delay_callback(), and loop().

Here is the caller graph for this function:

◆ register_delay_callback()

void Scheduler::register_delay_callback ( AP_HAL::Proc  proc,
uint16_t  min_time_ms 
)
virtual

Reimplemented in F4Light::Scheduler.

Definition at line 5 of file Scheduler.cpp.

Referenced by boost_end(), and F4Light::Scheduler::register_delay_callback().

Here is the caller graph for this function:

◆ register_io_process()

virtual void AP_HAL::Scheduler::register_io_process ( AP_HAL::MemberProc  )
pure virtual

Implemented in F4Light::Scheduler, ChibiOS::Scheduler, PX4::PX4Scheduler, VRBRAIN::VRBRAINScheduler, Linux::Scheduler, HALSITL::Scheduler, and Empty::Scheduler.

Referenced by in_delay_callback(), AP_DEVO_Telem::init(), AP_SmartRTL::init(), OreoLED_PX4::init(), AP_Frsky_Telem::init(), GCS_MAVLINK::send_queued_parameters(), and CompassLearn::update().

Here is the caller graph for this function:

◆ register_timer_failsafe()

virtual void AP_HAL::Scheduler::register_timer_failsafe ( AP_HAL::Proc  ,
uint32_t  period_us 
)
pure virtual

Implemented in F4Light::Scheduler, ChibiOS::Scheduler, PX4::PX4Scheduler, VRBRAIN::VRBRAINScheduler, Linux::Scheduler, HALSITL::Scheduler, and Empty::Scheduler.

Referenced by in_delay_callback().

Here is the caller graph for this function:

◆ register_timer_process()

virtual void AP_HAL::Scheduler::register_timer_process ( AP_HAL::MemberProc  )
pure virtual

◆ restore_interrupts()

virtual void AP_HAL::Scheduler::restore_interrupts ( void *  )
inlinevirtual

Reimplemented in ChibiOS::Scheduler, and PX4::PX4Scheduler.

Definition at line 84 of file Scheduler.h.

Referenced by AP_RPM_Pin::update().

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

◆ resume_timer_procs()

virtual void AP_HAL::Scheduler::resume_timer_procs ( )
pure virtual

◆ stop_clock()

virtual void AP_HAL::Scheduler::stop_clock ( uint64_t  time_usec)
inlinevirtual

optional function to stop clock at a given time, used by log replay

Reimplemented in HALSITL::Scheduler, and Linux::Scheduler.

Definition at line 66 of file Scheduler.h.

Referenced by HALSITL::SITL_State::_fdm_input_local(), and HALSITL::SITL_State::_sitl_setup().

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

◆ suspend_timer_procs()

virtual void AP_HAL::Scheduler::suspend_timer_procs ( )
pure virtual

◆ system_initialized()

virtual void AP_HAL::Scheduler::system_initialized ( )
pure virtual

Implemented in F4Light::Scheduler, ChibiOS::Scheduler, PX4::PX4Scheduler, VRBRAIN::VRBRAINScheduler, Linux::Scheduler, HALSITL::Scheduler, and Empty::Scheduler.

Referenced by in_delay_callback(), main_loop(), HAL_Linux::run(), HAL_Empty::run(), HAL_SITL::run(), HAL_F4Light::run(), and THD_FUNCTION().

Here is the caller graph for this function:

Member Data Documentation

◆ _delay_cb

AP_HAL::Proc AP_HAL::Scheduler::_delay_cb
private

Definition at line 92 of file Scheduler.h.

Referenced by call_delay_cb(), and register_delay_callback().

◆ _in_delay_callback

bool AP_HAL::Scheduler::_in_delay_callback
private

Definition at line 93 of file Scheduler.h.

Referenced by call_delay_cb(), and in_delay_callback().

◆ _min_delay_cb_ms

uint16_t AP_HAL::Scheduler::_min_delay_cb_ms

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