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

#include <RallyPointManager.h>

+ Inheritance diagram for RallyPointManager:
+ Collaboration diagram for RallyPointManager:

Public Types

enum  ErrorCode_t { InternalError , TooFewPoints , TooManyPoints , InvalidCircleRadius }
 Error codes returned in error signal. More...
 
- Public Types inherited from PlanManager
enum  ErrorCode_t {
  InternalError , AckTimeoutError , ProtocolError , RequestRangeError ,
  ItemMismatchError , VehicleAckError , MissingRequestsError , MaxRetryExceeded ,
  MissionTypeMismatch
}
 Error codes returned in error signal. More...
 

Signals

void loadComplete (void)
 
void inProgressChanged (bool inProgress)
 
void error (int errorCode, const QString &errorMsg)
 
void removeAllComplete (bool error)
 
void sendComplete (bool error)
 
- Signals inherited from PlanManager
void newMissionItemsAvailable (bool removeAllRequested)
 
void inProgressChanged (bool inProgress)
 
void error (int errorCode, const QString &errorMsg)
 
void currentIndexChanged (int currentIndex)
 
void lastCurrentIndexChanged (int lastCurrentIndex)
 
void progressPctChanged (double progressPercentPct)
 
void removeAllComplete (bool error)
 
void sendComplete (bool error)
 
void resumeMissionReady (void)
 
void resumeMissionUploadFail (void)
 

Public Member Functions

 RallyPointManager (Vehicle *vehicle)
 
 ~RallyPointManager ()
 
bool supported (void) const
 
void sendToVehicle (const QList< QGeoCoordinate > &rgPoints)
 
void removeAll (void)
 
QString editorQml (void) const
 
QList< QGeoCoordinate > points (void) const
 
- Public Member Functions inherited from PlanManager
 PlanManager (Vehicle *vehicle, MAV_MISSION_TYPE planType)
 
 ~PlanManager ()
 
bool inProgress (void) const
 
const QList< MissionItem * > & missionItems (void)
 
int currentIndex (void) const
 Current mission item as reported by MISSION_CURRENT.
 
int lastCurrentIndex (void) const
 Last current mission item reported while in Mission flight mode.
 
void loadFromVehicle (void)
 
void writeMissionItems (const QList< MissionItem * > &missionItems)
 
void removeAll (void)
 

Protected Member Functions

void _sendError (ErrorCode_t errorCode, const QString &errorMsg)
 
- Protected Member Functions inherited from PlanManager
void _startAckTimeout (AckType_t ack)
 
bool _checkForExpectedAck (AckType_t receivedAck)
 
void _readTransactionComplete (void)
 
void _handleMissionCount (const mavlink_message_t &message)
 
void _handleMissionItem (const mavlink_message_t &message)
 
void _handleMissionRequest (const mavlink_message_t &message)
 
void _handleMissionAck (const mavlink_message_t &message)
 
void _requestNextMissionItem (void)
 
void _clearMissionItems (void)
 
void _sendError (ErrorCode_t errorCode, const QString &errorMsg)
 
QString _ackTypeToString (AckType_t ackType)
 
QString _missionResultToString (MAV_MISSION_RESULT result)
 
void _finishTransaction (bool success, bool apmGuidedItemWrite=false)
 
void _requestList (void)
 Internal call to request list of mission items. May be called during a retry sequence.
 
void _writeMissionCount (void)
 This begins the write sequence with the vehicle. This may be called during a retry.
 
void _writeMissionItemsWorker (void)
 
void _clearAndDeleteMissionItems (void)
 
void _clearAndDeleteWriteMissionItems (void)
 
QString _lastMissionReqestString (MAV_MISSION_RESULT result)
 
void _removeAllWorker (void)
 
void _connectToMavlink (void)
 
void _disconnectFromMavlink (void)
 
QString _planTypeString (void)
 

Protected Attributes

QList< QGeoCoordinate > _rgPoints
 
QList< QGeoCoordinate > _rgSendPoints
 
- Protected Attributes inherited from PlanManager
Vehicle_vehicle = nullptr
 
MAV_MISSION_TYPE _planType
 
QTimer * _ackTimeoutTimer = nullptr
 
AckType_t _expectedAck
 
