#include <mavContainer.h>
Public Member Functions | |
| void | deliverHelper () |
| A message recv helper for the thread. | |
| bool | deliverMsg (uint16_t moduleIdx, const mavlink_message_t &msg) |
| Deliver received message to specific module. | |
| bool | deliverMsg (std::string moduleName, const mavlink_message_t &msg) |
| Deliver received message to specific module. | |
| bool | deliverMsgToAll (const mavlink_message_t &msg) |
| Deliver received message to all modules. | |
| int | fetchMsgFromAll (mavlink_message_t *recvMsgList, mavlink_status_t *recvStatusList, uint16_t listSize) |
| Fetch messages from Handler. | |
| int | fetchMsgFromMng (uint16_t mngIdx, mavlink_message_t *recvMsgList, mavlink_status_t *recvStatusList, uint16_t listSize) |
| Fetch messages from Handler specific Manager. | |
| int | getModuleIdx (std::string moduleName) |
| Get the index of module by its name. | |
| bool | hasMOI (uint16_t moduleIdx, uint8_t msgid) |
| Judge whether a msgid is in the MOI list of module. | |
| bool | hasMOI (std::string moduleName, uint8_t msgid) |
| Judge whether a msgid is in the MOI list of module. | |
| MavContainer (MavHandler &handler, uint16_t maxModuleNum=8) | |
| Constructor for the MavContainer. | |
| bool | registerModule (MavModule &module, uint16_t size,...) |
| Inject the module object and set its msgid of interest. | |
| bool | run () |
| Run threads for delivering messages and modules. | |
| ~MavContainer () | |
Static Public Member Functions | |
| static void * | thread_call (void *param) |
| A thread calling function for delivering received msg. | |
Private Attributes | |
| uint16_t | m_currListSize |
| MavHandler * | m_hdlr |
| uint16_t | m_maxListSize |
| MavModule ** | m_moduleList |
| uint8_t ** | m_moduleMOI |
| pthread_t | m_tid |
Definition at line 29 of file mavContainer.h.
| dji2mav::MavContainer::MavContainer | ( | MavHandler & | handler, |
| uint16_t | maxModuleNum = 8 |
||
| ) | [inline] |
Constructor for the MavContainer.
| handler | : The reference of MavHandler |
| maxModuleNum | : The max number of modules |
Definition at line 36 of file mavContainer.h.
| dji2mav::MavContainer::~MavContainer | ( | ) | [inline] |
Definition at line 59 of file mavContainer.h.
| void dji2mav::MavContainer::deliverHelper | ( | ) | [inline] |
A message recv helper for the thread.
Definition at line 318 of file mavContainer.h.
| bool dji2mav::MavContainer::deliverMsg | ( | uint16_t | moduleIdx, |
| const mavlink_message_t & | msg | ||
| ) | [inline] |
Deliver received message to specific module.
| moduleIdx | : The index of the module |
| msg | : The const pointer to msg |
Definition at line 248 of file mavContainer.h.
| bool dji2mav::MavContainer::deliverMsg | ( | std::string | moduleName, |
| const mavlink_message_t & | msg | ||
| ) | [inline] |
Deliver received message to specific module.
| moduleName | : The name of the module |
| msg | : The const pointer to msg |
Definition at line 268 of file mavContainer.h.
| bool dji2mav::MavContainer::deliverMsgToAll | ( | const mavlink_message_t & | msg | ) | [inline] |
Deliver received message to all modules.
| msg | : The const pointer to msg that is to be delivered |
Definition at line 291 of file mavContainer.h.
| int dji2mav::MavContainer::fetchMsgFromAll | ( | mavlink_message_t * | recvMsgList, |
| mavlink_status_t * | recvStatusList, | ||
| uint16_t | listSize | ||
| ) | [inline] |
Fetch messages from Handler.
| recvMsgList | : The pointer of a recv msg list |
| recvStatusList | : The pointer of a recv status list |
| listSize | : The size of the list |
Definition at line 233 of file mavContainer.h.
| int dji2mav::MavContainer::fetchMsgFromMng | ( | uint16_t | mngIdx, |
| mavlink_message_t * | recvMsgList, | ||
| mavlink_status_t * | recvStatusList, | ||
| uint16_t | listSize | ||
| ) | [inline] |
Fetch messages from Handler specific Manager.
| mngIdx | : The index of specific Manager |
| recvMsgList | : The pointer of a recv msg list |
| recvStatusList | : The pointer of a recv status list |
| listSize | : The size of the list |
Definition at line 216 of file mavContainer.h.
| int dji2mav::MavContainer::getModuleIdx | ( | std::string | moduleName | ) | [inline] |
Get the index of module by its name.
| moduleName | : The string name of module |
Definition at line 145 of file mavContainer.h.
| bool dji2mav::MavContainer::hasMOI | ( | uint16_t | moduleIdx, |
| uint8_t | msgid | ||
| ) | [inline] |
Judge whether a msgid is in the MOI list of module.
| moduleIdx | : The index of module |
| msgid | : The msgid that is to be checked |
Definition at line 162 of file mavContainer.h.
| bool dji2mav::MavContainer::hasMOI | ( | std::string | moduleName, |
| uint8_t | msgid | ||
| ) | [inline] |
Judge whether a msgid is in the MOI list of module.
| moduleName | : The name of the module |
| msgid | : The msgid that is to be checked |
Definition at line 196 of file mavContainer.h.
| bool dji2mav::MavContainer::registerModule | ( | MavModule & | module, |
| uint16_t | size, | ||
| ... | |||
| ) | [inline] |
Inject the module object and set its msgid of interest.
| module | : The reference of module object |
| size | : The size of interested msgid list |
| ... | : The msgid list of interest, should be uint8_t |
Definition at line 92 of file mavContainer.h.
| bool dji2mav::MavContainer::run | ( | ) | [inline] |
Run threads for delivering messages and modules.
Definition at line 339 of file mavContainer.h.
| static void* dji2mav::MavContainer::thread_call | ( | void * | param | ) | [inline, static] |
A thread calling function for delivering received msg.
| param | : The pointer to the Container object |
Definition at line 310 of file mavContainer.h.
uint16_t dji2mav::MavContainer::m_currListSize [private] |
Definition at line 361 of file mavContainer.h.
MavHandler* dji2mav::MavContainer::m_hdlr [private] |
Definition at line 356 of file mavContainer.h.
uint16_t dji2mav::MavContainer::m_maxListSize [private] |
Definition at line 360 of file mavContainer.h.
MavModule** dji2mav::MavContainer::m_moduleList [private] |
Definition at line 358 of file mavContainer.h.
uint8_t** dji2mav::MavContainer::m_moduleMOI [private] |
Definition at line 359 of file mavContainer.h.
pthread_t dji2mav::MavContainer::m_tid [private] |
Definition at line 363 of file mavContainer.h.