APM:Libraries
Public Member Functions | Private Attributes | List of all members
PX4::PX4Util Class Reference

#include <Util.h>

Inheritance diagram for PX4::PX4Util:
[legend]
Collaboration diagram for PX4::PX4Util:
[legend]

Public Member Functions

 PX4Util (void)
 
bool run_debug_shell (AP_HAL::BetterStream *stream)
 
enum safety_state safety_switch_state (void)
 
void set_system_clock (uint64_t time_utc_usec)
 
bool get_system_id (char buf[40])
 
uint32_t available_memory (void) override
 
AP_HAL::BetterStreamget_shell_stream ()
 
perf_counter_t perf_alloc (perf_counter_type t, const char *name) override
 
void perf_begin (perf_counter_t) override
 
void perf_end (perf_counter_t) override
 
void perf_count (perf_counter_t) override
 
AP_HAL::Semaphorenew_semaphore (void) override
 
void set_imu_temp (float current) override
 
void set_imu_target_temp (int8_t *target) override
 
void * malloc_type (size_t size, AP_HAL::Util::Memory_Type mem_type) override
 
void free_type (void *ptr, size_t size, AP_HAL::Util::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
 
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 ()
 

Private Attributes

int _safety_handle
 
PX4::NSHShellStream _shell_stream
 
struct {
   int8_t *   target
 
   float   integrator
 
   uint16_t   count
 
   float   sum
 
   uint32_t   last_update_ms
 
   int   fd = -1
 
_heater
 

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 30 of file Util.h.

Constructor & Destructor Documentation

◆ PX4Util()

PX4Util::PX4Util ( void  )

Definition at line 28 of file Util.cpp.

Member Function Documentation

◆ available_memory()

uint32_t PX4Util::available_memory ( void  )
overridevirtual

how much free memory do we have in bytes.

Reimplemented from AP_HAL::Util.

Definition at line 143 of file Util.cpp.

◆ free_type()

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

Reimplemented from AP_HAL::Util.

Definition at line 259 of file Util.cpp.

Here is the call graph for this function:

◆ get_shell_stream()

AP_HAL::BetterStream* PX4::PX4Util::get_shell_stream ( )
inlinevirtual

Reimplemented from AP_HAL::Util.

Definition at line 52 of file Util.h.

◆ get_system_id()

bool PX4Util::get_system_id ( char  buf[40])
virtual

Reimplemented from AP_HAL::Util.

Definition at line 110 of file Util.cpp.

Here is the call graph for this function:

◆ malloc_type()

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

Reimplemented from AP_HAL::Util.

Definition at line 247 of file Util.cpp.

Here is the call graph for this function:

◆ new_semaphore()

AP_HAL::Semaphore* PX4::PX4Util::new_semaphore ( void  )
inlineoverridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 59 of file Util.h.

◆ perf_alloc()

PX4Util::perf_counter_t PX4Util::perf_alloc ( PX4Util::perf_counter_type  t,
const char *  name 
)
overridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 151 of file Util.cpp.

◆ perf_begin()

void PX4Util::perf_begin ( perf_counter_t  h)
overridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 170 of file Util.cpp.

◆ perf_count()

void PX4Util::perf_count ( perf_counter_t  h)
overridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 180 of file Util.cpp.

◆ perf_end()

void PX4Util::perf_end ( perf_counter_t  h)
overridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 175 of file Util.cpp.

◆ run_debug_shell()

bool PX4Util::run_debug_shell ( AP_HAL::BetterStream stream)
virtual

Implements AP_HAL::Util.

Definition at line 37 of file Util.cpp.

Here is the call graph for this function:

◆ safety_switch_state()

enum PX4Util::safety_state PX4Util::safety_switch_state ( void  )
virtual

Reimplemented from AP_HAL::Util.

Definition at line 74 of file Util.cpp.

◆ set_imu_target_temp()

void PX4Util::set_imu_target_temp ( int8_t *  target)
overridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 232 of file Util.cpp.

Here is the call graph for this function:

◆ set_imu_temp()

void PX4Util::set_imu_temp ( float  current)
overridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 185 of file Util.cpp.

Here is the call graph for this function:

◆ set_system_clock()

void PX4Util::set_system_clock ( uint64_t  time_utc_usec)
virtual

Reimplemented from AP_HAL::Util.

Definition at line 99 of file Util.cpp.

Member Data Documentation

◆ _heater

struct { ... } PX4::PX4Util::_heater

◆ _safety_handle

int PX4::PX4Util::_safety_handle
private

Definition at line 69 of file Util.h.

Referenced by PX4Util(), and safety_switch_state().

◆ _shell_stream

PX4::NSHShellStream PX4::PX4Util::_shell_stream
private

Definition at line 70 of file Util.h.

◆ count

uint16_t PX4::PX4Util::count

Definition at line 75 of file Util.h.

◆ fd

int PX4::PX4Util::fd = -1

Definition at line 78 of file Util.h.

Referenced by run_debug_shell().

◆ integrator

float PX4::PX4Util::integrator

Definition at line 74 of file Util.h.

◆ last_update_ms

uint32_t PX4::PX4Util::last_update_ms

Definition at line 77 of file Util.h.

◆ sum

float PX4::PX4Util::sum

Definition at line 76 of file Util.h.

◆ target

int8_t* PX4::PX4Util::target

Definition at line 73 of file Util.h.

Referenced by set_imu_target_temp(), and set_imu_temp().


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