QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
VehicleLinkManager Class Reference

#include <VehicleLinkManager.h>

+ Inheritance diagram for VehicleLinkManager:
+ Collaboration diagram for VehicleLinkManager:

Signals

void primaryLinkChanged ()
 
void allLinksRemoved (Vehicle *vehicle)
 
void communicationLostChanged (bool communicationLost)
 
void communicationLostEnabledChanged (bool communicationLostEnabled)
 
void linkNamesChanged ()
 
void linkStatusesChanged ()
 
void autoDisconnectChanged (bool autoDisconnect)
 

Public Member Functions

 VehicleLinkManager (Vehicle *vehicle)
 
 ~VehicleLinkManager ()
 
void mavlinkMessageReceived (LinkInterface *link, const mavlink_message_t &message)
 
bool containsLink (LinkInterface *link)
 
WeakLinkInterfacePtr primaryLink () const
 
QString primaryLinkName () const
 
QStringList linkNames () const
 
QStringList linkStatuses () const
 
bool communicationLost () const
 
bool communicationLostEnabled () const
 
void setPrimaryLinkByName (const QString &name)
 
void setCommunicationLostEnabled (bool communicationLostEnabled)
 
void closeVehicle ()
 

Static Public Attributes

static constexpr int kTestHeartbeatTimeoutMs = 500
 Heartbeat timeout used in unit tests (much shorter for faster tests)
 
static constexpr int kTestCommLostDetectionTimeoutMs = _commLostCheckTimeoutMSecs + kTestHeartbeatTimeoutMs + 500
 

Friends

class Vehicle
 

Detailed Description

Definition at line 14 of file VehicleLinkManager.h.

Constructor & Destructor Documentation

◆ VehicleLinkManager()

VehicleLinkManager::VehicleLinkManager ( Vehicle vehicle)

Definition at line 14 of file VehicleLinkManager.cc.

References linkNamesChanged(), and linkStatusesChanged().

◆ ~VehicleLinkManager()

VehicleLinkManager::~VehicleLinkManager ( )

Definition at line 28 of file VehicleLinkManager.cc.

Member Function Documentation

◆ allLinksRemoved

void VehicleLinkManager::allLinksRemoved ( Vehicle vehicle)
signal

Referenced by closeVehicle().

◆ autoDisconnectChanged

void VehicleLinkManager::autoDisconnectChanged ( bool  autoDisconnect)
signal

◆ closeVehicle()

void VehicleLinkManager::closeVehicle ( )

Definition at line 354 of file VehicleLinkManager.cc.

References allLinksRemoved().

Referenced by Vehicle::closeVehicle().

◆ communicationLost()

bool VehicleLinkManager::communicationLost ( ) const
inline

Definition at line 42 of file VehicleLinkManager.h.

Referenced by VideoManager::setfullScreen().

◆ communicationLostChanged

void VehicleLinkManager::communicationLostChanged ( bool  communicationLost)
signal

◆ communicationLostEnabled()

bool VehicleLinkManager::communicationLostEnabled ( ) const
inline

Definition at line 43 of file VehicleLinkManager.h.

Referenced by setCommunicationLostEnabled().

◆ communicationLostEnabledChanged

void VehicleLinkManager::communicationLostEnabledChanged ( bool  communicationLostEnabled)
signal

◆ containsLink()

bool VehicleLinkManager::containsLink ( LinkInterface link)

Definition at line 380 of file VehicleLinkManager.cc.

◆ linkNames()

QStringList VehicleLinkManager::linkNames ( ) const

Definition at line 404 of file VehicleLinkManager.cc.

◆ linkNamesChanged

void VehicleLinkManager::linkNamesChanged ( )
signal

Referenced by VehicleLinkManager().

◆ linkStatuses()

QStringList VehicleLinkManager::linkStatuses ( ) const

Definition at line 415 of file VehicleLinkManager.cc.

◆ linkStatusesChanged

void VehicleLinkManager::linkStatusesChanged ( )
signal

Referenced by VehicleLinkManager().

◆ mavlinkMessageReceived()

void VehicleLinkManager::mavlinkMessageReceived ( LinkInterface link,
const mavlink_message_t message 
)

Definition at line 33 of file VehicleLinkManager.cc.

◆ primaryLink()

◆ primaryLinkChanged

void VehicleLinkManager::primaryLinkChanged ( )
signal

◆ primaryLinkName()

QString VehicleLinkManager::primaryLinkName ( ) const

Definition at line 385 of file VehicleLinkManager.cc.

◆ setCommunicationLostEnabled()

◆ setPrimaryLinkByName()

void VehicleLinkManager::setPrimaryLinkByName ( const QString &  name)

Definition at line 394 of file VehicleLinkManager.cc.

References primaryLinkChanged().

Friends And Related Symbol Documentation

◆ Vehicle

friend class Vehicle
friend

Definition at line 27 of file VehicleLinkManager.h.

Member Data Documentation

◆ kTestCommLostDetectionTimeoutMs

constexpr int VehicleLinkManager::kTestCommLostDetectionTimeoutMs = _commLostCheckTimeoutMSecs + kTestHeartbeatTimeoutMs + 500
staticconstexpr

Full comm loss detection timeout for tests: accounts for timer interval + heartbeat timeout + margin. Use this in tests waiting for communicationLostChanged or linkStatusesChanged signals.

Definition at line 93 of file VehicleLinkManager.h.

◆ kTestHeartbeatTimeoutMs

constexpr int VehicleLinkManager::kTestHeartbeatTimeoutMs = 500
staticconstexpr

Heartbeat timeout used in unit tests (much shorter for faster tests)

Definition at line 89 of file VehicleLinkManager.h.


The documentation for this class was generated from the following files: