dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
UAVObjectUtil Plugin

The UAVUObjectUtil GCS plugin. More...

Classes

class  deviceDescriptorStruct
 
class  UAVObjectUtilPlugin
 

Functions

quint16 deviceDescriptorStruct::boardID ()
 
static QString deviceDescriptorStruct::idToBoardName (quint16 id)
 Get the name for a board via the plugin system. More...
 
static QPixmap deviceDescriptorStruct::idToBoardPicture (quint16 id)
 
 deviceDescriptorStruct::deviceDescriptorStruct ()
 
void UAVObjectUtilManager::saveObjectToFlash (UAVObject *obj)
 UAVObjectUtilManager::saveObjectToSD Add a new object to save in the queue. More...
 
QMap< QString,
UAVObject::Metadata > 
UAVObjectUtilManager::readAllNonSettingsMetadata ()
 UAVObjectUtilManager::readAllNonSettingsMetadata Convenience function for calling readMetadata. More...
 
QMap< QString,
UAVObject::Metadata > 
UAVObjectUtilManager::readMetadata (metadataSetEnum metadataReadType)
 UAVObjectUtilManager::readMetadata Get metadata for UAVOs. More...
 
bool UAVObjectUtilManager::setAllNonSettingsMetadata (QMap< QString, UAVObject::Metadata >)
 UAVObjectUtilManager::setAllNonSettingsMetadata Convenience function for calling setMetadata. More...
 
bool UAVObjectUtilManager::setMetadata (QMap< QString, UAVObject::Metadata >, metadataSetEnum metadataUpdateType)
 UAVObjectUtilManager::setMetadata Sets the metadata for all metadata in QMap. More...
 
bool UAVObjectUtilManager::resetMetadataToDefaults ()
 UAVObjectUtilManager::resetMetadata Resets all metadata to defaults (from XML definitions) More...
 
FirmwareIAPObj::DataFields UAVObjectUtilManager::getFirmwareIap ()
 
int UAVObjectUtilManager::getBoardModel ()
 
QByteArray UAVObjectUtilManager::getBoardCPUSerial ()
 
QByteArray UAVObjectUtilManager::getBoardDescription ()
 
bool UAVObjectUtilManager::firmwareHashMatchesGcs ()
 Check if firmware version hash matches GCS version hash. More...
 
bool UAVObjectUtilManager::boardConfigured ()
 Check if the board has been configured for flight The heuristic is whether one or more actuators are configured for non-zero output. More...
 

Variables

QString deviceDescriptorStruct::gitHash
 
QString deviceDescriptorStruct::gitDate
 
QString deviceDescriptorStruct::gitTag
 
QString deviceDescriptorStruct::userDefined
 
QString deviceDescriptorStruct::nextAncestor
 
QByteArray deviceDescriptorStruct::fwHash
 
QByteArray deviceDescriptorStruct::uavoHash
 
quint8 deviceDescriptorStruct::boardType
 
quint8 deviceDescriptorStruct::boardRevision
 
bool deviceDescriptorStruct::certified
 

Detailed Description

The UAVUObjectUtil GCS plugin.

Function Documentation

bool UAVObjectUtilManager::boardConfigured ( )

Check if the board has been configured for flight The heuristic is whether one or more actuators are configured for non-zero output.

Returns
false if not configured, true otherwise

Definition at line 758 of file uavobjectutilmanager.cpp.

quint16 deviceDescriptorStruct::boardID ( )

Definition at line 37 of file devicedescriptorstruct.cpp.

deviceDescriptorStruct::deviceDescriptorStruct ( )

Definition at line 33 of file devicedescriptorstruct.cpp.

bool UAVObjectUtilManager::firmwareHashMatchesGcs ( )

Check if firmware version hash matches GCS version hash.

Returns
false if version doesn't match, true otherwise

Definition at line 748 of file uavobjectutilmanager.cpp.

QByteArray UAVObjectUtilManager::getBoardCPUSerial ( )

Get the UAV Board CPU Serial Number, for anyone interested. Return format is a byte array

Definition at line 526 of file uavobjectutilmanager.cpp.

QByteArray UAVObjectUtilManager::getBoardDescription ( )

Get the UAV Board Description, for anyone interested.

Definition at line 546 of file uavobjectutilmanager.cpp.

int UAVObjectUtilManager::getBoardModel ( )

Get the UAV Board model, for anyone interested. Return format is: (Board Type << 8) + BoardRevision.

NOTE: Should get deprecated as a public method now, in favour of getBoardType and subsequent board capability queries.

Definition at line 495 of file uavobjectutilmanager.cpp.

FirmwareIAPObj::DataFields UAVObjectUtilManager::getFirmwareIap ( )
protected

