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

The UAVUObjects GCS plugin. More...

Namespaces

 uavobject
 

Classes

class  UAVDataObject
 
class  UAVMetaObject
 
class  UAVObject
 
class  UAVObjectField
 
class  UAVObjectManager
 
class  UAVObjectsPlugin
 
struct  __attribute__
 
class  UAVObjectUtilManager
 

Typedefs

typedef QMap< quint32,
UAVObject * > 
UAVObjectManager::ObjectMap
 

Enumerations

enum  UAVObject::UpdateMode { UAVObject::UPDATEMODE_MANUAL = 0, UAVObject::UPDATEMODE_PERIODIC = 1, UAVObject::UPDATEMODE_ONCHANGE = 2, UAVObject::UPDATEMODE_THROTTLED }
 
enum  UAVObject::AccessMode { UAVObject::ACCESS_READWRITE = 0, UAVObject::ACCESS_READONLY = 1 }
 
enum  UAVObjectUtilManager::metadataSetEnum { UAVObjectUtilManager::ALL_METADATA, UAVObjectUtilManager::SETTINGS_METADATA_ONLY, UAVObjectUtilManager::NONSETTINGS_METADATA_ONLY }
 

Functions

 UAVDataObject::UAVDataObject (quint32 objID, bool isSingleInst, bool isSet, const QString &name)
 
void UAVDataObject::initialize (quint32 instID, UAVMetaObject *mobj)
 
void UAVDataObject::initialize (UAVMetaObject *mobj)
 
bool UAVDataObject::isSettings ()
 
void UAVDataObject::setMetadata (const Metadata &mdata)
 
Metadata UAVDataObject::getMetadata ()
 
UAVMetaObjectUAVDataObject::getMetaObject ()
 
virtual UAVDataObjectUAVDataObject::clone (quint32 instID=0)=0
 
virtual UAVDataObjectUAVDataObject::dirtyClone ()=0
 
bool UAVDataObject::getIsPresentOnHardware () const
 
bool UAVDataObject::getPresenceKnown () const
 
void UAVDataObject::setReceived ()
 
bool UAVDataObject::getReceived ()
 
void UAVDataObject::setIsPresentOnHardware (bool value=true)
 
void UAVDataObject::resetIsPresentOnHardware ()
 
 UAVMetaObject::UAVMetaObject (quint32 objID, const QString &name, UAVObject *parent)
 
UAVObjectUAVMetaObject::getParentObject ()
 
void UAVMetaObject::setMetadata (const Metadata &mdata)
 
Metadata UAVMetaObject::getMetadata ()
 
Metadata UAVMetaObject::getDefaultMetadata ()
 
void UAVMetaObject::setData (const Metadata &mdata)
 
Metadata UAVMetaObject::getData ()
 
 UAVObject::PACK (typedef struct{quint8 flags;quint16 flightTelemetryUpdatePeriod;quint16 gcsTelemetryUpdatePeriod;quint16 loggingUpdatePeriod;}) Metadata
 
 UAVObject::UAVObject (quint32 objID, bool isSingleInst, const QString &name)
 
void UAVObject::initialize (quint32 instID)
 
quint32 UAVObject::getObjID ()
 
quint32 UAVObject::getInstID ()
 
bool UAVObject::isSingleInstance ()
 
QString UAVObject::getName ()
 
QString UAVObject::getDescription ()
 
quint32 UAVObject::getNumBytes ()
 
qint32 UAVObject::pack (quint8 *dataOut)
 
qint32 UAVObject::unpack (const quint8 *dataIn)
 
virtual void UAVObject::setMetadata (const Metadata &mdata)=0
 
virtual Metadata UAVObject::getMetadata ()=0
 
virtual Metadata UAVObject::getDefaultMetadata ()=0
 
qint32 UAVObject::getNumFields ()
 
QList< UAVObjectField * > UAVObject::getFields ()
 
UAVObjectFieldUAVObject::getField (const QString &name)
 
QString UAVObject::toString ()
 
QString UAVObject::toStringBrief ()
 
QString UAVObject::toStringData ()
 
QJsonObject UAVObject::getJsonRepresentation ()
 
void UAVObject::emitTransactionCompleted (bool success)
 
void UAVObject::emitTransactionCompleted (bool success, bool nacked)
 
void UAVObject::emitNewInstance (UAVObject *)
 
void UAVObject::emitInstanceRemoved (UAVObject *)
 
static void UAVObject::MetadataInitialize (Metadata &meta)
 
static AccessMode UAVObject::GetFlightAccess (const Metadata &meta)
 
static void UAVObject::SetFlightAccess (Metadata &meta, AccessMode mode)
 
static AccessMode UAVObject::GetGcsAccess (const Metadata &meta)
 
static void UAVObject::SetGcsAccess (Metadata &meta, AccessMode mode)
 
static quint8 UAVObject::GetFlightTelemetryAcked (const Metadata &meta)
 
static void UAVObject::SetFlightTelemetryAcked (Metadata &meta, quint8 val)
 
static quint8 UAVObject::GetGcsTelemetryAcked (const Metadata &meta)
 
static void UAVObject::SetGcsTelemetryAcked (Metadata &meta, quint8 val)
 
static UpdateMode UAVObject::GetFlightTelemetryUpdateMode (const Metadata &meta)
 
static void UAVObject::SetFlightTelemetryUpdateMode (Metadata &meta, UpdateMode val)
 
static UpdateMode UAVObject::GetGcsTelemetryUpdateMode (const Metadata &meta)
 
