ardupilot/libraries/AP_HAL_SITL
Caio Marcelo de Oliveira Filho efbc7648b1 AP_HAL: create AP_HAL namespace and use for some HAL functionality
For certain basic functionality, there aren't much benefit to be able to
vary the implementation easily at runtime. So instead of using virtual
functions, use regular functions that are "resolved" at link time. The
implementation of such functions is provided per board/platform.

Examples of functions that fit this include: getting the current
time (since boot), panic'ing, getting system information, rebooting.

These functions are less likely to benefit from the indirection provided
by virtual interfaces. For more complex hardware access APIs the
indirection makes more sense and ease the testing (when we have it!).

The idea is that instead of calling

    hal.scheduler->panic("on the streets of london");

now use

    AP_HAL::panic("on the streets of london");

A less important side-effect is that call-site code gets
smaller. Currently the compiler needs to get the hal, get the scheduler
pointer, get the right function pointer in the vtable for that
scheduler. And the call must include an extra parameter ("this"). Now it
will be just a function call, with the address resolved at link time.

This patch introduces the first functions that will be in the namespace,
further patches will implementations for each board and then switch the
call-sites. The extra init() function allow any initial setup needed for
the functions to work.
2015-11-20 12:25:24 +09:00
..
AnalogIn.cpp AP_HAL_SITL: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AnalogIn.h AP_HAL_SITL: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
AP_HAL_SITL_Namespace.h HAL_SITL: reformat HAL_SITL with astyle 2015-05-05 10:59:07 +10:00
AP_HAL_SITL_Private.h HAL_SITL: rename HAL_AVR_SITL to HAL_SITL 2015-05-05 09:45:54 +10:00
AP_HAL_SITL.h AP_HAL: provide AP_HAL_MAIN() 2015-10-21 09:16:09 +11:00
fenv_polyfill.h HAL_SITL: Adds polyfill for feenableexcept on OS X. 2015-07-01 11:32:01 +10:00
HAL_SITL_Class.cpp AP_HAL_SITL: merge init() and run() 2015-10-21 09:16:08 +11:00
HAL_SITL_Class.h AP_HAL_SITL: merge init() and run() 2015-10-21 09:16:08 +11:00
RCInput.cpp AP_HAL_SITL: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
RCInput.h AP_HAL_SITL: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
RCOutput.cpp AP_HAL_SITL: remove unused write method 2015-09-29 11:53:51 +09:00
RCOutput.h AP_HAL_SITL: remove unused write method 2015-09-29 11:53:51 +09:00
Scheduler.cpp Replace prog_char and prog_char_t with char 2015-10-30 14:35:30 +09:00
Scheduler.h Replace prog_char and prog_char_t with char 2015-10-30 14:35:30 +09:00
sitl_barometer.cpp AP_HAL_SITL: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:12 +11:00
SITL_cmdline.cpp HAL_SITL: added help for uart command line checks 2015-11-04 14:26:55 +11:00
sitl_compass.cpp AP_HAL_SITL: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:12 +11:00
sitl_gps.cpp SITL: use a SITL namespace 2015-10-22 11:04:42 -02:00
sitl_ins.cpp HAL_SITL: moved virtual INS sensor to AP_InertialSensor_SITL 2015-11-16 17:57:35 +11:00
sitl_optical_flow.cpp AP_HAL_SITL: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
SITL_State.cpp HAL_SITL: moved virtual INS sensor to AP_InertialSensor_SITL 2015-11-16 17:57:35 +11:00
SITL_State.h HAL_SITL: moved virtual INS sensor to AP_InertialSensor_SITL 2015-11-16 17:57:35 +11:00
Storage.cpp AP_HAL_SITL: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
Storage.h AP_HAL_SITL: standardize inclusion of libaries headers 2015-08-11 16:28:43 +10:00
system.cpp AP_HAL: create AP_HAL namespace and use for some HAL functionality 2015-11-20 12:25:24 +09:00
UARTDriver.cpp HAL_SITL: added support for real UART devices 2015-11-04 11:29:04 +11:00
UARTDriver.h HAL_SITL: added support for real UART devices 2015-11-04 11:29:04 +11:00
Util.h HAL_SITL: make available_memory() uint32_t 2015-11-05 16:09:00 +11:00