int _retryCount
 
TransactionType_t _transactionInProgress
 
bool _resumeMission
 
QList< int > _itemIndicesToWrite
 List of mission items which still need to be written to vehicle.
 
QList< int > _itemIndicesToRead
 List of mission items which still need to be requested from vehicle.
 
int _lastMissionRequest
 Index of item last requested by MISSION_REQUEST.
 
int _missionItemCountToRead
 Count of all mission items to read.
 
QList< MissionItem * > _missionItems
 Set of mission items on vehicle.
 
QList< MissionItem * > _writeMissionItems
 Set of mission items currently being written to vehicle.
 
int _currentMissionIndex
 
int _lastCurrentIndex
 

Additional Inherited Members

- Static Public Attributes inherited from PlanManager
static constexpr int _ackTimeoutMilliseconds = 1500
 
static constexpr int _retryTimeoutMilliseconds = 250
 
static constexpr int _maxRetryCount = 5
 
static constexpr int kTestAckTimeoutMs = 50
 Ack timeout used in unit tests (much shorter for faster tests)
 
- Protected Types inherited from PlanManager
enum  AckType_t {
  AckNone , AckMissionCount , AckMissionItem , AckMissionRequest ,
  AckMissionClearAll , AckGuidedItem
}
 
enum  TransactionType_t { TransactionNone , TransactionRead , TransactionWrite , TransactionRemoveAll }
 

Detailed Description

This is the base class for firmware specific rally point managers. A rally point manager is responsible for communicating with the vehicle to set/get rally points.

Definition at line 15 of file RallyPointManager.h.

Member Enumeration Documentation

◆ ErrorCode_t

Error codes returned in error signal.

Enumerator
InternalError 
TooFewPoints 

Too few points for valid geofence.

TooManyPoints 

Too many points for valid geofence.

InvalidCircleRadius 

Definition at line 30 of file RallyPointManager.h.

Constructor & Destructor Documentation

◆ RallyPointManager()

◆ ~RallyPointManager()

RallyPointManager::~RallyPointManager ( )

Definition at line 18 of file RallyPointManager.cc.

Member Function Documentation

◆ _sendError()

void RallyPointManager::_sendError ( ErrorCode_t  errorCode,
const QString &  errorMsg 
)
protected

Definition at line 23 of file RallyPointManager.cc.

References error.

◆ editorQml()

QString RallyPointManager::editorQml ( void  ) const
inline

Definition at line 26 of file RallyPointManager.h.

Referenced by RallyPointController::editorQml().

◆ error

void RallyPointManager::error ( int  errorCode,
const QString &  errorMsg 
)
signal

Referenced by RallyPointManager().

◆ inProgressChanged

void RallyPointManager::inProgressChanged ( bool  inProgress)
signal

Referenced by RallyPointManager().

◆ loadComplete

void RallyPointManager::loadComplete ( void  )
signal

◆ points()

QList< QGeoCoordinate > RallyPointManager::points ( void  ) const
inline

Definition at line 27 of file RallyPointManager.h.

◆ removeAll()

void RallyPointManager::removeAll ( void  )

Definition at line 57 of file RallyPointManager.cc.

References _rgPoints, and PlanManager::removeAll().

Referenced by RallyPointController::removeAllFromVehicle().

◆ removeAllComplete

void RallyPointManager::removeAllComplete ( bool  error)
signal

Referenced by RallyPointManager().

◆ sendComplete

void RallyPointManager::sendComplete ( bool  error)
signal

◆ sendToVehicle()

void RallyPointManager::sendToVehicle ( const QList< QGeoCoordinate > &  rgPoints)

◆ supported()

bool RallyPointManager::supported ( void  ) const

Definition at line 63 of file RallyPointManager.cc.

References PlanManager::_vehicle, and Vehicle::capabilityBits().

Member Data Documentation

◆ _rgPoints

QList<QGeoCoordinate> RallyPointManager::_rgPoints
protected

Definition at line 51 of file RallyPointManager.h.

Referenced by removeAll().

◆ _rgSendPoints

QList<QGeoCoordinate> RallyPointManager::_rgSendPoints
protected

Definition at line 52 of file RallyPointManager.h.

Referenced by sendToVehicle().


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