static void UAVObject::SetGcsTelemetryUpdateMode (Metadata &meta, UpdateMode val)
 
void UAVObject::initializeFields (QList< UAVObjectField * > &fields, quint8 *data, quint32 numBytes)
 
void UAVObject::setDescription (const QString &description)
 
 UAVObjectManager::UAVObjectManager ()
 
 UAVObjectManager::~UAVObjectManager ()
 
bool UAVObjectManager::registerObject (UAVDataObject *obj)
 
QVector< QVector< UAVObject * > > UAVObjectManager::getObjectsVector ()
 
QHash< quint32, QMap< quint32,
UAVObject * > > 
UAVObjectManager::getObjects ()
 
QVector< QVector
< UAVDataObject * > > 
UAVObjectManager::getDataObjectsVector ()
 
QVector< QVector
< UAVMetaObject * > > 
UAVObjectManager::getMetaObjectsVector ()
 
UAVObjectUAVObjectManager::getObject (const QString &name, quint32 instId=0)
 
UAVObjectUAVObjectManager::getObject (quint32 objId, quint32 instId=0)
 
UAVObjectFieldUAVObjectManager::getField (const QString &objName, const QString &fieldName, quint32 instId=0)
 getField Get a UAV Object field Success is asserted so there is no need to do this again in the caller More...
 
QVector< UAVObject * > UAVObjectManager::getObjectInstancesVector (const QString &name)
 
QVector< UAVObject * > UAVObjectManager::getObjectInstancesVector (quint32 objId)
 
qint32 UAVObjectManager::getNumInstances (const QString &name)
 
qint32 UAVObjectManager::getNumInstances (quint32 objId)
 
bool UAVObjectManager::unRegisterObject (UAVDataObject *obj)
 unregisters an object instance and all instances bigger than the one passed as argument from the manager More...
 
void UAVObjectsInitialize (UAVObjectManager *objMngr)
 
const QString(NAME) const
QString(NAME) const 
QHash< QString, QString > (NAME)
 
 void (NAME)
 
() NAME ()
 
DataFields getData ()
 
void setData (const DataFields &data)
 
Metadata getDefaultMetadata ()
 
UAVDataObjectclone (quint32 instID)
 
UAVDataObjectdirtyClone ()
 
 UAVObjectUtilManager::UAVObjectUtilManager ()
 
 UAVObjectUtilManager::~UAVObjectUtilManager ()
 
int UAVObjectUtilManager::setHomeLocation (double LLA[3], bool save_to_sdcard)
 
int UAVObjectUtilManager::getHomeLocation (bool &set, double LLA[3])
 
int UAVObjectUtilManager::getGPSPosition (double LLA[3])
 
Core::IBoardTypeUAVObjectUtilManager::getBoardType ()
 Get the IBoardType corresponding to the connected board. More...
 
quint32 UAVObjectUtilManager::getFirmwareCRC ()
 
bool UAVObjectUtilManager::getBoardDescriptionStruct (deviceDescriptorStruct &device)
 
static bool UAVObjectUtilManager::descriptionToStructure (QByteArray desc, deviceDescriptorStruct &struc)
 
UAVObjectManagerUAVObjectUtilManager::getObjectManager ()
 
int UAVObjectUtilManager::getBoardRevision ()
 Get the connected board hardware revision. More...
 
QString UAVObjectUtilManager::getFirmwareHash ()
 
QString UAVObjectUtilManager::getGcsHash ()
 
 UAVObjectField::UAVObjectField (const QString &name, const QString &units, FieldType type, int numElements, const QStringList &options, const QList< int > &indices, const QString &limits=QString(), const QString &description=QString(), const QList< QVariant > defaultValues=QList< QVariant >(), const DisplayType display=DEC)
 
 UAVObjectField::UAVObjectField (const QString &name, const QString &units, FieldType type, const QStringList &elementNames, const QStringList &options, const QList< int > &indices, const QString &limits=QString(), const QString &description=QString(), const QList< QVariant > defaultValues=QList< QVariant >(), const DisplayType display=DEC)
 
void UAVObjectField::constructorInitialize (const QString &name, const QString &units, FieldType type, const QStringList &elementNames, const QStringList &options, const QList< int > &indices, const QString &limits, const QString &description, const QList< QVariant > defaultValues, const DisplayType display)
 
void UAVObjectField::limitsInitialize (const QString &limits)
 
bool UAVObjectField::isWithinLimits (QVariant var, int index, int board=0) const
 
QVariant UAVObjectField::getMaxLimit (int index, int board=0) const
 
QVariant UAVObjectField::getMinLimit (int index, int board=0) const
 
void UAVObjectField::initialize (quint8 *data, quint32 dataOffset, UAVObject *obj)
 
FieldType UAVObjectField::getType () const
 
QString UAVObjectField::getTypeAsString () const
 
QStringList UAVObjectField::getElementNames () const
 
QString UAVObjectField::getElementName (int index=0) const
 
int UAVObjectField::getElementIndex (const QString &name) const
 Get the index of an element from it's name. More...
 
UAVObjectUAVObjectField::getObject () const
 
void UAVObjectField::clear ()
 
QString UAVObjectField::getName () const
 
QString UAVObjectField::getUnits () const
 
QStringList UAVObjectField::getOptions () const
 
bool UAVObjectField::hasOption (const QString &option)
 hasOption Check if the given option exists More...
 
int UAVObjectField::getNumElements () const
 
size_t UAVObjectField::getNumBytes () const
 
QString UAVObjectField::toString () const
 
