#include <DJI_HardDriver_Manifold.h>
Public Member Functions | |
void | freeACK () |
void | freeMemory () |
void | freeMSG () |
bool | getDevieStatus () |
time_ms | getTimeStamp () |
HardDriver_Manifold (std::string device, unsigned int baudrate) | |
void | init () |
void | lockACK () |
void | lockMemory () |
void | lockMSG () |
void | notify () |
size_t | readall (uint8_t *buf, size_t maxlen) |
size_t | send (const uint8_t *buf, size_t len) |
void | setBaudrate (unsigned int baudrate) |
void | setDevice (std::string device) |
void | usbHandshake (std::string device) |
Implement a USB hand-shaking protocol for SDK. | |
void | wait (int timeoutInSeconds) |
~HardDriver_Manifold () | |
Private Member Functions | |
bool | _serialClose () |
bool | _serialConfig (int baudrate, char data_bits, char parity_bits, char stop_bits) |
bool | _serialFlush () |
bool | _serialOpen (const char *dev) |
int | _serialRead (unsigned char *buf, int len) |
int | _serialStart (const char *dev_name, int baud_rate) |
int | _serialWrite (const unsigned char *buf, int len) |
Private Attributes | |
pthread_cond_t | ack_recv_cv |
bool | deviceStatus |
pthread_mutex_t | m_ackLock |
unsigned int | m_baudrate |
std::string | m_device |
pthread_mutex_t | m_memLock |
pthread_mutex_t | m_msgLock |
int | m_serial_fd |
fd_set | m_serial_fd_set |
Definition at line 37 of file DJI_HardDriver_Manifold.h.
DJI::onboardSDK::HardDriver_Manifold::HardDriver_Manifold | ( | std::string | device, |
unsigned int | baudrate | ||
) | [inline] |
Definition at line 40 of file DJI_HardDriver_Manifold.h.
Definition at line 50 of file DJI_HardDriver_Manifold.h.
bool DJI::onboardSDK::HardDriver_Manifold::_serialClose | ( | ) | [inline, private] |
Definition at line 205 of file DJI_HardDriver_Manifold.h.
bool DJI::onboardSDK::HardDriver_Manifold::_serialConfig | ( | int | baudrate, |
char | data_bits, | ||
char | parity_bits, | ||
char | stop_bits | ||
) | [inline, private] |
Definition at line 223 of file DJI_HardDriver_Manifold.h.
bool DJI::onboardSDK::HardDriver_Manifold::_serialFlush | ( | ) | [inline, private] |
Definition at line 212 of file DJI_HardDriver_Manifold.h.
bool DJI::onboardSDK::HardDriver_Manifold::_serialOpen | ( | const char * | dev | ) | [inline, private] |
Definition at line 194 of file DJI_HardDriver_Manifold.h.
int DJI::onboardSDK::HardDriver_Manifold::_serialRead | ( | unsigned char * | buf, |
int | len | ||
) | [inline, private] |
Definition at line 350 of file DJI_HardDriver_Manifold.h.
int DJI::onboardSDK::HardDriver_Manifold::_serialStart | ( | const char * | dev_name, |
int | baud_rate | ||
) | [inline, private] |
Definition at line 326 of file DJI_HardDriver_Manifold.h.
int DJI::onboardSDK::HardDriver_Manifold::_serialWrite | ( | const unsigned char * | buf, |
int | len | ||
) | [inline, private] |
Definition at line 345 of file DJI_HardDriver_Manifold.h.
void DJI::onboardSDK::HardDriver_Manifold::freeACK | ( | ) | [inline, virtual] |
Implements DJI::onboardSDK::HardDriver.
Definition at line 160 of file DJI_HardDriver_Manifold.h.
void DJI::onboardSDK::HardDriver_Manifold::freeMemory | ( | ) | [inline, virtual] |
Implements DJI::onboardSDK::HardDriver.
Definition at line 141 of file DJI_HardDriver_Manifold.h.
void DJI::onboardSDK::HardDriver_Manifold::freeMSG | ( | ) | [inline, virtual] |
Implements DJI::onboardSDK::HardDriver.
Definition at line 151 of file DJI_HardDriver_Manifold.h.
bool DJI::onboardSDK::HardDriver_Manifold::getDevieStatus | ( | ) | [inline] |
Definition at line 108 of file DJI_HardDriver_Manifold.h.
time_ms DJI::onboardSDK::HardDriver_Manifold::getTimeStamp | ( | ) | [inline, virtual] |
Implements DJI::onboardSDK::HardDriver.
Definition at line 113 of file DJI_HardDriver_Manifold.h.
void DJI::onboardSDK::HardDriver_Manifold::init | ( | ) | [inline, virtual] |
Implements DJI::onboardSDK::HardDriver.
Definition at line 59 of file DJI_HardDriver_Manifold.h.
void DJI::onboardSDK::HardDriver_Manifold::lockACK | ( | ) | [inline, virtual] |
Implements DJI::onboardSDK::HardDriver.
Definition at line 155 of file DJI_HardDriver_Manifold.h.
void DJI::onboardSDK::HardDriver_Manifold::lockMemory | ( | ) | [inline, virtual] |
Implements DJI::onboardSDK::HardDriver.
Definition at line 136 of file DJI_HardDriver_Manifold.h.
void DJI::onboardSDK::HardDriver_Manifold::lockMSG | ( | ) | [inline, virtual] |
Implements DJI::onboardSDK::HardDriver.
Definition at line 146 of file DJI_HardDriver_Manifold.h.
void DJI::onboardSDK::HardDriver_Manifold::notify | ( | ) | [inline, virtual] |
Implements DJI::onboardSDK::HardDriver.
Definition at line 164 of file DJI_HardDriver_Manifold.h.
size_t DJI::onboardSDK::HardDriver_Manifold::readall | ( | uint8_t * | buf, |
size_t | maxlen | ||
) | [inline, virtual] |
Implements DJI::onboardSDK::HardDriver.
Definition at line 131 of file DJI_HardDriver_Manifold.h.
size_t DJI::onboardSDK::HardDriver_Manifold::send | ( | const uint8_t * | buf, |
size_t | len | ||
) | [inline, virtual] |
Implements DJI::onboardSDK::HardDriver.
Definition at line 126 of file DJI_HardDriver_Manifold.h.
void DJI::onboardSDK::HardDriver_Manifold::setBaudrate | ( | unsigned int | baudrate | ) | [inline] |
Definition at line 98 of file DJI_HardDriver_Manifold.h.
void DJI::onboardSDK::HardDriver_Manifold::setDevice | ( | std::string | device | ) | [inline] |
Definition at line 103 of file DJI_HardDriver_Manifold.h.
void DJI::onboardSDK::HardDriver_Manifold::usbHandshake | ( | std::string | device | ) | [inline] |
Implement a USB hand-shaking protocol for SDK.
Definition at line 90 of file DJI_HardDriver_Manifold.h.
void DJI::onboardSDK::HardDriver_Manifold::wait | ( | int | timeoutInSeconds | ) | [inline, virtual] |
Implements DJI::onboardSDK::HardDriver.
Definition at line 168 of file DJI_HardDriver_Manifold.h.
pthread_cond_t DJI::onboardSDK::HardDriver_Manifold::ack_recv_cv [private] |
Definition at line 186 of file DJI_HardDriver_Manifold.h.
bool DJI::onboardSDK::HardDriver_Manifold::deviceStatus [private] |
Definition at line 191 of file DJI_HardDriver_Manifold.h.
pthread_mutex_t DJI::onboardSDK::HardDriver_Manifold::m_ackLock [private] |
Definition at line 184 of file DJI_HardDriver_Manifold.h.
unsigned int DJI::onboardSDK::HardDriver_Manifold::m_baudrate [private] |
Definition at line 180 of file DJI_HardDriver_Manifold.h.
std::string DJI::onboardSDK::HardDriver_Manifold::m_device [private] |
Definition at line 179 of file DJI_HardDriver_Manifold.h.
pthread_mutex_t DJI::onboardSDK::HardDriver_Manifold::m_memLock [private] |
Definition at line 181 of file DJI_HardDriver_Manifold.h.
pthread_mutex_t DJI::onboardSDK::HardDriver_Manifold::m_msgLock [private] |
Definition at line 185 of file DJI_HardDriver_Manifold.h.
int DJI::onboardSDK::HardDriver_Manifold::m_serial_fd [private] |
Definition at line 188 of file DJI_HardDriver_Manifold.h.
fd_set DJI::onboardSDK::HardDriver_Manifold::m_serial_fd_set [private] |
Definition at line 189 of file DJI_HardDriver_Manifold.h.