Used to group Facts together into an object hierarachy. More...
#include <FactGroup.h>
Signals | |
| void | factNamesChanged () |
| void | factGroupNamesChanged () |
| void | telemetryAvailableChanged (bool telemetryAvailable) |
Public Member Functions | |
| FactGroup (int updateRateMsecs, const QString &metaDataFile, QObject *parent=nullptr, bool ignoreCamelCase=false) | |
| < false: No telemetry for these values has been received | |
| FactGroup (int updateRateMsecs, QObject *parent=nullptr, bool ignoreCamelCase=false) | |
| virtual | ~FactGroup () |
| Q_INVOKABLE bool | factExists (const QString &name) const |
| @ return true: if the fact exists in the group | |
| Q_INVOKABLE Fact * | getFact (const QString &name) const |
| Q_INVOKABLE FactGroup * | getFactGroup (const QString &name) const |
| Q_INVOKABLE void | setLiveUpdates (bool liveUpdates) |
| Turning on live updates will allow value changes to flow through as they are received. | |
| QStringList | factNames () const |
| QStringList | factGroupNames () const |
| bool | telemetryAvailable () const |
| const QMap< QString, FactGroup * > & | factGroups () const |
| virtual void | handleMessage (Vehicle *, const mavlink_message_t &) |
| Allows a FactGroup to parse incoming messages and fill in values. | |
Protected Slots | |
| virtual void | _updateAllValues () |
Protected Member Functions | |
| void | _addFact (Fact *fact, const QString &name) |
| void | _addFact (Fact *fact) |
| void | _addFactGroup (FactGroup *factGroup, const QString &name) |
| void | _addFactGroup (FactGroup *factGroup) |
| void | _loadFromJsonArray (const QJsonArray &jsonArray) |
| void | _setTelemetryAvailable (bool telemetryAvailable) |
Protected Attributes | |
| const int | _updateRateMSecs = 0 |
| Update rate for Fact::valueChanged signals, 0: immediate update. | |
| QMap< QString, Fact * > | _nameToFactMap |
| QMap< QString, FactGroup * > | _nameToFactGroupMap |
| QMap< QString, FactMetaData * > | _nameToFactMetaDataMap |
| QStringList | _factNames |
Used to group Facts together into an object hierarachy.
Definition at line 15 of file FactGroup.h.
|
explicit |
< false: No telemetry for these values has been received
Definition at line 10 of file FactGroup.cc.
References _nameToFactMetaDataMap, _updateRateMSecs, FactMetaData::createMapFromJsonFile(), and FactGroup().
Referenced by _addFactGroup(), _addFactGroup(), APMSubmarineFactGroup::APMSubmarineFactGroup(), Vehicle::clockFactGroup(), Vehicle::distanceSensorFactGroup(), Vehicle::efiFactGroup(), Vehicle::estimatorStatusFactGroup(), factExists(), FactGroup(), FactGroupWithId::FactGroupWithId(), Vehicle::generatorFactGroup(), getFact(), getFactGroup(), Gimbal::Gimbal(), Gimbal::Gimbal(), Vehicle::hygrometerFactGroup(), Vehicle::localPositionFactGroup(), Vehicle::localPositionSetpointFactGroup(), MavlinkCameraControlInterface::MavlinkCameraControlInterface(), RadioStatusFactGroup::RadioStatusFactGroup(), Vehicle::radioStatusFactGroup(), Vehicle::rpmFactGroup(), Vehicle::setpointFactGroup(), Vehicle::temperatureFactGroup(), TerrainFactGroup::TerrainFactGroup(), Vehicle::terrainFactGroup(), VehicleClockFactGroup::VehicleClockFactGroup(), VehicleDistanceSensorFactGroup::VehicleDistanceSensorFactGroup(), VehicleEFIFactGroup::VehicleEFIFactGroup(), VehicleEstimatorStatusFactGroup::VehicleEstimatorStatusFactGroup(), VehicleFactGroup::VehicleFactGroup(), Vehicle::vehicleFactGroup(), VehicleGeneratorFactGroup::VehicleGeneratorFactGroup(), VehicleGPSFactGroup::VehicleGPSFactGroup(), VehicleHygrometerFactGroup::VehicleHygrometerFactGroup(), VehicleLocalPositionFactGroup::VehicleLocalPositionFactGroup(), VehicleLocalPositionSetpointFactGroup::VehicleLocalPositionSetpointFactGroup(), VehicleRPMFactGroup::VehicleRPMFactGroup(), VehicleSetpointFactGroup::VehicleSetpointFactGroup(), VehicleTemperatureFactGroup::VehicleTemperatureFactGroup(), VehicleVibrationFactGroup::VehicleVibrationFactGroup(), VehicleWindFactGroup::VehicleWindFactGroup(), Vehicle::vibrationFactGroup(), and Vehicle::windFactGroup().
|
explicit |
Definition at line 20 of file FactGroup.cc.
References _updateRateMSecs.
|
virtual |
Definition at line 29 of file FactGroup.cc.
|
inlineprotected |
Definition at line 61 of file FactGroup.h.
References _addFact(), and Fact::name().
Referenced by _addFact().
|
protected |
Definition at line 122 of file FactGroup.cc.
References _factNames, _nameToFactMap, _nameToFactMetaDataMap, _updateRateMSecs, factNamesChanged(), Fact::setMetaData(), and Fact::setSendValueChangedSignals().
Referenced by APMSubmarineFactGroup::APMSubmarineFactGroup(), BatteryFactGroup::BatteryFactGroup(), EscStatusFactGroup::EscStatusFactGroup(), FactGroupWithId::FactGroupWithId(), RadioStatusFactGroup::RadioStatusFactGroup(), TerrainFactGroup::TerrainFactGroup(), VehicleClockFactGroup::VehicleClockFactGroup(), VehicleDistanceSensorFactGroup::VehicleDistanceSensorFactGroup(), VehicleEFIFactGroup::VehicleEFIFactGroup(), VehicleEstimatorStatusFactGroup::VehicleEstimatorStatusFactGroup(), VehicleFactGroup::VehicleFactGroup(), VehicleGeneratorFactGroup::VehicleGeneratorFactGroup(), VehicleGPSFactGroup::VehicleGPSFactGroup(), VehicleHygrometerFactGroup::VehicleHygrometerFactGroup(), VehicleLocalPositionFactGroup::VehicleLocalPositionFactGroup(), VehicleLocalPositionSetpointFactGroup::VehicleLocalPositionSetpointFactGroup(), VehicleRPMFactGroup::VehicleRPMFactGroup(), VehicleSetpointFactGroup::VehicleSetpointFactGroup(), VehicleTemperatureFactGroup::VehicleTemperatureFactGroup(), VehicleVibrationFactGroup::VehicleVibrationFactGroup(), and VehicleWindFactGroup::VehicleWindFactGroup().
|
inlineprotected |
Definition at line 63 of file FactGroup.h.
References _addFactGroup(), and FactGroup().
Referenced by _addFactGroup().
|
protected |
Definition at line 139 of file FactGroup.cc.
References _nameToFactGroupMap, FactGroup(), and factGroupNamesChanged().
Referenced by FactGroupListModel::_findOrAddFactGroupById().
|
protected |
Definition at line 34 of file FactGroup.cc.
References _nameToFactMetaDataMap, and FactMetaData::createMapFromJsonArray().
|
protected |
Definition at line 181 of file FactGroup.cc.
References telemetryAvailable(), and telemetryAvailableChanged().
Referenced by VehicleFactGroup::_handleAltitude(), VehicleFactGroup::_handleAttitude(), VehicleFactGroup::_handleAttitudeQuaternion(), VehicleHygrometerFactGroup::_handleHygrometerSensor(), VehicleFactGroup::_handleNavControllerOutput(), VehicleFactGroup::_handleRangefinder(), VehicleFactGroup::_handleRawImuTemp(), VehicleFactGroup::_handleVfrHud(), VehicleDistanceSensorFactGroup::handleMessage(), VehicleEstimatorStatusFactGroup::handleMessage(), VehicleLocalPositionFactGroup::handleMessage(), VehicleLocalPositionSetpointFactGroup::handleMessage(), VehicleSetpointFactGroup::handleMessage(), and VehicleVibrationFactGroup::handleMessage().
|
protectedvirtualslot |
Definition at line 151 of file FactGroup.cc.
References _nameToFactMap.
| bool FactGroup::factExists | ( | const QString & | name | ) | const |
@ return true: if the fact exists in the group
Definition at line 50 of file FactGroup.cc.
References _nameToFactMap, factExists(), FactGroup(), and getFactGroup().
Referenced by factExists(), VehicleCameraControl::mode(), and TelemetryBarValues::read().
|
inline |
Definition at line 44 of file FactGroup.h.
References _nameToFactGroupMap.
|
signal |
Referenced by _addFactGroup().
|
inline |
Definition at line 46 of file FactGroup.h.
References _nameToFactGroupMap.
Referenced by TelemetryBarValues::read().
|
inline |
Definition at line 43 of file FactGroup.h.
References _factNames.
Referenced by InstrumentValueData::factValueNames(), and Vehicle::Vehicle().
|
signal |
Referenced by _addFact().
| Fact * FactGroup::getFact | ( | const QString & | name | ) | const |
Definition at line 73 of file FactGroup.cc.
References _nameToFactMap, FactGroup(), getFact(), and getFactGroup().
Referenced by VehicleCameraControl::aperture(), VehicleCameraControl::ev(), VehicleCameraControl::exposureMode(), getFact(), VehicleCameraControl::iso(), VehicleCameraControl::mode(), TelemetryBarValues::read(), VehicleCameraControl::shutterSpeed(), Vehicle::Vehicle(), and VehicleCameraControl::wb().
| FactGroup * FactGroup::getFactGroup | ( | const QString & | name | ) | const |
Definition at line 106 of file FactGroup.cc.
References _nameToFactGroupMap, and FactGroup().
Referenced by factExists(), InstrumentValueData::factValueNames(), and getFact().
|
inlinevirtual |
Allows a FactGroup to parse incoming messages and fill in values.
Reimplemented in BatteryFactGroup, EscStatusFactGroup, RadioStatusFactGroup, VehicleDistanceSensorFactGroup, VehicleEFIFactGroup, VehicleEstimatorStatusFactGroup, VehicleFactGroup, VehicleGeneratorFactGroup, VehicleGPSFactGroup, VehicleHygrometerFactGroup, VehicleLocalPositionFactGroup, VehicleLocalPositionSetpointFactGroup, VehicleRPMFactGroup, VehicleSetpointFactGroup, VehicleTemperatureFactGroup, VehicleVibrationFactGroup, and VehicleWindFactGroup.
Definition at line 49 of file FactGroup.h.
| void FactGroup::setLiveUpdates | ( | bool | liveUpdates | ) |
Turning on live updates will allow value changes to flow through as they are received.
Definition at line 158 of file FactGroup.cc.
References _nameToFactMap.
Referenced by Vehicle::setPIDTuningTelemetryMode().
|
inline |
Definition at line 45 of file FactGroup.h.
Referenced by _setTelemetryAvailable(), and telemetryAvailableChanged().
|
signal |
References telemetryAvailable().
Referenced by _setTelemetryAvailable(), and GPSReceiver::GPSReceiver().
|
protected |
Definition at line 72 of file FactGroup.h.
Referenced by _addFact(), and factNames().
|
protected |
Definition at line 70 of file FactGroup.h.
Referenced by _addFactGroup(), factGroupNames(), factGroups(), and getFactGroup().
|
protected |
Definition at line 69 of file FactGroup.h.
Referenced by _addFact(), _updateAllValues(), factExists(), getFact(), and setLiveUpdates().
|
protected |
Definition at line 71 of file FactGroup.h.
Referenced by _addFact(), _loadFromJsonArray(), and FactGroup().
|
protected |
Update rate for Fact::valueChanged signals, 0: immediate update.
Definition at line 67 of file FactGroup.h.
Referenced by _addFact(), FactGroup(), and FactGroup().