qint32 UAVObjectField::pack (quint8 *dataOut)
 
qint32 UAVObjectField::unpack (const quint8 *dataIn)
 
bool UAVObjectField::isNumeric () const
 
bool UAVObjectField::isText () const
 
QVariant UAVObjectField::getValue (int index=0) const
 
bool UAVObjectField::checkValue (const QVariant &data, int index=0) const
 
void UAVObjectField::setValue (const QVariant &data, int index=0)
 
double UAVObjectField::getDouble (int index=0) const
 
void UAVObjectField::setDouble (double value, int index=0)
 
QString UAVObjectField::getDescription () const
 
QVariant UAVObjectField::getDefaultValue (int index=0) const
 Get the default value (defined in the UAVO def) for the element. More...
 
bool UAVObjectField::isDefaultValue (int index=0)
 Check if the element is set to default value. More...
 
int UAVObjectField::getDisplayIntegerBase () const
 Get the preferred integer base for this field. More...
 
QString UAVObjectField::getDisplayPrefix () const
 Get the prefix for the preferred display format. More...
 

Variables

quint32 UAVObject::objID
 
quint32 UAVObject::instID
 
bool UAVObject::isSingleInst
 
QString UAVObject::name
 
QString UAVObject::description
 
QString UAVObject::category
 
quint32 UAVObject::numBytes
 
quint8 * UAVObject::data
 
QList< UAVObjectField * > UAVObject::fields
 
DataFields data
 

Signals

void UAVDataObject::presentOnHardwareChanged (UAVDataObject *)
 
void UAVDataObject::presentOnHardwareChanged (bool present)
 
void UAVObject::objectUpdated (UAVObject *obj)
 Signal sent whenever any field of the object is updated. More...
 
void UAVObject::objectUpdatedAuto (UAVObject *obj)
 objectUpdatedAuto: triggered on "setData" only (Object data updated by changing the data structure) More...
 
void UAVObject::objectUpdatedManual (UAVObject *obj)
 objectUpdatedManual: triggered only from the "updated" slot in uavobject The telemetry manager listens to this signal, and sends updates on the telemetry link. More...
 
void UAVObject::objectUpdatedPeriodic (UAVObject *obj)
 objectUpdatedPeriodic: not used anywhere ? More...
 
void UAVObject::objectUnpacked (UAVObject *obj)
 objectUnpacked: triggered whenever an object is unpacked (i.e. arrives from the telemetry link) More...
 
void UAVObject::updateRequested (UAVObject *obj)
 updateRequested More...
 
void UAVObject::updateAllInstancesRequested (UAVObject *obj)
 updateAllInstancesRequested More...
 
void UAVObject::transactionCompleted (UAVObject *obj, bool success)
 transactionCompleted. Triggered by a call to emitTransactionCompleted - done in telemetry.cpp whenever a transaction finishes. More...
 
void UAVObject::transactionCompleted (UAVObject *obj, bool success, bool nack)
 
void UAVObject::newInstance (UAVObject *obj)
 newInstance More...
 
void UAVObject::instanceRemoved (UAVObject *obj)
 instance removed from manager More...
 
void UAVObjectManager::newObject (UAVObject *obj)
 
void UAVObjectManager::newInstance (UAVObject *obj)
 
void UAVObjectManager::instanceRemoved (UAVObject *obj)
 
void UAVObjectUtilManager::saveCompleted (int objectID, bool status)
 
void UAVObjectUtilManager::completedMetadataWrite (bool)
 

Public Slots

void UAVObject::requestUpdate ()
 
void UAVObject::requestUpdateAllInstances ()
 
void UAVObject::updated ()
 

Properties

bool UAVDataObject::isPresentOnHardware
 

Detailed Description

The UAVUObjects GCS plugin.

Note
This is an automatically generated file. DO NOT modify manually.
Object definition file: . This is an automatically generated file. DO NOT modify manually.

Typedef Documentation

typedef QMap<quint32, UAVObject *> UAVObjectManager::ObjectMap

Definition at line 53 of file uavobjectmanager.h.

Enumeration Type Documentation

Access mode

Enumerator
ACCESS_READWRITE 
ACCESS_READONLY 

Definition at line 84 of file uavobject.h.

Enumerator
ALL_METADATA 
SETTINGS_METADATA_ONLY 
NONSETTINGS_METADATA_ONLY 

Definition at line 57 of file uavobjectutilmanager.h.

Object update mode

Enumerator
UPDATEMODE_MANUAL 
UPDATEMODE_PERIODIC 

Manually update object, by calling the updated() function

UPDATEMODE_ONCHANGE 

Automatically update object at periodic intervals

UPDATEMODE_THROTTLED 

Only update object when its data changes

Definition at line 73 of file uavobject.h.

Function Documentation

bool UAVObjectField::checkValue ( const QVariant &  data,
int  index = 0 
) const

Definition at line 900 of file uavobjectfield.cpp.

void UAVObjectField::clear ( )
protected

Definition at line 623 of file uavobjectfield.cpp.

virtual UAVDataObject* UAVDataObject::clone ( quint32  instID = 0)
pure virtual
UAVDataObject* clone ( quint32  instID)
void UAVObjectField::constructorInitialize ( const QString &  name,
const QString &  units,
FieldType  type,
const QStringList &  elementNames,
const QStringList &  options,
const QList< int > &  indices,
const QString &  limits,
const QString &  description,
const QList< QVariant >  defaultValues,
const DisplayType  display 
)
protected

Definition at line 66 of file uavobjectfield.cpp.

