APM:Libraries
Public Member Functions | Private Attributes | List of all members
VRBRAIN::VRBRAINUtil Class Reference

#include <Util.h>

Inheritance diagram for VRBRAIN::VRBRAINUtil:
[legend]
Collaboration diagram for VRBRAIN::VRBRAINUtil:
[legend]

Public Member Functions

 VRBRAINUtil (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
 
VRBRAIN::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

◆ VRBRAINUtil()

VRBRAINUtil::VRBRAINUtil ( void  )

Definition at line 28 of file Util.cpp.

Member Function Documentation

◆ available_memory()

uint32_t VRBRAINUtil::available_memory ( void  )
overridevirtual

how much free memory do we have in bytes.

Reimplemented from AP_HAL::Util.

Definition at line 145 of file Util.cpp.

◆ free_type()

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

Reimplemented from AP_HAL::Util.

Definition at line 261 of file Util.cpp.

Here is the call graph for this function:

◆ get_shell_stream()

AP_HAL::BetterStream* VRBRAIN::VRBRAINUtil::get_shell_stream ( )
inlinevirtual

Reimplemented from AP_HAL::Util.

Definition at line 52 of file Util.h.

◆ get_system_id()

bool VRBRAINUtil::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 * VRBRAINUtil::malloc_type ( size_t  size,
AP_HAL::Util::Memory_Type  mem_type 
)
overridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 249 of file Util.cpp.

Here is the call graph for this function:

◆ new_semaphore()

AP_HAL::Semaphore* VRBRAIN::VRBRAINUtil::new_semaphore ( void  )
inlineoverridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 59 of file Util.h.

◆ perf_alloc()

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

Reimplemented from AP_HAL::Util.

Definition at line 153 of file Util.cpp.

◆ perf_begin()

void VRBRAINUtil::perf_begin ( perf_counter_t  h)
overridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 172 of file Util.cpp.

◆ perf_count()

void VRBRAINUtil::perf_count ( perf_counter_t  h)
overridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 182 of file Util.cpp.

◆ perf_end()

void VRBRAINUtil::perf_end ( perf_counter_t  h)
overridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 177 of file Util.cpp.

◆ run_debug_shell()

bool VRBRAINUtil::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 VRBRAINUtil::safety_state VRBRAINUtil::safety_switch_state ( void  )
virtual

Reimplemented from AP_HAL::Util.

Definition at line 74 of file Util.cpp.

◆ set_imu_target_temp()

void VRBRAINUtil::set_imu_target_temp ( int8_t *  target)
overridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 234 of file Util.cpp.

Here is the call graph for this function:

◆ set_imu_temp()

void VRBRAINUtil::set_imu_temp ( float  current)
overridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 187 of file Util.cpp.

Here is the call graph for this function:

◆ set_system_clock()

void VRBRAINUtil::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 { ... } VRBRAIN::VRBRAINUtil::_heater

◆ _safety_handle

int VRBRAIN::VRBRAINUtil::_safety_handle
private

Definition at line 69 of file Util.h.

Referenced by safety_switch_state(), and VRBRAINUtil().

◆ _shell_stream

VRBRAIN::NSHShellStream VRBRAIN::VRBRAINUtil::_shell_stream
private

Definition at line 70 of file Util.h.

◆ count

uint16_t VRBRAIN::VRBRAINUtil::count

Definition at line 75 of file Util.h.

◆ fd

int VRBRAIN::VRBRAINUtil::fd = -1

Definition at line 78 of file Util.h.

Referenced by run_debug_shell().

◆ integrator

float VRBRAIN::VRBRAINUtil::integrator

Definition at line 74 of file Util.h.

◆ last_update_ms

uint32_t VRBRAIN::VRBRAINUtil::last_update_ms

Definition at line 77 of file Util.h.

◆ sum

float VRBRAIN::VRBRAINUtil::sum

Definition at line 76 of file Util.h.

◆ target

int8_t* VRBRAIN::VRBRAINUtil::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: