|
QGroundControl
Ground Control Station for MAVLink Drones
|
The link interface defines the interface for all links used to communicate with the ground station application. More...
#include <LinkInterface.h>
Inheritance diagram for LinkInterface:
Collaboration diagram for LinkInterface:Signals | |
| void | bytesReceived (LinkInterface *link, const QByteArray &data) |
| void | bytesSent (LinkInterface *link, const QByteArray &data) |
| void | connected () |
| void | disconnected () |
| void | communicationError (const QString &title, const QString &error) |
Public Member Functions | |
| virtual | ~LinkInterface () |
| virtual void | disconnect ()=0 |
| virtual bool | isConnected () const =0 |
| virtual bool | isLogReplay () const |
| virtual bool | isSecureConnection () const |
| Returns true if the connection is secure (e.g. USB, wired ethernet) | |
| SharedLinkConfigurationPtr | linkConfiguration () |
| const SharedLinkConfigurationPtr | linkConfiguration () const |
| uint8_t | mavlinkChannel () const |
| bool | mavlinkChannelIsSet () const |
| bool | decodedFirstMavlinkPacket () const |
| void | setDecodedFirstMavlinkPacket (bool decodedFirstMavlinkPacket) |
| void | writeBytesThreadSafe (const char *bytes, int length) |
| void | addVehicleReference () |
| void | removeVehicleReference () |
| bool | initMavlinkSigning () |
| void | setSigningSignatureFailure (bool failure) |
| void | reportMavlinkV1Traffic () |
Protected Member Functions | |
| LinkInterface (SharedLinkConfigurationPtr &config, QObject *parent=nullptr) | |
| Links are only created by LinkManager so constructor is not public. | |
| virtual bool | _allocateMavlinkChannel () |
| virtual void | _freeMavlinkChannel () |
| void | _connectionRemoved () |
Protected Attributes | |
| SharedLinkConfigurationPtr | _config |
Friends | |
| class | LinkManager |
The link interface defines the interface for all links used to communicate with the ground station application.
Definition at line 13 of file LinkInterface.h.
|
virtual |
Definition at line 20 of file LinkInterface.cc.
References _config.
|
explicitprotected |
Links are only created by LinkManager so constructor is not public.
Definition at line 13 of file LinkInterface.cc.
|
protectedvirtual |
Called by the LinkManager during LinkInterface construction instructing the link to setup channels. Default implementation allocates a single channel. But some link types (such as MockLink) need more than one.
Definition at line 64 of file LinkInterface.cc.
References initMavlinkSigning(), and mavlinkChannelIsSet().
|
protected |
Definition at line 116 of file LinkInterface.cc.
References disconnect().
Referenced by removeVehicleReference(), and MockLink::simulateConnectionRemoved().
|
protectedvirtual |
Definition at line 88 of file LinkInterface.cc.
References mavlinkChannelIsSet().
|
inline |
Definition at line 36 of file LinkInterface.h.
|
signal |
Referenced by MockLink::respondWithMavlinkMessage().
|
signal |
|
signal |
Referenced by setSigningSignatureFailure().
|
signal |
|
inline |
Definition at line 33 of file LinkInterface.h.
|
pure virtual |
Implemented in MockLink, BluetoothLink, LogReplayLink, TCPLink, and UDPLink.
Referenced by _connectionRemoved().
|
signal |
Referenced by MockLink::disconnect(), and LogReplayLink::LogReplayLink().
| bool LinkInterface::initMavlinkSigning | ( | ) |
Definition at line 43 of file LinkInterface.cc.
References MAVLinkSigning::initSigning(), MAVLinkSigning::insecureConnectionAccceptUnsignedCallback(), isSecureConnection(), and MavlinkSettings::mavlink2SigningKey().
Referenced by _allocateMavlinkChannel().
|
pure virtual |
Implemented in MockLink, BluetoothLink, LogReplayLink, SerialLink, TCPLink, and UDPLink.
Referenced by Vehicle::sendMessageOnLinkThreadSafe().
|
inlinevirtual |
Reimplemented in LogReplayLink.
Definition at line 26 of file LinkInterface.h.
|
inlinevirtual |
Returns true if the connection is secure (e.g. USB, wired ethernet)
Reimplemented in SerialLink, TCPLink, and UDPLink.
Definition at line 27 of file LinkInterface.h.
Referenced by initMavlinkSigning().
|
inline |
Definition at line 29 of file LinkInterface.h.
Referenced by reportMavlinkV1Traffic(), MockLink::run10HzTasks(), MockLink::run1HzTasks(), and MockLink::run500HzTasks().
|
inline |
Definition at line 30 of file LinkInterface.h.
| uint8_t LinkInterface::mavlinkChannel | ( | ) | const |
Definition at line 29 of file LinkInterface.cc.
References mavlinkChannelIsSet().
Referenced by MAVLinkProtocol::receiveBytes(), MAVLinkProtocol::resetMetadataForLink(), MockLinkCamera::sendCameraHeartbeats(), and MockLink::sendUnexpectedCommandAck().
| bool LinkInterface::mavlinkChannelIsSet | ( | ) | const |
Definition at line 38 of file LinkInterface.cc.
Referenced by _allocateMavlinkChannel(), _freeMavlinkChannel(), mavlinkChannel(), MockLink::run10HzTasks(), MockLink::run1HzTasks(), and MockLink::run500HzTasks().
| void LinkInterface::removeVehicleReference | ( | ) |
Definition at line 106 of file LinkInterface.cc.
References _connectionRemoved().
| void LinkInterface::reportMavlinkV1Traffic | ( | ) |
Definition at line 136 of file LinkInterface.cc.
References linkConfiguration(), and qgcApp.
Referenced by MAVLinkProtocol::receiveBytes().
|
inline |
Definition at line 34 of file LinkInterface.h.
Referenced by MAVLinkProtocol::resetMetadataForLink().
| void LinkInterface::setSigningSignatureFailure | ( | bool | failure | ) |
Definition at line 126 of file LinkInterface.cc.
References communicationError().
| void LinkInterface::writeBytesThreadSafe | ( | const char * | bytes, |
| int | length | ||
| ) |
Definition at line 100 of file LinkInterface.cc.
Referenced by Vehicle::sendMessageOnLinkThreadSafe().
|
friend |
Definition at line 18 of file LinkInterface.h.
|
protected |
Definition at line 61 of file LinkInterface.h.
Referenced by ~LinkInterface().