bool UAVObjectUtilManager::descriptionToStructure ( QByteArray  desc,
deviceDescriptorStruct struc 
)
static

Definition at line 668 of file uavobjectutilmanager.cpp.

virtual UAVDataObject* UAVDataObject::dirtyClone ( )
pure virtual
UAVDataObject* dirtyClone ( )
void UAVObject::emitInstanceRemoved ( UAVObject obj)

Emit the instanceRemoved event

Definition at line 351 of file uavobject.cpp.

void UAVObject::emitNewInstance ( UAVObject obj)

Emit the newInstance event

Definition at line 343 of file uavobject.cpp.

void UAVObject::emitTransactionCompleted ( bool  success)

(overloaded) Emit the transactionCompleted event (used by the UAVTalk plugin)

Definition at line 327 of file uavobject.cpp.

void UAVObject::emitTransactionCompleted ( bool  success,
bool  nacked 
)

(overloaded) Emit the transactionCompletedNack event

Definition at line 335 of file uavobject.cpp.

bool UAVObjectUtilManager::getBoardDescriptionStruct ( deviceDescriptorStruct device)

Definition at line 662 of file uavobjectutilmanager.cpp.

int UAVObjectUtilManager::getBoardRevision ( )

Get the connected board hardware revision.

Definition at line 504 of file uavobjectutilmanager.cpp.

Core::IBoardType * UAVObjectUtilManager::getBoardType ( )

Get the IBoardType corresponding to the connected board.

Definition at line 512 of file uavobjectutilmanager.cpp.

UAVObject::Metadata UAVMetaObject::getData ( )

Get the metadata held by the metaobject

Definition at line 117 of file uavmetaobject.cpp.

DataFields getData ( )
QVector< QVector< UAVDataObject * > > UAVObjectManager::getDataObjectsVector ( )

Same as getObjects() but will only return DataObjects.

Definition at line 172 of file uavobjectmanager.cpp.

UAVObject::Metadata UAVMetaObject::getDefaultMetadata ( )
virtual

Get the default metadata

Implements UAVObject.

Definition at line 99 of file uavmetaobject.cpp.

Metadata getDefaultMetadata ( )
virtual Metadata UAVObject::getDefaultMetadata ( )
pure virtual

Implemented in UAVMetaObject.

QVariant UAVObjectField::getDefaultValue ( int  index = 0) const

Get the default value (defined in the UAVO def) for the element.

Parameters
indexThe element to inspect
Returns
QVariant containing the default value

Definition at line 1024 of file uavobjectfield.cpp.

QString UAVObjectField::getDescription ( ) const

Definition at line 1019 of file uavobjectfield.cpp.

QString UAVObject::getDescription ( )

Get the description of the object

Definition at line 139 of file uavobject.cpp.

int UAVObjectField::getDisplayIntegerBase ( ) const

Get the preferred integer base for this field.

Returns
Preferred base

Definition at line 1064 of file uavobjectfield.cpp.

QString UAVObjectField::getDisplayPrefix ( ) const

Get the prefix for the preferred display format.

Returns
"0x" for hex, "0b" for binary etc.

Definition at line 1078 of file uavobjectfield.cpp.

double UAVObjectField::getDouble ( int  index = 0) const

Definition at line 1009 of file uavobjectfield.cpp.

int UAVObjectField::getElementIndex ( const QString &  name) const

Get the index of an element from it's name.

Parameters
nameElement name
Returns
index on success, -1 on failure

Definition at line 609 of file uavobjectfield.cpp.

QString UAVObjectField::getElementName ( int  index = 0) const

Definition at line 594 of file uavobjectfield.cpp.

QStringList UAVObjectField::getElementNames ( ) const

Definition at line 589 of file uavobjectfield.cpp.

UAVObjectField * UAVObjectManager::getField ( const QString &  objName,
const QString &  fieldName,
quint32  instId = 0 
)

getField Get a UAV Object field Success is asserted so there is no need to do this again in the caller

Parameters
objNameName of object
fieldNameName of field
instIdObject instance (optional)
Returns
The field if successful, null pointer otherwise

Definition at line 307 of file uavobjectmanager.cpp.

UAVObjectField * UAVObject::getField ( const QString &  name)

Get a specific field

Returns
The field or NULL if not found

Definition at line 236 of file uavobject.cpp.

QList< UAVObjectField * > UAVObject::getFields ( )

Get the object's fields

Definition at line 196 of file uavobject.cpp.

quint32 UAVObjectUtilManager::getFirmwareCRC ( )

Definition at line 537 of file uavobjectutilmanager.cpp.

QString UAVObjectUtilManager::getFirmwareHash ( )

Definition at line 731 of file uavobjectutilmanager.cpp.

UAVObject::AccessMode UAVObject::GetFlightAccess ( const Metadata &  meta)
static

Get the UAVObject metadata access member

Parameters
[in]metadataThe metadata object
Returns
the access type

Definition at line 377 of file uavobject.cpp.

quint8 UAVObject::GetFlightTelemetryAcked ( const Metadata &  meta)
static

Get the UAVObject metadata telemetry acked member

Parameters
[in]metadataThe metadata object
Returns
the telemetry acked boolean

Definition at line 417 of file uavobject.cpp.

UAVObject::UpdateMode UAVObject::GetFlightTelemetryUpdateMode ( const Metadata &  meta)
static

Get the UAVObject metadata telemetry update mode

Parameters
[in]metadataThe metadata object
Returns
the telemetry update mode

