APM:Libraries
Public Member Functions | Private Attributes | List of all members
F4Light::Util Class Reference

#include <Util.h>

Inheritance diagram for F4Light::Util:
[legend]
Collaboration diagram for F4Light::Util:
[legend]

Public Member Functions

 Util ()
 
bool run_debug_shell (AP_HAL::BetterStream *stream)
 
void set_soft_armed (const bool b)
 
bool get_soft_armed ()
 
uint64_t get_system_clock_ms () const
 
void set_system_clock (uint64_t time_utc_usec)
 
uint32_t available_memory (void) override
 
bool get_system_id (char buf[40]) override
 
Semaphorenew_semaphore (void) override
 
void * malloc_type (size_t size, Memory_Type mem_type) override
 
void free_type (void *ptr, size_t size, Memory_Type mem_type) override
 
- Public Member Functions inherited from AP_HAL::Util
int snprintf (char *str, size_t size, const char *format,...)
 
int vsnprintf (char *str, size_t size, const char *format, va_list ap)
 
void set_soft_armed (const bool b)
 
bool get_soft_armed () const
 
void set_capabilities (uint64_t cap)
 
void clear_capabilities (uint64_t cap)
 
uint64_t get_capabilities () const
 
virtual const char * get_custom_log_directory () const
 
virtual const char * get_custom_terrain_directory () const
 
virtual const char * get_custom_storage_directory () const
 
virtual const char * get_custom_defaults_file () const
 
virtual enum safety_state safety_switch_state (void)
 
uint64_t get_system_clock_ms () const
 
void get_system_clock_utc (int32_t &hour, int32_t &min, int32_t &sec, int32_t &ms) const
 
uint32_t get_time_utc (int32_t hour, int32_t min, int32_t sec, int32_t ms) const
 
virtual void commandline_arguments (uint8_t &argc, char *const *&argv)
 
virtual bool toneAlarm_init ()
 
virtual void toneAlarm_set_tune (uint8_t tune)
 
virtual void _toneAlarm_timer_tick ()
 
virtual AP_HAL::BetterStreamget_shell_stream ()
 
virtual void set_imu_temp (float current)
 
virtual void set_imu_target_temp (int8_t *target)
 
virtual perf_counter_t perf_alloc (perf_counter_type t, const char *name)
 
virtual void perf_begin (perf_counter_t h)
 
virtual void perf_end (perf_counter_t h)
 
virtual void perf_count (perf_counter_t h)
 

Private Attributes

uint64_t gps_shift
 

Additional Inherited Members

- Public Types inherited from AP_HAL::Util
enum  safety_state { SAFETY_NONE, SAFETY_DISARMED, SAFETY_ARMED }
 
enum  perf_counter_type { PC_COUNT, PC_ELAPSED, PC_INTERVAL }
 
enum  Memory_Type { MEM_DMA_SAFE, MEM_FAST }
 
typedef void * perf_counter_t
 
- Protected Attributes inherited from AP_HAL::Util
bool soft_armed = false
 
uint64_t capabilities = 0
 

Detailed Description

Definition at line 14 of file Util.h.

Constructor & Destructor Documentation

◆ Util()

F4Light::Util::Util ( )
inline

Definition at line 16 of file Util.h.

Member Function Documentation

◆ available_memory()

uint32_t F4Light::Util::available_memory ( void  )
inlineoverridevirtual

how much free memory do we have in bytes. If unknown return 4096

Reimplemented from AP_HAL::Util.

Definition at line 40 of file Util.h.

◆ free_type()

void Util::free_type ( void *  ptr,
size_t  size,
Memory_Type  mem_type 
)
overridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 37 of file Util.cpp.

Referenced by new_semaphore().

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

◆ get_soft_armed()

bool F4Light::Util::get_soft_armed ( )
inline

Definition at line 27 of file Util.h.

◆ get_system_clock_ms()

uint64_t F4Light::Util::get_system_clock_ms ( ) const
inline

Definition at line 29 of file Util.h.

Here is the call graph for this function:

◆ get_system_id()

bool F4Light::Util::get_system_id ( char  buf[40])
inlineoverridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 45 of file Util.h.

Here is the call graph for this function:

◆ malloc_type()

void * Util::malloc_type ( size_t  size,
Memory_Type  mem_type 
)
overridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 14 of file Util.cpp.

Referenced by new_semaphore().

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

◆ new_semaphore()

Semaphore* F4Light::Util::new_semaphore ( void  )
inlineoverridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 63 of file Util.h.

Here is the call graph for this function:

◆ run_debug_shell()

bool F4Light::Util::run_debug_shell ( AP_HAL::BetterStream stream)
inlinevirtual

Implements AP_HAL::Util.

Definition at line 18 of file Util.h.

◆ set_soft_armed()

void F4Light::Util::set_soft_armed ( const bool  b)
inline

Definition at line 20 of file Util.h.

Here is the call graph for this function:

◆ set_system_clock()

void F4Light::Util::set_system_clock ( uint64_t  time_utc_usec)
inlinevirtual

Reimplemented from AP_HAL::Util.

Definition at line 35 of file Util.h.

Here is the call graph for this function:

Member Data Documentation

◆ gps_shift

uint64_t F4Light::Util::gps_shift
private

Definition at line 69 of file Util.h.

Referenced by get_system_clock_ms(), and set_system_clock().


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