APM:Libraries
Util.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <AP_HAL/AP_HAL.h>
5 #include "Semaphores.h"
6 
7 class HALSITL::Util : public AP_HAL::Util {
8 public:
9  Util(SITL_State *_sitlState) :
10  sitlState(_sitlState) {}
11 
13  return false;
14  }
15 
19  uint32_t available_memory(void) override {
20  // SITL is assumed to always have plenty of memory. Return 128k for now
21  return 0x20000;
22  }
23 
24  // create a new semaphore
25  AP_HAL::Semaphore *new_semaphore(void) override { return new HALSITL::Semaphore; }
26 
27  // get path to custom defaults file for AP_Param
28  const char* get_custom_defaults_file() const override {
29  return sitlState->defaults_path;
30  }
31 private:
33 };
const char * get_custom_defaults_file() const override
Definition: Util.h:28
bool run_debug_shell(AP_HAL::BetterStream *stream)
Definition: Util.h:12
SITL_State * sitlState
Definition: Util.h:32
Util(SITL_State *_sitlState)
Definition: Util.h:9
AP_HAL::Semaphore * new_semaphore(void) override
Definition: Util.h:25
uint32_t available_memory(void) override
Definition: Util.h:19
const char * defaults_path
Definition: SITL_State.h:226