Definition at line 457 of file uavobject.cpp.

UAVObject::AccessMode UAVObject::GetGcsAccess ( const Metadata &  meta)
static

Get the UAVObject metadata GCS access member

Parameters
[in]metadataThe metadata object
Returns
the GCS access type

Definition at line 397 of file uavobject.cpp.

QString UAVObjectUtilManager::getGcsHash ( )

Definition at line 739 of file uavobjectutilmanager.cpp.

quint8 UAVObject::GetGcsTelemetryAcked ( const Metadata &  meta)
static

Get the UAVObject metadata GCS telemetry acked member

Parameters
[in]metadataThe metadata object
Returns
the telemetry acked boolean

Definition at line 437 of file uavobject.cpp.

UAVObject::UpdateMode UAVObject::GetGcsTelemetryUpdateMode ( const Metadata &  meta)
static

Get the UAVObject metadata GCS telemetry update mode

Parameters
[in]metadataThe metadata object
Returns
the GCS telemetry update mode

Definition at line 479 of file uavobject.cpp.

int UAVObjectUtilManager::getGPSPosition ( double  LLA[3])

Definition at line 631 of file uavobjectutilmanager.cpp.

int UAVObjectUtilManager::getHomeLocation ( bool &  set,
double  LLA[3] 
)

Definition at line 595 of file uavobjectutilmanager.cpp.

quint32 UAVObject::getInstID ( )

Get the instance ID

Definition at line 115 of file uavobject.cpp.

bool UAVDataObject::getIsPresentOnHardware ( ) const

Definition at line 112 of file uavdataobject.cpp.

QJsonObject UAVObject::getJsonRepresentation ( )

Get the JSON representation of the object

Definition at line 204 of file uavobject.cpp.

QVariant UAVObjectField::getMaxLimit ( int  index,
int  board = 0 
) const

Definition at line 450 of file uavobjectfield.cpp.

UAVObject::Metadata UAVMetaObject::getMetadata ( void  )
virtual

Get the metadata of the metaobject

Implements UAVObject.

Definition at line 91 of file uavmetaobject.cpp.

UAVObject::Metadata UAVDataObject::getMetadata ( void  )
virtual

Get the object's metadata

Implements UAVObject.

Definition at line 90 of file uavdataobject.cpp.

virtual Metadata UAVObject::getMetadata ( )
pure virtual

Implemented in UAVDataObject, and UAVMetaObject.

UAVMetaObject * UAVDataObject::getMetaObject ( )

Get the metaobject

Definition at line 102 of file uavdataobject.cpp.

QVector< QVector< UAVMetaObject * > > UAVObjectManager::getMetaObjectsVector ( )

Same as getObjects() but will only return MetaObjects.

Definition at line 193 of file uavobjectmanager.cpp.

QVariant UAVObjectField::getMinLimit ( int  index,
int  board = 0 
) const

Definition at line 500 of file uavobjectfield.cpp.

QString UAVObjectField::getName ( ) const

Definition at line 635 of file uavobjectfield.cpp.

QString UAVObject::getName ( )

Get the name of the object

Definition at line 131 of file uavobject.cpp.

size_t UAVObjectField::getNumBytes ( ) const

Definition at line 660 of file uavobjectfield.cpp.

quint32 UAVObject::getNumBytes ( )

Get the total number of bytes of the object's data

Definition at line 155 of file uavobject.cpp.

int UAVObjectField::getNumElements ( ) const

Definition at line 655 of file uavobjectfield.cpp.

qint32 UAVObject::getNumFields ( )

Get the number of fields held by this object

Definition at line 188 of file uavobject.cpp.

qint32 UAVObjectManager::getNumInstances ( const QString &  name)

Get the number of instances for an object given its name

Definition at line 279 of file uavobjectmanager.cpp.

qint32 UAVObjectManager::getNumInstances ( quint32  objId)

Get the number of instances for an object given its ID

Definition at line 287 of file uavobjectmanager.cpp.

UAVObject * UAVObjectManager::getObject ( const QString &  name,
quint32  instId = 0 
)

Get a specific object given its name and instance ID

Returns
The object is found or NULL if not

Definition at line 215 of file uavobjectmanager.cpp.

UAVObject * UAVObjectManager::getObject ( quint32  objId,
quint32  instId = 0 
)

Get a specific object given its object and instance ID

Returns
The object is found or NULL if not

Definition at line 224 of file uavobjectmanager.cpp.

UAVObject * UAVObjectField::getObject ( ) const

Definition at line 618 of file uavobjectfield.cpp.

QVector< UAVObject * > UAVObjectManager::getObjectInstancesVector ( const QString &  name)

Get all the instances of the object specified by name

Definition at line 248 of file uavobjectmanager.cpp.

QVector< UAVObject * > UAVObjectManager::getObjectInstancesVector ( quint32  objId)

Get all the instances of the object specified by its ID

Definition at line 256 of file uavobjectmanager.cpp.

UAVObjectManager * UAVObjectUtilManager::getObjectManager ( )

Definition at line 78 of file uavobjectutilmanager.cpp.

QHash< quint32, QMap< quint32, UAVObject * > > UAVObjectManager::getObjects ( )

Definition at line 164 of file uavobjectmanager.cpp.

QVector< QVector< UAVObject * > > UAVObjectManager::getObjectsVector ( )

Get all objects. A two dimentional QVector is returned. Objects are grouped by instances of the same object type.

Definition at line 154 of file uavobjectmanager.cpp.

quint32 UAVObject::getObjID ( )

Get the object ID

