|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <MAVLinkProtocol.h>
Inheritance diagram for MAVLinkProtocol:
Collaboration diagram for MAVLinkProtocol:Public Slots | |
| void | receiveBytes (LinkInterface *link, const QByteArray &data) |
| void | logSentBytes (const LinkInterface *link, const QByteArray &data) |
| static void | deleteTempLogFiles () |
| Deletes any log files which are in the temp directory. | |
Signals | |
| void | vehicleHeartbeatInfo (LinkInterface *link, int vehicleId, int componentId, int vehicleFirmwareType, int vehicleType) |
| Heartbeat received on link. | |
| void | messageReceived (LinkInterface *link, const mavlink_message_t &message) |
| Message received and directly copied via signal. | |
| void | mavlinkMessageStatus (int sysid, uint64_t totalSent, uint64_t totalReceived, uint64_t totalLoss, float lossPercent) |
Public Member Functions | |
| MAVLinkProtocol (QObject *parent=nullptr) | |
| ~MAVLinkProtocol () | |
| Destructor for the MAVLinkProtocol class. | |
| void | init () |
| int | getSystemId () const |
| Get the system id of this application. | |
| void | resetMetadataForLink (LinkInterface *link) |
| Reset the counters for all metadata for this link. | |
| void | suspendLogForReplay (bool suspend) |
| Suspend/Restart logging during replay. | |
| void | checkForLostLogFiles () |
Static Public Member Functions | |
| static MAVLinkProtocol * | instance () |
| static QString | getName () |
| Get the human-friendly name of this protocol. | |
| static int | getComponentId () |
| Get the component id of this application. | |
MAVLink micro air vehicle protocol reference implementation. MAVLink is a generic communication protocol for micro air vehicles. for more information, please see the official website: https://mavlink.io
Definition at line 18 of file MAVLinkProtocol.h.
|
explicit |
Constructs an MAVLinkProtocol object.
| parent | The parent QObject. |
Definition at line 25 of file MAVLinkProtocol.cc.
| MAVLinkProtocol::~MAVLinkProtocol | ( | ) |
Destructor for the MAVLinkProtocol class.
Definition at line 32 of file MAVLinkProtocol.cc.
| void MAVLinkProtocol::checkForLostLogFiles | ( | ) |
Checks the temp directory for log files which may have been left there. This could happen if QGC crashes without the temp log file being saved. Give the user an option to save these orphaned files.
Definition at line 347 of file MAVLinkProtocol.cc.
|
staticslot |
Deletes any log files which are in the temp directory.
Definition at line 366 of file MAVLinkProtocol.cc.
|
inlinestatic |
Get the component id of this application.
Definition at line 43 of file MAVLinkProtocol.h.
Referenced by PlanManager::_handleMissionRequest(), PlanManager::_readTransactionComplete(), PlanManager::_removeAllWorker(), VehicleCameraControl::_requestAllParameters(), PlanManager::_requestList(), PlanManager::_requestNextMissionItem(), Vehicle::_sendMavCommandFromList(), PlanManager::_writeMissionCount(), Vehicle::clearAllParamMapRC(), LogDownloadController::eraseAll(), APMFirmwarePlugin::guidedModeChangeAltitude(), QGCCameraParamIO::paramRequest(), ParameterManager::refreshAllParameters(), Vehicle::requestDataStream(), APMFirmwarePlugin::sendGCSMotionReport(), FirmwarePlugin::sendGCSMotionReport(), Vehicle::sendJoystickDataThreadSafe(), Vehicle::sendParamMapRC(), Vehicle::sendSetupSigning(), Vehicle::setCurrentMissionSequence(), Vehicle::setEstimatorOrigin(), Vehicle::setFlightMode(), Vehicle::startCalibration(), and MissionManager::writeArduPilotGuidedMissionItem().
|
inlinestatic |
Get the human-friendly name of this protocol.
Definition at line 37 of file MAVLinkProtocol.h.
Referenced by logSentBytes().
| int MAVLinkProtocol::getSystemId | ( | ) | const |
Get the system id of this application.
Definition at line 483 of file MAVLinkProtocol.cc.
References MavlinkSettings::gcsMavlinkSystemID().
Referenced by LogDownloadController::eraseAll(), QGCCameraParamIO::paramRequest(), APMFirmwarePlugin::sendGCSMotionReport(), and Vehicle::sendSetupSigning().
| void MAVLinkProtocol::init | ( | ) |
Definition at line 44 of file MAVLinkProtocol.cc.
References MultiVehicleManager::vehicleRemoved().
|
static |
Gets the singleton instance of MAVLinkProtocol.
Definition at line 39 of file MAVLinkProtocol.cc.
Referenced by PlanManager::_handleMissionRequest(), PlanManager::_readTransactionComplete(), PlanManager::_removeAllWorker(), VehicleCameraControl::_requestAllParameters(), PlanManager::_requestList(), PlanManager::_requestNextMissionItem(), Vehicle::_sendMavCommandFromList(), PlanManager::_writeMissionCount(), Vehicle::clearAllParamMapRC(), LogDownloadController::eraseAll(), APMFirmwarePlugin::guidedModeChangeAltitude(), MAVLinkInspectorController::MAVLinkInspectorController(), QGCCameraParamIO::paramRequest(), LogReplayWorker::pause(), LogReplayWorker::play(), ParameterManager::refreshAllParameters(), Vehicle::requestDataStream(), APMFirmwarePlugin::sendGCSMotionReport(), FirmwarePlugin::sendGCSMotionReport(), Vehicle::sendJoystickDataThreadSafe(), Vehicle::sendParamMapRC(), Vehicle::sendSetupSigning(), Vehicle::setCurrentMissionSequence(), Vehicle::setEstimatorOrigin(), Vehicle::setFlightMode(), Vehicle::startCalibration(), Vehicle::startTimerRevertAllowTakeover(), Vehicle::Vehicle(), and MissionManager::writeArduPilotGuidedMissionItem().
|
slot |
Log bytes sent from a communication interface and logs a MAVLink packet. It can handle multiple links in parallel, as each link has it's own buffer/parsing state machine.
| link | The interface to read from |
Definition at line 65 of file MAVLinkProtocol.cc.
|
signal |
Referenced by Vehicle::Vehicle().
|
signal |
Message received and directly copied via signal.
Referenced by MAVLinkInspectorController::MAVLinkInspectorController(), and Vehicle::Vehicle().
|
slot |
Receive bytes from a communication interface and constructs a MAVLink packet
| link | The interface to read from |
Definition at line 88 of file MAVLinkProtocol.cc.
References LinkInterface::mavlinkChannel(), and LinkInterface::reportMavlinkV1Traffic().
| void MAVLinkProtocol::resetMetadataForLink | ( | LinkInterface * | link | ) |
Reset the counters for all metadata for this link.
Definition at line 55 of file MAVLinkProtocol.cc.
References LinkInterface::mavlinkChannel(), and LinkInterface::setDecodedFirstMavlinkPacket().
|
inline |
Suspend/Restart logging during replay.
Definition at line 49 of file MAVLinkProtocol.h.
Referenced by LogReplayWorker::pause(), and LogReplayWorker::play().
|
signal |
Heartbeat received on link.