DJI Onboard SDK  4.0
dji_hard_driver.hpp
Go to the documentation of this file.
1 
31 #ifndef DJI_HARDDRIVER_H
32 #define DJI_HARDDRIVER_H
33 
34 #include "dji_log.hpp"
35 #include "dji_memory.hpp"
36 #include "dji_type.hpp"
37 #include <cstdint>
38 #include <ctime>
39 namespace DJI
40 {
41 namespace OSDK
42 {
43 class HardDriver
44 {
45 public:
46  HardDriver();
47  virtual ~HardDriver();
94 public:
95  virtual void init() = 0;
96  virtual time_ms getTimeStamp() = 0;
97  virtual size_t send(const uint8_t* buf, size_t len) = 0;
98  virtual size_t readall(uint8_t* buf, size_t maxlen) = 0;
99  virtual bool getDeviceStatus()
100  {
101  return true;
102  }
103 
104 public:
106  virtual void displayLog(const char* buf = 0);
107 
108 public:
109  static const int bufsize = 1024;
110 
111 public:
112  MMU* getMmu()
113  {
114  return &mmu;
115  }
116 
117 private:
118  MMU mmu;
119 };
120 } // namespace OSDK
121 } // namespace DJI
122 
123 #endif // DJI_HARDDRIVER_H
Implement memory management for DJI OSDK .
Data type and Data Structure definitions for use throughout DJI OSDK.
Logging mechanism for printing status and error messages to the screen.
handle array of characters
Definition: commondatarangehandler.h:14