Definition at line 107 of file uavobject.cpp.

QStringList UAVObjectField::getOptions ( ) const

Definition at line 645 of file uavobjectfield.cpp.

UAVObject * UAVMetaObject::getParentObject ( )

Get the parent object

Definition at line 73 of file uavmetaobject.cpp.

bool UAVDataObject::getPresenceKnown ( ) const

Definition at line 107 of file uavdataobject.cpp.

bool UAVDataObject::getReceived ( )

Definition at line 130 of file uavdataobject.cpp.

UAVObjectField::FieldType UAVObjectField::getType ( ) const

Definition at line 556 of file uavobjectfield.cpp.

QString UAVObjectField::getTypeAsString ( ) const

Definition at line 561 of file uavobjectfield.cpp.

QString UAVObjectField::getUnits ( ) const

Definition at line 640 of file uavobjectfield.cpp.

QVariant UAVObjectField::getValue ( int  index = 0) const

Definition at line 850 of file uavobjectfield.cpp.

bool UAVObjectField::hasOption ( const QString &  option)

hasOption Check if the given option exists

Parameters
optionOption value
Returns
true if option exists, false otherwise

Definition at line 650 of file uavobjectfield.cpp.

void UAVDataObject::initialize ( quint32  instID,
UAVMetaObject mobj 
)

Initialize instance ID and assign a metaobject

Definition at line 55 of file uavdataobject.cpp.

void UAVDataObject::initialize ( UAVMetaObject mobj)

Assign a metaobject

Definition at line 64 of file uavdataobject.cpp.

void UAVObjectField::initialize ( quint8 *  data,
quint32  dataOffset,
UAVObject obj 
)

Definition at line 548 of file uavobjectfield.cpp.

void UAVObject::initialize ( quint32  instID)

Initialize object with its instance ID

Definition at line 71 of file uavobject.cpp.

void UAVObject::initializeFields ( QList< UAVObjectField * > &  fields,
quint8 *  data,
quint32  numBytes 
)
protected

Initialize objects' data fields

Parameters
fieldsList of fields held by the object
dataPointer to that actual object data, this is needed by the fields to access the data
numBytesNumber of bytes in the object (total, including all fields)

Definition at line 82 of file uavobject.cpp.

bool UAVObjectField::isDefaultValue ( int  index = 0)

Check if the element is set to default value.

Parameters
indexThe element to inspect
Returns
true if set to default

Definition at line 1029 of file uavobjectfield.cpp.

bool UAVObjectField::isNumeric ( ) const

Definition at line 812 of file uavobjectfield.cpp.

bool UAVDataObject::isSettings ( )

Returns true if this is a data object holding module settings

Definition at line 72 of file uavdataobject.cpp.

bool UAVObject::isSingleInstance ( )

Returns true if this is a single instance object

Definition at line 123 of file uavobject.cpp.

bool UAVObjectField::isText ( ) const

Definition at line 831 of file uavobjectfield.cpp.

bool UAVObjectField::isWithinLimits ( QVariant  var,
int  index,
int  board = 0 
) const

Definition at line 228 of file uavobjectfield.cpp.

void UAVObjectField::limitsInitialize ( const QString &  limits)
protected

format (TY)->type (EQ-equal;NE-not equal;BE-between;BI-bigger;SM-smaller) (VALX)->value TY:VAL1:VAL2:VAL3,TY,VAL1,VAL2,VAL3 example: first element bigger than 3 and second element inside [2.3,5] "%BI:3,%BE:2.3:5"

Definition at line 134 of file uavobjectfield.cpp.

void UAVObject::MetadataInitialize ( Metadata &  meta)
static

Initialize a default UAVObjMetadata object.

Parameters
[in]metadataThe metadata object

Definition at line 360 of file uavobject.cpp.

() NAME ( )
qint32 UAVObjectField::pack ( quint8 *  dataOut)

Definition at line 682 of file uavobjectfield.cpp.

UAVObject::PACK ( typedef struct{quint8 flags;quint16 flightTelemetryUpdatePeriod;quint16 gcsTelemetryUpdatePeriod;quint16 loggingUpdatePeriod;}  )

Object metadata, each object has a meta object that holds its metadata. The metadata define properties for each object and can be used by multiple modules (e.g. telemetry and logger)

The object metadata flags are packed into a single 16 bit integer. The bits in the flag field are defined as:

Bit(s) Name Meaning


0 access Defines the access level for the local transactions (readonly=0 and readwrite=1) 1 gcsAccess Defines the access level for the local GCS transactions (readonly=0 and readwrite=1), not used in the flight s/w 2 telemetryAcked Defines if an ack is required for the transactions of this object (1:acked, 0:not acked) 3 gcsTelemetryAcked Defines if an ack is required for the transactions of this object (1:acked, 0:not acked) 4-5 telemetryUpdateMode Update mode used by the telemetry module (UAVObjUpdateMode) 6-7 gcsTelemetryUpdateMode Update mode used by the GCS (UAVObjUpdateMode)

qint32 UAVObject::pack ( quint8 *  dataOut)

Pack the object data into a byte array

Returns
The number of bytes copied

Definition at line 255 of file uavobject.cpp.

const QString (NAME) const QString (NAME) const QHash< QString, QString > ( NAME  ,
NAME   
)

Constructor

Definition at line 49 of file uavobjecttemplate.cpp.

bool UAVObjectManager::registerObject ( UAVDataObject obj)

Register an object with the manager. This function must be called for all newly created instances. A new instance can be created directly by instantiating a new object or by calling clone() of an existing object. The object will be registered and will be properly initialized so that it can accept updates.

