#include <DJI_HardDriver.h>
Public Member Functions | |
virtual void | displayLog (const char *buf=0) |
virtual void | freeACK ()=0 |
virtual void | freeMemory ()=0 |
virtual void | freeMSG ()=0 |
virtual void | freeNonBlockCBAck () |
virtual void | freeProtocolHeader () |
virtual bool | getDeviceStatus () |
virtual time_ms | getTimeStamp ()=0 |
HardDriver () | |
virtual void | init ()=0 |
After calling this function, HardDriver should be able to read and send correctly, through a correct UART part. | |
virtual void | lockACK ()=0 |
virtual void | lockMemory ()=0 |
virtual void | lockMSG ()=0 |
virtual void | lockNonBlockCBAck () |
virtual void | lockProtocolHeader () |
virtual void | nonBlockWait () |
virtual void | notify ()=0 |
virtual void | notifyNonBlockCBAckRecv () |
virtual size_t | readall (uint8_t *buf, size_t maxlen)=0 |
virtual size_t | send (const uint8_t *buf, size_t len)=0 |
virtual void | wait (int timeout)=0 |
Definition at line 24 of file DJI_HardDriver.h.
DJI::onboardSDK::HardDriver::HardDriver | ( | ) | [inline] |
Definition at line 27 of file DJI_HardDriver.h.
void HardDriver::displayLog | ( | const char * | buf = 0 | ) | [virtual] |
Definition at line 18 of file DJI_HardDriver.cpp.
virtual void DJI::onboardSDK::HardDriver::freeACK | ( | ) | [pure virtual] |
virtual void DJI::onboardSDK::HardDriver::freeMemory | ( | ) | [pure virtual] |
virtual void DJI::onboardSDK::HardDriver::freeMSG | ( | ) | [pure virtual] |
virtual void DJI::onboardSDK::HardDriver::freeNonBlockCBAck | ( | ) | [inline, virtual] |
Definition at line 104 of file DJI_HardDriver.h.
virtual void DJI::onboardSDK::HardDriver::freeProtocolHeader | ( | ) | [inline, virtual] |
Definition at line 101 of file DJI_HardDriver.h.
virtual bool DJI::onboardSDK::HardDriver::getDeviceStatus | ( | ) | [inline, virtual] |
Definition at line 85 of file DJI_HardDriver.h.
virtual time_ms DJI::onboardSDK::HardDriver::getTimeStamp | ( | ) | [pure virtual] |
virtual void DJI::onboardSDK::HardDriver::init | ( | ) | [pure virtual] |
After calling this function, HardDriver should be able to read and send correctly, through a correct UART part.
void init(); unsigned int getTimeStamp(); returns a TimeStamp data in unit msec. The difference between the return value of the function call two times is the excat time between them in msec.
size_t send(const uint8_t *buf, size_t len); return sent data length.
size_t readall(uint8_t *buf, size_t maxlen) = 0; return read data length.
void lockMemory();/ void freeMemory(); provide a mutex for multi-thread. when operating memory.
void lockMSG();/ void freeMSG(); provide a mutex for multi-thread. when operating messages.
void notify();/ void wait(); use conditional variable to signal controller thread about arrival of ACK frame.
void displayLog(char *buf); Micro "API_LOG" invoked this function, to pass datalog. In order to pass data through different stream or channel. We abstract this virtual function for user. And different from others, this interface is not a pure virtual funcion. The default data-passing channel is stdout (printf). See also "DJI_HardDriver.cpp".
virtual void DJI::onboardSDK::HardDriver::lockACK | ( | ) | [pure virtual] |
virtual void DJI::onboardSDK::HardDriver::lockMemory | ( | ) | [pure virtual] |
virtual void DJI::onboardSDK::HardDriver::lockMSG | ( | ) | [pure virtual] |
virtual void DJI::onboardSDK::HardDriver::lockNonBlockCBAck | ( | ) | [inline, virtual] |
Definition at line 103 of file DJI_HardDriver.h.
virtual void DJI::onboardSDK::HardDriver::lockProtocolHeader | ( | ) | [inline, virtual] |
Definition at line 100 of file DJI_HardDriver.h.
virtual void DJI::onboardSDK::HardDriver::nonBlockWait | ( | ) | [inline, virtual] |
Definition at line 107 of file DJI_HardDriver.h.
virtual void DJI::onboardSDK::HardDriver::notify | ( | ) | [pure virtual] |
virtual void DJI::onboardSDK::HardDriver::notifyNonBlockCBAckRecv | ( | ) | [inline, virtual] |
Definition at line 106 of file DJI_HardDriver.h.
virtual size_t DJI::onboardSDK::HardDriver::readall | ( | uint8_t * | buf, |
size_t | maxlen | ||
) | [pure virtual] |
virtual size_t DJI::onboardSDK::HardDriver::send | ( | const uint8_t * | buf, |
size_t | len | ||
) | [pure virtual] |
virtual void DJI::onboardSDK::HardDriver::wait | ( | int | timeout | ) | [pure virtual] |