Helper function that makes sure FirmwareIAP is updated and then returns the data

Definition at line 476 of file uavobjectutilmanager.cpp.

QString deviceDescriptorStruct::idToBoardName ( quint16  id)
static

Get the name for a board via the plugin system.

Definition at line 43 of file devicedescriptorstruct.cpp.

QPixmap deviceDescriptorStruct::idToBoardPicture ( quint16  id)
static

Definition at line 58 of file devicedescriptorstruct.cpp.

QMap< QString, UAVObject::Metadata > UAVObjectUtilManager::readAllNonSettingsMetadata ( )

UAVObjectUtilManager::readAllNonSettingsMetadata Convenience function for calling readMetadata.

Returns
QMap containing list of all requested UAVO metaadata

Definition at line 295 of file uavobjectutilmanager.cpp.

QMap< QString, UAVObject::Metadata > UAVObjectUtilManager::readMetadata ( metadataSetEnum  metadataReadType)

UAVObjectUtilManager::readMetadata Get metadata for UAVOs.

Parameters
metadataReadTypeDefines if all UAVOs are read, only settings, or only data types
Returns
QMap containing list of all requested UAVO metaadata

Definition at line 306 of file uavobjectutilmanager.cpp.

bool UAVObjectUtilManager::resetMetadataToDefaults ( )

UAVObjectUtilManager::resetMetadata Resets all metadata to defaults (from XML definitions)

Returns

Definition at line 415 of file uavobjectutilmanager.cpp.

void UAVObjectUtilManager::saveObjectToFlash ( UAVObject obj)

UAVObjectUtilManager::saveObjectToSD Add a new object to save in the queue.

Parameters
objThis method only tells the remote end to save the object to its persistent storage (flash usually), but does not send the object over the telemetry link beforehand. It is therefore up to the programmer to make sure the object is in the right state on the remote end before calling this method - the "SmartSave" feature in the ConfigTaskWidget does this, for instance.

We need to manage a save queue, because once a save request is sent, we need to wait until we get an update from the remote end telling us whether the operation was successful. If we don't manage the queue, then we will end up sending save requests one after another and won't be able to monitor success or failure at all.

The objectPersistence UAVObject works as follows:

  • Set the ObjecID and InstanceID for the target object
  • Set the operation ('save' for instance)
  • Then update the object, which sends it over the telemetry link
  • Once the objectPersistence UAVO is updated, the board will in turn update it again, once the operation is completed. We need therefore to listen to updates on the objectPersistence object, and check the "Operation" field, which should be set to "completed", or "error".

Definition at line 111 of file uavobjectutilmanager.cpp.

bool UAVObjectUtilManager::setAllNonSettingsMetadata ( QMap< QString, UAVObject::Metadata >  metaDataList)

UAVObjectUtilManager::setAllNonSettingsMetadata Convenience function for calling setMetadata.

Parameters
metaDataListQMap containing list of all UAVO metaadata to be updated
Returns

Definition at line 347 of file uavobjectutilmanager.cpp.

bool UAVObjectUtilManager::setMetadata ( QMap< QString, UAVObject::Metadata >  metaDataSetList,
metadataSetEnum  metadataSetType 
)

UAVObjectUtilManager::setMetadata Sets the metadata for all metadata in QMap.

Parameters
metaDataSetListQMap containing list of all UAVO metaadata to be updated
metadataSetTypeControls if all metadata is updated, only settings metadata, or only dynamic data metadata
Returns

Definition at line 363 of file uavobjectutilmanager.cpp.

Variable Documentation

quint8 deviceDescriptorStruct::boardRevision

Definition at line 45 of file devicedescriptorstruct.h.

quint8 deviceDescriptorStruct::boardType

Definition at line 44 of file devicedescriptorstruct.h.

bool deviceDescriptorStruct::certified

Definition at line 49 of file devicedescriptorstruct.h.

QByteArray deviceDescriptorStruct::fwHash

Definition at line 42 of file devicedescriptorstruct.h.

QString deviceDescriptorStruct::gitDate

Definition at line 38 of file devicedescriptorstruct.h.

QString deviceDescriptorStruct::gitHash

Definition at line 37 of file devicedescriptorstruct.h.

QString deviceDescriptorStruct::gitTag

Definition at line 39 of file devicedescriptorstruct.h.

QString deviceDescriptorStruct::nextAncestor

Definition at line 41 of file devicedescriptorstruct.h.

QByteArray deviceDescriptorStruct::uavoHash

Definition at line 43 of file devicedescriptorstruct.h.

QString deviceDescriptorStruct::userDefined

Definition at line 40 of file devicedescriptorstruct.h.