#include <mavModule.h>

Public Member Functions | |
| bool | activateSender (uint16_t gcsIdx) |
| Activate sender of the specific GCS. | |
| virtual void | activelySend ()=0 |
| Handle the messages sending process for the module. | |
| void | clearBuf () |
| Clear buffer content. | |
| bool | employGcsSender (uint16_t gcsIdx) |
| Employ a sender for the specific GCS. | |
| int | getGcsSenderIdx (uint16_t gcsIdx) |
| Get sender index for specific GCS. | |
| int | getMasterGcsIdx () |
| Get the index of master GCS. | |
| int | getMasterGcsSenderIdx () |
| Get the sender index of master GCS. | |
| uint8_t | getMySysid () |
| Get the sysid of this device. | |
| std::string | getName () |
| Get the name of module. | |
| const int * | getSenderRecord () |
| Get the senderRecord array address. | |
| MavModule (MavHandler &handler, std::string name, uint16_t bufSize) | |
| Constructor for base MavModule class. | |
| virtual void | passivelyReceive (mavlink_message_t &msg)=0 |
| Handle the received messages process for the module. | |
| bool | pullMsg (mavlink_message_t &destMsg) |
| Pull mavlink message from the buffer. | |
| bool | pushMsg (uint16_t gcsIdx, const mavlink_message_t &srcMsg) |
| Push mavlink message to the buffer. | |
| void | receiveHelper (mavlink_message_t &msg) |
| The helper of thread passively reveive. | |
| bool | run () |
| Run a thread for the module. | |
| bool | sendMsgToAll (mavlink_message_t &msg) |
| Send message to all activated GCS. | |
| bool | sendMsgToGcs (uint16_t gcsIdx, mavlink_message_t &msg) |
| Send message to specific GCS. | |
| bool | sendMsgToMaster (mavlink_message_t &msg) |
| Send message to master GCS. | |
| bool | sendMsgToSys (uint8_t sysid, mavlink_message_t &msg) |
| Send message to corresponding GCS with sysid. | |
| bool | setMasterGcsIdx (uint16_t gcsIdx) |
| Set the master GCS with its index. | |
| virtual | ~MavModule () |
Static Public Member Functions | |
| static void * | thread_call (void *param) |
| A thread calling function for the module. | |
Private Attributes | |
| MavHandler * | m_hdlr |
| int | m_masterGcsIdx |
| uint8_t | m_masterSysid |
| ModuleBuf * | m_moduleBuf |
| std::string | m_name |
| int * | m_senderRecord |
| pthread_t | m_tid |
Definition at line 24 of file mavModule.h.
| dji2mav::MavModule::MavModule | ( | MavHandler & | handler, |
| std::string | name, | ||
| uint16_t | bufSize | ||
| ) | [inline] |
Constructor for base MavModule class.
| handler | : The reference of MavHandler Object |
| name | : The string name of this module |
| buf | : The buffer size of received message |
Definition at line 33 of file mavModule.h.
| virtual dji2mav::MavModule::~MavModule | ( | ) | [inline, virtual] |
Definition at line 54 of file mavModule.h.
| bool dji2mav::MavModule::activateSender | ( | uint16_t | gcsIdx | ) | [inline] |
Activate sender of the specific GCS.
| gcsIdx | : The index of GCS |
Definition at line 170 of file mavModule.h.
| virtual void dji2mav::MavModule::activelySend | ( | ) | [pure virtual] |
Handle the messages sending process for the module.
Implemented in dji2mav::MavSensors, dji2mav::MavHeartbeat, dji2mav::MavHotpoint, and dji2mav::MavWaypoint.
| void dji2mav::MavModule::clearBuf | ( | ) | [inline] |
Clear buffer content.
Definition at line 300 of file mavModule.h.
| bool dji2mav::MavModule::employGcsSender | ( | uint16_t | gcsIdx | ) | [inline] |
Employ a sender for the specific GCS.
| gcsIdx | : The index of GCS |
Definition at line 153 of file mavModule.h.
| int dji2mav::MavModule::getGcsSenderIdx | ( | uint16_t | gcsIdx | ) | [inline] |
Get sender index for specific GCS.
| gcsIdx | : The index of GCS |
Definition at line 141 of file mavModule.h.
| int dji2mav::MavModule::getMasterGcsIdx | ( | ) | [inline] |
Get the index of master GCS.
Definition at line 89 of file mavModule.h.
| int dji2mav::MavModule::getMasterGcsSenderIdx | ( | ) | [inline] |
Get the sender index of master GCS.
Definition at line 98 of file mavModule.h.
| uint8_t dji2mav::MavModule::getMySysid | ( | ) | [inline] |
Get the sysid of this device.
Definition at line 80 of file mavModule.h.
| std::string dji2mav::MavModule::getName | ( | ) | [inline] |
| const int* dji2mav::MavModule::getSenderRecord | ( | ) | [inline] |
Get the senderRecord array address.
Definition at line 131 of file mavModule.h.
| virtual void dji2mav::MavModule::passivelyReceive | ( | mavlink_message_t & | msg | ) | [pure virtual] |
Handle the received messages process for the module.
| msg | : The reference of received message |
Implemented in dji2mav::MavSensors, dji2mav::MavHeartbeat, dji2mav::MavHotpoint, and dji2mav::MavWaypoint.
| bool dji2mav::MavModule::pullMsg | ( | mavlink_message_t & | destMsg | ) | [inline] |
Pull mavlink message from the buffer.
| destMsg | : The destination of message |
Definition at line 289 of file mavModule.h.
| bool dji2mav::MavModule::pushMsg | ( | uint16_t | gcsIdx, |
| const mavlink_message_t & | srcMsg | ||
| ) | [inline] |
Push mavlink message to the buffer.
| srcMsg | : The source of message |
Definition at line 275 of file mavModule.h.
| void dji2mav::MavModule::receiveHelper | ( | mavlink_message_t & | msg | ) | [inline] |
The helper of thread passively reveive.
| msg | : A reference of message type that is used to recv |
Definition at line 339 of file mavModule.h.
| bool dji2mav::MavModule::run | ( | ) | [inline] |
Run a thread for the module.
Definition at line 309 of file mavModule.h.
| bool dji2mav::MavModule::sendMsgToAll | ( | mavlink_message_t & | msg | ) | [inline] |
Send message to all activated GCS.
| msg | : The reference of encoded mavlink message |
Definition at line 251 of file mavModule.h.
| bool dji2mav::MavModule::sendMsgToGcs | ( | uint16_t | gcsIdx, |
| mavlink_message_t & | msg | ||
| ) | [inline] |
Send message to specific GCS.
| gcsIdx | : The index of specific GCS |
| msg | : The reference of encoded mavlink message |
Definition at line 198 of file mavModule.h.
| bool dji2mav::MavModule::sendMsgToMaster | ( | mavlink_message_t & | msg | ) | [inline] |
Send message to master GCS.
| msg | : The reference of encoded mavlink message |
Definition at line 241 of file mavModule.h.
| bool dji2mav::MavModule::sendMsgToSys | ( | uint8_t | sysid, |
| mavlink_message_t & | msg | ||
| ) | [inline] |
Send message to corresponding GCS with sysid.
| sysid | : The sysid of target device |
| msg | : The reference of encoded mavlink message |
Definition at line 223 of file mavModule.h.
| bool dji2mav::MavModule::setMasterGcsIdx | ( | uint16_t | gcsIdx | ) | [inline] |
Set the master GCS with its index.
| gcsIdx | : The index of GCS that is to be set |
Definition at line 111 of file mavModule.h.
| static void* dji2mav::MavModule::thread_call | ( | void * | param | ) | [inline, static] |
A thread calling function for the module.
| param | : The pointer to the module object |
Definition at line 324 of file mavModule.h.
MavHandler* dji2mav::MavModule::m_hdlr [private] |
Definition at line 369 of file mavModule.h.
int dji2mav::MavModule::m_masterGcsIdx [private] |
Definition at line 366 of file mavModule.h.
uint8_t dji2mav::MavModule::m_masterSysid [private] |
Definition at line 367 of file mavModule.h.
ModuleBuf* dji2mav::MavModule::m_moduleBuf [private] |
Definition at line 365 of file mavModule.h.
std::string dji2mav::MavModule::m_name [private] |
Definition at line 372 of file mavModule.h.
int* dji2mav::MavModule::m_senderRecord [private] |
Definition at line 364 of file mavModule.h.
pthread_t dji2mav::MavModule::m_tid [private] |
Definition at line 371 of file mavModule.h.