Definition at line 56 of file uavobjectmanager.cpp.

void UAVDataObject::resetIsPresentOnHardware ( )

Definition at line 151 of file uavdataobject.cpp.

void UAVMetaObject::setData ( const Metadata &  mdata)

Set the metadata held by the metaobject

Definition at line 107 of file uavmetaobject.cpp.

void setData ( const DataFields &  data)
void UAVObject::setDescription ( const QString &  description)
protected

Set the description of the object

Definition at line 147 of file uavobject.cpp.

void UAVObjectField::setDouble ( double  value,
int  index = 0 
)

Definition at line 1014 of file uavobjectfield.cpp.

void UAVObject::SetFlightAccess ( Metadata &  meta,
AccessMode  mode 
)
static

Set the UAVObject metadata access member

Parameters
[in]metadataThe metadata object
[in]modeThe access mode

Definition at line 387 of file uavobject.cpp.

void UAVObject::SetFlightTelemetryAcked ( Metadata &  meta,
quint8  val 
)
static

Set the UAVObject metadata telemetry acked member

Parameters
[in]metadataThe metadata object
[in]valThe telemetry acked boolean

Definition at line 427 of file uavobject.cpp.

void UAVObject::SetFlightTelemetryUpdateMode ( Metadata &  meta,
UpdateMode  val 
)
static

Set the UAVObject metadata telemetry update mode member

Parameters
[in]metadataThe metadata object
[in]valThe telemetry update mode

Definition at line 468 of file uavobject.cpp.

void UAVObject::SetGcsAccess ( Metadata &  meta,
AccessMode  mode 
)
static

Set the UAVObject metadata GCS access member

Parameters
[in]metadataThe metadata object
[in]modeThe access mode

Definition at line 407 of file uavobject.cpp.

void UAVObject::SetGcsTelemetryAcked ( Metadata &  meta,
quint8  val 
)
static

Set the UAVObject metadata GCS telemetry acked member

Parameters
[in]metadataThe metadata object
[in]valThe GCS telemetry acked boolean

Definition at line 447 of file uavobject.cpp.

void UAVObject::SetGcsTelemetryUpdateMode ( Metadata &  meta,
UpdateMode  val 
)
static

Set the UAVObject metadata GCS telemetry update mode member

Parameters
[in]metadataThe metadata object
[in]valThe GCS telemetry update mode

Definition at line 490 of file uavobject.cpp.

int UAVObjectUtilManager::setHomeLocation ( double  LLA[3],
bool  save_to_sdcard 
)

Definition at line 560 of file uavobjectutilmanager.cpp.

void UAVDataObject::setIsPresentOnHardware ( bool  value = true)

Definition at line 135 of file uavdataobject.cpp.

void UAVMetaObject::setMetadata ( const Metadata &  mdata)
virtual

Set the metadata of the metaobject, this function will do nothing since metaobjects have read-only metadata.

Implements UAVObject.

Definition at line 82 of file uavmetaobject.cpp.

void UAVDataObject::setMetadata ( const Metadata &  mdata)
virtual

Set the object's metadata

Implements UAVObject.

Definition at line 80 of file uavdataobject.cpp.

virtual void UAVObject::setMetadata ( const Metadata &  mdata)
pure virtual

Implemented in UAVDataObject, and UAVMetaObject.

void UAVDataObject::setReceived ( )

Definition at line 118 of file uavdataobject.cpp.

void UAVObjectField::setValue ( const QVariant &  data,
int  index = 0 
)

Definition at line 936 of file uavobjectfield.cpp.

QString UAVObjectField::toString ( ) const

Definition at line 667 of file uavobjectfield.cpp.

QString UAVObject::toString ( )

Return a string with the object information

Definition at line 287 of file uavobject.cpp.

QString UAVObject::toStringBrief ( )

Return a string with the object information (only the header)

Definition at line 298 of file uavobject.cpp.

QString UAVObject::toStringData ( )

Return a string with the object information (only the data)

Definition at line 313 of file uavobject.cpp.

UAVDataObject::UAVDataObject ( quint32  objID,
bool  isSingleInst,
bool  isSet,
const QString &  name 
)

Constructor

Definition at line 41 of file uavdataobject.cpp.

UAVMetaObject::UAVMetaObject ( quint32  objID,
const QString &  name,
UAVObject parent 
)

Constructor

Definition at line 41 of file uavmetaobject.cpp.

UAVObject::UAVObject ( quint32  objID,
bool  isSingleInst,
const QString &  name 
)

Constructor

Parameters
objIDThe object ID
isSingleInstTrue if this object can only have a single instance
nameObject name

Definition at line 60 of file uavobject.cpp.

UAVObjectField::UAVObjectField ( const QString &  name,
const QString &  units,
FieldType  type,
int  numElements,
const QStringList &  options,
const QList< int > &  indices,
const QString &  limits = QString(),
const QString &  description = QString(),
const QList< QVariant >  defaultValues = QList<QVariant>(),
const DisplayType  display = DEC 
)

Definition at line 40 of file uavobjectfield.cpp.

UAVObjectField::UAVObjectField ( const QString &  name,
const QString &  units,
FieldType  type,
const QStringList &  elementNames,
const QStringList &  options,
const QList< int > &  indices,
const QString &  limits = QString(),
const QString &  description = QString(),
const QList< QVariant >  defaultValues = QList<QVariant>(),
const DisplayType  display = DEC 
)

