|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <MockConfiguration.h>
Inheritance diagram for MockConfiguration:
Collaboration diagram for MockConfiguration:Public Types | |
| enum | Option { OptionNone = 0 , OptionSendStatusText = 1 << 0 , OptionEnableCamera = 1 << 1 , OptionEnableGimbal = 1 << 2 , OptionEnableProximity = 1 << 3 , OptionPreloadMission = 1 << 4 , OptionStayMavlinkV1 = 1 << 5 , OptionAPMStartFreshParams = 1 << 6 , OptionFtpCapability = 1 << 7 } |
| Options for the MockLink::start*MockLink helpers. More... | |
| enum | VideoStreamType { VideoStreamNone = 0 , VideoStreamRtpUdpH264 , VideoStreamRtpUdpH265 , VideoStreamRtspH264 , VideoStreamMpegTsUdp , VideoStreamMpegTsTcp } |
| enum | FailureMode_t { FailNone , FailParamNoResponseToRequestList , FailMissingParamOnInitialRequest , FailMissingParamOnAllRequests , FailInitialConnectRequestMessageAutopilotVersionFailure , FailInitialConnectRequestMessageAutopilotVersionLost } |
Public Types inherited from LinkConfiguration | |
| enum | LinkType { TypeSerial , TypeUdp , TypeTcp , TypeBluetooth , TypeLogReplay , TypeLast } |
Public Member Functions | |
| MockConfiguration (const QString &name, QObject *parent=nullptr) | |
| MockConfiguration (const MockConfiguration *copy, QObject *parent=nullptr) | |
| ~MockConfiguration () | |
| LinkType | type () const final |
| void | copyFrom (const LinkConfiguration *source) final |
| void | loadSettings (QSettings &settings, const QString &root) final |
| void | saveSettings (QSettings &settings, const QString &root) const final |
| QString | settingsURL () const final |
| Settings URL, Pure virtual method providing the URL for the (QML) settings dialog. | |
| QString | settingsTitle () const final |
| Settings Title, Pure virtual method providing the Title for the (QML) settings dialog. | |
| int | firmware () const |
| void | setFirmware (int type) |
| int | vehicle () const |
| void | setVehicle (int type) |
| bool | incrementVehicleId () const |
| void | setIncrementVehicleId (bool incrementVehicleId) |
| MAV_AUTOPILOT | firmwareType () const |
| void | setFirmwareType (MAV_AUTOPILOT firmwareType) |
| uint16_t | boardVendorId () const |
| uint16_t | boardProductId () const |
| void | setBoardVendorProduct (uint16_t vendorId, uint16_t productId) |
| MAV_TYPE | vehicleType () const |
| void | setVehicleType (MAV_TYPE vehicleType) |
| bool | sendStatusText () const |
| void | setSendStatusText (bool sendStatusText) |
| bool | apmStartFreshParams () const |
| void | setApmStartFreshParams (bool apmStartFreshParams) |
| bool | enableCamera () const |
| void | setEnableCamera (bool enableCamera) |
| bool | enableGimbal () const |
| void | setEnableGimbal (bool enableGimbal) |
| bool | enableProximity () const |
| void | setEnableProximity (bool enableProximity) |
| bool | gimbalHasRollAxis () const |
| void | setGimbalHasRollAxis (bool value) |
| bool | gimbalHasPitchAxis () const |
| void | setGimbalHasPitchAxis (bool value) |
| bool | gimbalHasYawAxis () const |
| void | setGimbalHasYawAxis (bool value) |
| bool | gimbalHasYawFollow () const |
| void | setGimbalHasYawFollow (bool value) |
| bool | gimbalHasYawLock () const |
| void | setGimbalHasYawLock (bool value) |
| bool | gimbalHasRetract () const |
| void | setGimbalHasRetract (bool value) |
| bool | gimbalHasNeutral () const |
| void | setGimbalHasNeutral (bool value) |
| bool | cameraCaptureVideo () const |
| void | setCameraCaptureVideo (bool value) |
| bool | cameraCaptureImage () const |
| void | setCameraCaptureImage (bool value) |
| bool | cameraHasModes () const |
| void | setCameraHasModes (bool value) |
| bool | cameraHasVideoStream () const |
| void | setCameraHasVideoStream (bool value) |
| bool | cameraCanCaptureImageInVideoMode () const |
| void | setCameraCanCaptureImageInVideoMode (bool value) |
| bool | cameraCanCaptureVideoInImageMode () const |
| void | setCameraCanCaptureVideoInImageMode (bool value) |
| bool | cameraHasBasicZoom () const |
| void | setCameraHasBasicZoom (bool value) |
| bool | cameraHasTrackingPoint () const |
| void | setCameraHasTrackingPoint (bool value) |
| bool | cameraHasTrackingRectangle () const |
| void | setCameraHasTrackingRectangle (bool value) |
| int | videoStreamType () const |
| void | setVideoStreamType (int value) |
| VideoStreamType | videoStreamTypeEnum () const |
| FailureMode_t | failureMode () const |
| void | setFailureMode (FailureMode_t failureMode) |
| bool | startArmed () const |
| void | setStartArmed (bool armed) |
| bool | preloadMission () const |
| void | setPreloadMission (bool preloadMission) |
| bool | stayMavlinkV1 () const |
| void | setStayMavlinkV1 (bool stayV1) |
| bool | ftpCapability () const |
| void | setFtpCapability (bool ftpCapability) |
Public Member Functions inherited from LinkConfiguration | |
| LinkConfiguration (const QString &name, QObject *parent=nullptr) | |
| LinkConfiguration (const LinkConfiguration *copy, QObject *parent=nullptr) | |
| virtual | ~LinkConfiguration () |
| QString | name () const |
| void | setName (const QString &name) |
| LinkInterface * | link () const |
| void | setLink (const std::shared_ptr< LinkInterface > link) |
| bool | linkActive () const |
| bool | isDynamic () const |
| void | setDynamic (bool dynamic=true) |
| Set if this is this a dynamic configuration. (decided at runtime) | |
| bool | isForwarding () const |
| void | setForwarding (bool forwarding=true) |
| Set if this is this a forwarding link configuration. (decided at runtime) | |
| bool | isAutoConnect () const |
| virtual void | setAutoConnect (bool autoc=true) |
| Set if this is this an Auto Connect configuration. | |
| bool | suppressAutoReconnect () const |
| void | setSuppressAutoReconnect (bool suppress) |
| bool | autoConnectStarted () const |
| void | setAutoConnectStarted (bool started) |
| bool | reconnectReady () const |
| void | noteReconnectAttempt () |
| void | resetReconnectBackoff () |
| void | noteConnected () |
| void | noteDisconnected () |
| Reset backoff only if the link stayed up long enough to count as working. | |
| bool | isHighLatency () const |
| void | setHighLatency (bool hl=false) |
| Set if this is this an High Latency configuration. | |
Static Public Member Functions | |
| static VideoStreamType | videoStreamTypeFromInt (int value) |
Static Public Member Functions inherited from LinkConfiguration | |
| static LinkConfiguration * | createSettings (int type, const QString &name) |
| static LinkConfiguration * | duplicateSettings (const LinkConfiguration *source) |
| static QString | settingsRoot () |
Additional Inherited Members | |
Protected Attributes inherited from LinkConfiguration | |
| std::weak_ptr< LinkInterface > | _link |
| Link currently using this configuration (if any) | |
Definition at line 7 of file MockConfiguration.h.
| Enumerator | |
|---|---|
| FailNone | No failures. |
| FailParamNoResponseToRequestList | Do not respond to PARAM_REQUEST_LIST. |
| FailMissingParamOnInitialRequest | Not all params are sent on initial request, should still succeed since QGC will re-query missing params. |
| FailMissingParamOnAllRequests | Not all params are sent on initial request, QGC retries will fail as well. |
| FailInitialConnectRequestMessageAutopilotVersionFailure | REQUEST_MESSAGE:AUTOPILOT_VERSION returns failure. |
| FailInitialConnectRequestMessageAutopilotVersionLost | REQUEST_MESSAGE:AUTOPILOT_VERSION success, AUTOPILOT_VERSION never sent. |
Definition at line 144 of file MockConfiguration.h.
Options for the MockLink::start*MockLink helpers.
| Enumerator | |
|---|---|
| OptionNone | |
| OptionSendStatusText | |
| OptionEnableCamera | |
| OptionEnableGimbal | |
| OptionEnableProximity | |
| OptionPreloadMission | |
| OptionStayMavlinkV1 | |
| OptionAPMStartFreshParams | |
| OptionFtpCapability | |
Definition at line 42 of file MockConfiguration.h.
Kind of live video stream MockLink serves (and advertises via VIDEO_STREAM_INFORMATION). Order must match the combo box model in MockLinkSettings.qml / MockLink.qml.
Definition at line 58 of file MockConfiguration.h.
|
explicit |
Definition at line 6 of file MockConfiguration.cc.
|
explicit |
Definition at line 12 of file MockConfiguration.cc.
| MockConfiguration::~MockConfiguration | ( | ) |
Definition at line 47 of file MockConfiguration.cc.
|
inline |
Definition at line 90 of file MockConfiguration.h.
Referenced by copyFrom(), saveSettings(), and setApmStartFreshParams().
|
signal |
Referenced by setApmStartFreshParams().
|
inline |
Definition at line 84 of file MockConfiguration.h.
|
inline |
Definition at line 83 of file MockConfiguration.h.
|
inline |
Definition at line 122 of file MockConfiguration.h.
Referenced by copyFrom(), and saveSettings().
|
signal |
Referenced by setCameraCanCaptureImageInVideoMode().
|
inline |
Definition at line 124 of file MockConfiguration.h.
Referenced by copyFrom(), and saveSettings().
|
signal |
Referenced by setCameraCanCaptureVideoInImageMode().
|
inline |
Definition at line 116 of file MockConfiguration.h.
Referenced by copyFrom(), and saveSettings().
|
signal |
Referenced by setCameraCaptureImage().
|
inline |
Definition at line 114 of file MockConfiguration.h.
Referenced by copyFrom(), and saveSettings().
|
signal |
Referenced by setCameraCaptureVideo().
|
inline |
Definition at line 126 of file MockConfiguration.h.
Referenced by copyFrom(), and saveSettings().
|
signal |
Referenced by setCameraHasBasicZoom().
|
inline |
Definition at line 118 of file MockConfiguration.h.
Referenced by copyFrom(), and saveSettings().
|
signal |
Referenced by setCameraHasModes().
|
inline |
Definition at line 128 of file MockConfiguration.h.
Referenced by copyFrom(), and saveSettings().
|
signal |
Referenced by setCameraHasTrackingPoint().
|
inline |
Definition at line 130 of file MockConfiguration.h.
Referenced by copyFrom(), and saveSettings().
|
signal |
Referenced by setCameraHasTrackingRectangle().
|
inline |
Definition at line 120 of file MockConfiguration.h.
Referenced by copyFrom(), and saveSettings().
|
signal |
Referenced by setCameraHasVideoStream().
|
finalvirtual |
Copy instance data, When manipulating data, you create a copy of the configuration using the copy constructor, edit it and then transfer its content to the original using this method.
| [in] | source | The source instance (the edited copy) |
Reimplemented from LinkConfiguration.
Definition at line 52 of file MockConfiguration.cc.
References apmStartFreshParams(), cameraCanCaptureImageInVideoMode(), cameraCanCaptureVideoInImageMode(), cameraCaptureImage(), cameraCaptureVideo(), cameraHasBasicZoom(), cameraHasModes(), cameraHasTrackingPoint(), cameraHasTrackingRectangle(), cameraHasVideoStream(), LinkConfiguration::copyFrom(), enableCamera(), enableGimbal(), enableProximity(), failureMode(), firmwareType(), gimbalHasNeutral(), gimbalHasPitchAxis(), gimbalHasRetract(), gimbalHasRollAxis(), gimbalHasYawAxis(), gimbalHasYawFollow(), gimbalHasYawLock(), incrementVehicleId(), preloadMission(), sendStatusText(), setApmStartFreshParams(), setCameraCanCaptureImageInVideoMode(), setCameraCanCaptureVideoInImageMode(), setCameraCaptureImage(), setCameraCaptureVideo(), setCameraHasBasicZoom(), setCameraHasModes(), setCameraHasTrackingPoint(), setCameraHasTrackingRectangle(), setCameraHasVideoStream(), setEnableCamera(), setEnableGimbal(), setEnableProximity(), setFailureMode(), setFirmwareType(), setGimbalHasNeutral(), setGimbalHasPitchAxis(), setGimbalHasRetract(), setGimbalHasRollAxis(), setGimbalHasYawAxis(), setGimbalHasYawFollow(), setGimbalHasYawLock(), setIncrementVehicleId(), setPreloadMission(), setSendStatusText(), setStartArmed(), setStayMavlinkV1(), setVehicleType(), setVideoStreamType(), startArmed(), stayMavlinkV1(), vehicleType(), and videoStreamType().
|
inline |
Definition at line 92 of file MockConfiguration.h.
Referenced by copyFrom(), saveSettings(), and setEnableCamera().
|
signal |
Referenced by setEnableCamera().
|
inline |
Definition at line 94 of file MockConfiguration.h.
Referenced by copyFrom(), saveSettings(), and setEnableGimbal().
|
signal |
Referenced by setEnableGimbal().
|
inline |
Definition at line 96 of file MockConfiguration.h.
Referenced by copyFrom(), saveSettings(), and setEnableProximity().
|
signal |
Referenced by setEnableProximity().
|
inline |
Definition at line 152 of file MockConfiguration.h.
Referenced by copyFrom(), saveSettings(), and setFailureMode().
|
inline |
Definition at line 75 of file MockConfiguration.h.
|
signal |
Referenced by setFirmware(), and setFirmwareType().
|
inline |
Definition at line 81 of file MockConfiguration.h.
Referenced by copyFrom(), saveSettings(), and setFirmwareType().
|
inline |
Definition at line 171 of file MockConfiguration.h.
Referenced by setFtpCapability().
|
inline |
Definition at line 111 of file MockConfiguration.h.
Referenced by copyFrom(), and saveSettings().
|
signal |
Referenced by setGimbalHasNeutral().
|
inline |
Definition at line 101 of file MockConfiguration.h.
Referenced by copyFrom(), and saveSettings().
|
signal |
Referenced by setGimbalHasPitchAxis().
|
inline |
Definition at line 109 of file MockConfiguration.h.
Referenced by copyFrom(), and saveSettings().
|
signal |
Referenced by setGimbalHasRetract().
|
inline |
Definition at line 99 of file MockConfiguration.h.
Referenced by copyFrom(), and saveSettings().
|
signal |
Referenced by setGimbalHasRollAxis().
|
inline |
Definition at line 103 of file MockConfiguration.h.
Referenced by copyFrom(), and saveSettings().
|
signal |
Referenced by setGimbalHasYawAxis().
|
inline |
Definition at line 105 of file MockConfiguration.h.
Referenced by copyFrom(), and saveSettings().
|
signal |
Referenced by setGimbalHasYawFollow().
|
inline |
Definition at line 107 of file MockConfiguration.h.
Referenced by copyFrom(), and saveSettings().
|
signal |
Referenced by setGimbalHasYawLock().
|
inline |
Definition at line 79 of file MockConfiguration.h.
Referenced by copyFrom(), saveSettings(), and setIncrementVehicleId().
|
signal |
Referenced by setIncrementVehicleId().
|
finalvirtual |
Load settings, Pure virtual method telling the instance to load its configuration.
| [in] | settings | The QSettings instance to use |
| [in] | root | The root path of the setting. |
Implements LinkConfiguration.
Definition at line 89 of file MockConfiguration.cc.
References FailNone, setApmStartFreshParams(), setCameraCanCaptureImageInVideoMode(), setCameraCanCaptureVideoInImageMode(), setCameraCaptureImage(), setCameraCaptureVideo(), setCameraHasBasicZoom(), setCameraHasModes(), setCameraHasTrackingPoint(), setCameraHasTrackingRectangle(), setCameraHasVideoStream(), setEnableCamera(), setEnableGimbal(), setEnableProximity(), setFailureMode(), setFirmwareType(), setGimbalHasNeutral(), setGimbalHasPitchAxis(), setGimbalHasRetract(), setGimbalHasRollAxis(), setGimbalHasYawAxis(), setGimbalHasYawFollow(), setGimbalHasYawLock(), setIncrementVehicleId(), setSendStatusText(), setVehicleType(), setVideoStreamType(), and VideoStreamNone.
|
inline |
Definition at line 161 of file MockConfiguration.h.
Referenced by copyFrom(), MockLink::MockLink(), and setPreloadMission().
|
finalvirtual |
Save settings, Pure virtual method telling the instance to save its configuration.
| [in] | settings | The QSettings instance to use |
| [in] | root | The root path of the setting. |
Implements LinkConfiguration.
Definition at line 123 of file MockConfiguration.cc.
References apmStartFreshParams(), cameraCanCaptureImageInVideoMode(), cameraCanCaptureVideoInImageMode(), cameraCaptureImage(), cameraCaptureVideo(), cameraHasBasicZoom(), cameraHasModes(), cameraHasTrackingPoint(), cameraHasTrackingRectangle(), cameraHasVideoStream(), enableCamera(), enableGimbal(), enableProximity(), failureMode(), firmwareType(), gimbalHasNeutral(), gimbalHasPitchAxis(), gimbalHasRetract(), gimbalHasRollAxis(), gimbalHasYawAxis(), gimbalHasYawFollow(), gimbalHasYawLock(), incrementVehicleId(), sendStatusText(), vehicleType(), and videoStreamType().
|
signal |
Referenced by setSendStatusText().
|
inline |
Definition at line 88 of file MockConfiguration.h.
Referenced by copyFrom(), saveSettings(), and setSendStatusText().
|
inline |
Definition at line 91 of file MockConfiguration.h.
References apmStartFreshParams(), and apmStartFreshParamsChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 85 of file MockConfiguration.h.
|
inline |
Definition at line 123 of file MockConfiguration.h.
References cameraCanCaptureImageInVideoModeChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 125 of file MockConfiguration.h.
References cameraCanCaptureVideoInImageModeChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 117 of file MockConfiguration.h.
References cameraCaptureImageChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 115 of file MockConfiguration.h.
References cameraCaptureVideoChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 127 of file MockConfiguration.h.
References cameraHasBasicZoomChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 119 of file MockConfiguration.h.
References cameraHasModesChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 129 of file MockConfiguration.h.
References cameraHasTrackingPointChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 131 of file MockConfiguration.h.
References cameraHasTrackingRectangleChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 121 of file MockConfiguration.h.
References cameraHasVideoStreamChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 93 of file MockConfiguration.h.
References enableCamera(), and enableCameraChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 95 of file MockConfiguration.h.
References enableGimbal(), and enableGimbalChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 97 of file MockConfiguration.h.
References enableProximity(), and enableProximityChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 153 of file MockConfiguration.h.
References failureMode().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 76 of file MockConfiguration.h.
References firmwareChanged(), and type().
|
inline |
Definition at line 82 of file MockConfiguration.h.
References firmwareChanged(), and firmwareType().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 172 of file MockConfiguration.h.
References ftpCapability().
|
inline |
Definition at line 112 of file MockConfiguration.h.
References gimbalHasNeutralChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 102 of file MockConfiguration.h.
References gimbalHasPitchAxisChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 110 of file MockConfiguration.h.
References gimbalHasRetractChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 100 of file MockConfiguration.h.
References gimbalHasRollAxisChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 104 of file MockConfiguration.h.
References gimbalHasYawAxisChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 106 of file MockConfiguration.h.
References gimbalHasYawFollowChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 108 of file MockConfiguration.h.
References gimbalHasYawLockChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 80 of file MockConfiguration.h.
References incrementVehicleId(), and incrementVehicleIdChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 162 of file MockConfiguration.h.
References preloadMission().
Referenced by copyFrom().
|
inline |
Definition at line 89 of file MockConfiguration.h.
References sendStatusChanged(), and sendStatusText().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 157 of file MockConfiguration.h.
Referenced by copyFrom().
|
inline |
Definition at line 167 of file MockConfiguration.h.
Referenced by copyFrom().
|
inlinefinalvirtual |
Settings Title, Pure virtual method providing the Title for the (QML) settings dialog.
Implements LinkConfiguration.
Definition at line 73 of file MockConfiguration.h.
|
inlinefinalvirtual |
Settings URL, Pure virtual method providing the URL for the (QML) settings dialog.
Implements LinkConfiguration.
Definition at line 72 of file MockConfiguration.h.
|
inline |
Definition at line 78 of file MockConfiguration.h.
References type(), and vehicleChanged().
|
inline |
Definition at line 87 of file MockConfiguration.h.
References vehicleChanged(), and vehicleType().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 134 of file MockConfiguration.h.
References videoStreamTypeChanged(), and videoStreamTypeFromInt().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 156 of file MockConfiguration.h.
Referenced by copyFrom(), and MockLink::MockLink().
|
inline |
Definition at line 166 of file MockConfiguration.h.
Referenced by copyFrom().
|
inlinefinalvirtual |
Connection type, pure virtual method returning one of the -TypeXxx types above.
Implements LinkConfiguration.
Definition at line 68 of file MockConfiguration.h.
Referenced by setFirmware(), and setVehicle().
|
inline |
Definition at line 77 of file MockConfiguration.h.
|
signal |
Referenced by setVehicle(), and setVehicleType().
|
inline |
Definition at line 86 of file MockConfiguration.h.
Referenced by copyFrom(), saveSettings(), and setVehicleType().
|
inline |
Definition at line 133 of file MockConfiguration.h.
Referenced by copyFrom(), and saveSettings().
|
signal |
Referenced by setVideoStreamType().
|
inline |
Definition at line 135 of file MockConfiguration.h.
|
inlinestatic |
Maps an int (QML combo index / persisted setting) to a valid VideoStreamType. Out-of-range values (e.g. corrupted settings) map to VideoStreamNone.
Definition at line 139 of file MockConfiguration.h.
References VideoStreamMpegTsTcp, and VideoStreamNone.
Referenced by setVideoStreamType(), QGroundControlQmlGlobal::startAPMArduCopterMockLink(), QGroundControlQmlGlobal::startAPMArduPlaneMockLink(), QGroundControlQmlGlobal::startAPMArduRoverMockLink(), QGroundControlQmlGlobal::startAPMArduSubMockLink(), QGroundControlQmlGlobal::startGenericMockLink(), and QGroundControlQmlGlobal::startPX4MockLink().