3#include <QtCore/QElapsedTimer>
4#include <QtCore/QLoggingCategory>
5#include <QtCore/QObject>
6#include <QtCore/QTimer>
7#include <QtQmlIntegration/QtQmlIntegration>
15class VehicleLinkManagerTest;
22 Q_MOC_INCLUDE(
"Vehicle.h")
31#ifdef QGC_UNITTEST_BUILD
32 friend class VehicleLinkManagerTest;
61 void _commLostCheck();
67 void _linkDisconnected();
68 bool _updatePrimaryLink();
74 bool commLost =
false;
75 QElapsedTimer heartbeatElapsedTimer;
79 QTimer *_commLostCheckTimer =
nullptr;
80 QList<LinkInfo_t> _rgLinkInfo;
82 bool _communicationLost =
false;
83 bool _communicationLostEnabled =
true;
84 bool _autoDisconnect =
false;
85 bool _allLinksRemovedSignalledByCloseVehicle =
false;
87 static constexpr int _commLostCheckTimeoutMSecs = 1000;
88 static constexpr int _heartbeatMaxElpasedMSecs = 3500;
Q_DECLARE_LOGGING_CATEGORY(AndroidSerialLog)
std::shared_ptr< LinkInterface > SharedLinkInterfacePtr
std::weak_ptr< LinkInterface > WeakLinkInterfacePtr
struct __mavlink_message mavlink_message_t
The link interface defines the interface for all links used to communicate with the ground station ap...
void communicationLostEnabledChanged(bool communicationLostEnabled)
void primaryLinkChanged()
QStringList linkNames() const
void autoDisconnectChanged(bool autoDisconnect)
WeakLinkInterfacePtr primaryLink() const
void allLinksRemoved(Vehicle *vehicle)
QStringList linkStatuses() const
void setPrimaryLinkByName(const QString &name)
void mavlinkMessageReceived(LinkInterface *link, const mavlink_message_t &message)
static constexpr int kTestCommLostDetectionTimeoutMs
void setCommunicationLostEnabled(bool communicationLostEnabled)
bool containsLink(LinkInterface *link)
void communicationLostChanged(bool communicationLost)
static constexpr int kTestHeartbeatTimeoutMs
Heartbeat timeout used in unit tests (much shorter for faster tests)
void linkStatusesChanged()
bool communicationLostEnabled() const
bool communicationLost() const
QString primaryLinkName() const