Definition at line 56 of file uavobjectfield.cpp.

UAVObjectManager::UAVObjectManager ( )

Constructor

Definition at line 40 of file uavobjectmanager.cpp.

OBJINC void UAVObjectsInitialize ( UAVObjectManager objMngr)

Function used to initialize the first instance of each object. This file is automatically updated by the UAVObjectGenerator.

Definition at line 39 of file uavobjectsinittemplate.cpp.

UAVObjectUtilManager::UAVObjectUtilManager ( )

Definition at line 57 of file uavobjectutilmanager.cpp.

qint32 UAVObjectField::unpack ( const quint8 *  dataIn)

Definition at line 747 of file uavobjectfield.cpp.

qint32 UAVObject::unpack ( const quint8 *  dataIn)

Unpack the object data from a byte array

Returns
The number of bytes copied

Definition at line 270 of file uavobject.cpp.

bool UAVObjectManager::unRegisterObject ( UAVDataObject obj)

unregisters an object instance and all instances bigger than the one passed as argument from the manager

Parameters
objpointer to the object to unregister
Returns
false if object is single instance

Definition at line 122 of file uavobjectmanager.cpp.

void ( NAME  )

Initialize object fields with the default values. If a default value is not specified the object fields will be initialized to zero.

Set the object data fields

Definition at line 88 of file uavobjecttemplate.cpp.

UAVObjectManager::~UAVObjectManager ( )

Definition at line 44 of file uavobjectmanager.cpp.

UAVObjectUtilManager::~UAVObjectUtilManager ( )

Definition at line 73 of file uavobjectutilmanager.cpp.

Variable Documentation

QString UAVObject::category
protected

Definition at line 250 of file uavobject.h.

DataFields data

Definition at line 98 of file uavobjecttemplate.h.

quint8* UAVObject::data
protected

Definition at line 252 of file uavobject.h.

QString UAVObject::description
protected

Definition at line 249 of file uavobject.h.

QList<UAVObjectField *> UAVObject::fields
protected

Definition at line 253 of file uavobject.h.

quint32 UAVObject::instID
protected

Definition at line 246 of file uavobject.h.

bool UAVObject::isSingleInst
protected

Definition at line 247 of file uavobject.h.

QString UAVObject::name
protected

Definition at line 248 of file uavobject.h.

quint32 UAVObject::numBytes
protected

Definition at line 251 of file uavobject.h.

quint32 UAVObject::objID
protected

Definition at line 245 of file uavobject.h.

Signals

void UAVObjectUtilManager::completedMetadataWrite ( bool  )
signal
void UAVObjectManager::instanceRemoved ( UAVObject obj)
signal
void UAVObject::instanceRemoved ( UAVObject obj)
signal

instance removed from manager

Parameters
obj
void UAVObjectManager::newInstance ( UAVObject obj)
signal
void UAVObject::newInstance ( UAVObject obj)
signal

newInstance

Parameters
obj
void UAVObjectManager::newObject ( UAVObject obj)
signal
void UAVObject::objectUnpacked ( UAVObject obj)
signal

objectUnpacked: triggered whenever an object is unpacked (i.e. arrives from the telemetry link)

Parameters
obj
void UAVObject::objectUpdated ( UAVObject obj)
signal

Signal sent whenever any field of the object is updated.

Parameters
objobjectUpdated is emitted either when a field is updated (setData), or when an "unpack" event happens, i.e. an update coming from the telemetry link. Note that objects also send signals specific to all their fields separately as well.
void UAVObject::objectUpdatedAuto ( UAVObject obj)
signal

objectUpdatedAuto: triggered on "setData" only (Object data updated by changing the data structure)

The telemetry manager listens to this signal, and sends updates on the telemetry link.

Parameters
obj
void UAVObject::objectUpdatedManual ( UAVObject obj)
signal

objectUpdatedManual: triggered only from the "updated" slot in uavobject The telemetry manager listens to this signal, and sends updates on the telemetry link.

Parameters
obj
void UAVObject::objectUpdatedPeriodic ( UAVObject obj)
signal

objectUpdatedPeriodic: not used anywhere ?

Parameters
obj
void UAVDataObject::presentOnHardwareChanged ( UAVDataObject )
signal
void UAVDataObject::presentOnHardwareChanged ( bool  present)
signal
void UAVObjectUtilManager::saveCompleted ( int  objectID,
bool  status 
)
signal
void UAVObject::transactionCompleted ( UAVObject obj,
bool  success 
)
signal

transactionCompleted. Triggered by a call to emitTransactionCompleted - done in telemetry.cpp whenever a transaction finishes.

Parameters
obj
success
void UAVObject::transactionCompleted ( UAVObject obj,
bool  success,
bool  nack 
)
signal
void UAVObject::updateAllInstancesRequested ( UAVObject obj)
signal

updateAllInstancesRequested

Parameters
obj
void UAVObject::updateRequested ( UAVObject obj)
signal

updateRequested

Parameters
obj

Public Slots

void UAVObject::requestUpdate ( )
slot

Request that this object is updated with the latest values from the autopilot

Definition at line 163 of file uavobject.cpp.

void UAVObject::requestUpdateAllInstances ( )
slot

Request that this object and all it's instances updated with the latest values from the autopilot

Definition at line 171 of file uavobject.cpp.

void UAVObject::updated ( )
slot

Signal that the object has been updated

Definition at line 179 of file uavobject.cpp.

Properties

bool UAVDataObject::isPresentOnHardware
readwrite

Definition at line 40 of file uavdataobject.h.