dRonin
adbada4
dRonin GCS
|
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 |
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 () |
UAVMetaObject * | UAVDataObject::getMetaObject () |
virtual UAVDataObject * | UAVDataObject::clone (quint32 instID=0)=0 |
virtual UAVDataObject * | UAVDataObject::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) | |
UAVObject * | UAVMetaObject::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 () |
UAVObjectField * | UAVObject::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 () |
UAVObject * | UAVObjectManager::getObject (const QString &name, quint32 instId=0) |
UAVObject * | UAVObjectManager::getObject (quint32 objId, quint32 instId=0) |
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 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 () |
UAVDataObject * | clone (quint32 instID) |
UAVDataObject * | dirtyClone () |
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::IBoardType * | UAVObjectUtilManager::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) |
UAVObjectManager * | UAVObjectUtilManager::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... | |
UAVObject * | UAVObjectField::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 |
The UAVUObjects GCS plugin.
typedef QMap<quint32, UAVObject *> UAVObjectManager::ObjectMap |
Definition at line 53 of file uavobjectmanager.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.
bool UAVObjectField::checkValue | ( | const QVariant & | data, |
int | index = 0 |
||
) | const |
Definition at line 900 of file uavobjectfield.cpp.
|
protected |
Definition at line 623 of file uavobjectfield.cpp.
|
pure virtual |
UAVDataObject* clone | ( | quint32 | instID | ) |
|
protected |
Definition at line 66 of file uavobjectfield.cpp.
|
static |
Definition at line 668 of file uavobjectutilmanager.cpp.
|
pure virtual |
UAVDataObject* dirtyClone | ( | ) |
Emit the instanceRemoved event
Definition at line 351 of file uavobject.cpp.
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.
|
virtual |
Metadata 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.
index | The element to inspect |
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.
Definition at line 1064 of file uavobjectfield.cpp.
QString UAVObjectField::getDisplayPrefix | ( | ) | const |
Get the prefix for the preferred display format.
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.
name | Element name |
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
objName | Name of object |
fieldName | Name of field |
instId | Object instance (optional) |
Definition at line 307 of file uavobjectmanager.cpp.
UAVObjectField * UAVObject::getField | ( | const QString & | name | ) |
Get a specific field
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.
|
static |
Get the UAVObject metadata access member
[in] | metadata | The metadata object |
Definition at line 377 of file uavobject.cpp.
|
static |
Get the UAVObject metadata telemetry acked member
[in] | metadata | The metadata object |
Definition at line 417 of file uavobject.cpp.
|
static |
Get the UAVObject metadata telemetry update mode
[in] | metadata | The metadata object |
Definition at line 457 of file uavobject.cpp.
|
static |
Get the UAVObject metadata GCS access member
[in] | metadata | The metadata object |
Definition at line 397 of file uavobject.cpp.
QString UAVObjectUtilManager::getGcsHash | ( | ) |
Definition at line 739 of file uavobjectutilmanager.cpp.
|
static |
Get the UAVObject metadata GCS telemetry acked member
[in] | metadata | The metadata object |
Definition at line 437 of file uavobject.cpp.
|
static |
Get the UAVObject metadata GCS telemetry update mode
[in] | metadata | The metadata object |
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.
|
virtual |
Get the metadata of the metaobject
Implements UAVObject.
Definition at line 91 of file uavmetaobject.cpp.
|
virtual |
|
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
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
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
option | Option value |
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.
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.
|
protected |
Initialize objects' data fields
fields | List of fields held by the object |
data | Pointer to that actual object data, this is needed by the fields to access the data |
numBytes | Number 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.
index | The element to inspect |
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.
|
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.
|
static |
Initialize a default UAVObjMetadata object.
[in] | metadata | The 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
Definition at line 255 of file uavobject.cpp.
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 | ) |
|
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.
|
static |
Set the UAVObject metadata access member
[in] | metadata | The metadata object |
[in] | mode | The access mode |
Definition at line 387 of file uavobject.cpp.
|
static |
Set the UAVObject metadata telemetry acked member
[in] | metadata | The metadata object |
[in] | val | The telemetry acked boolean |
Definition at line 427 of file uavobject.cpp.
|
static |
Set the UAVObject metadata telemetry update mode member
[in] | metadata | The metadata object |
[in] | val | The telemetry update mode |
Definition at line 468 of file uavobject.cpp.
|
static |
Set the UAVObject metadata GCS access member
[in] | metadata | The metadata object |
[in] | mode | The access mode |
Definition at line 407 of file uavobject.cpp.
|
static |
Set the UAVObject metadata GCS telemetry acked member
[in] | metadata | The metadata object |
[in] | val | The GCS telemetry acked boolean |
Definition at line 447 of file uavobject.cpp.
|
static |
Set the UAVObject metadata GCS telemetry update mode member
[in] | metadata | The metadata object |
[in] | val | The 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.
|
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.
|
virtual |
|
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
objID | The object ID |
isSingleInst | True if this object can only have a single instance |
name | Object 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
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
obj | pointer to the object to unregister |
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.
|
protected |
Definition at line 250 of file uavobject.h.
DataFields data |
Definition at line 98 of file uavobjecttemplate.h.
|
protected |
Definition at line 252 of file uavobject.h.
|
protected |
Definition at line 249 of file uavobject.h.
|
protected |
Definition at line 253 of file uavobject.h.
|
protected |
Definition at line 246 of file uavobject.h.
|
protected |
Definition at line 247 of file uavobject.h.
|
protected |
Definition at line 248 of file uavobject.h.
|
protected |
Definition at line 251 of file uavobject.h.
|
protected |
Definition at line 245 of file uavobject.h.
|
signal |
instance removed from manager
obj |
objectUnpacked: triggered whenever an object is unpacked (i.e. arrives from the telemetry link)
obj |
Signal sent whenever any field of the object is updated.
obj | objectUpdated 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. |
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.
obj |
objectUpdatedManual: triggered only from the "updated" slot in uavobject The telemetry manager listens to this signal, and sends updates on the telemetry link.
obj |
objectUpdatedPeriodic: not used anywhere ?
obj |
|
signal |
|
signal |
|
signal |
transactionCompleted. Triggered by a call to emitTransactionCompleted - done in telemetry.cpp whenever a transaction finishes.
obj | |
success |
updateAllInstancesRequested
obj |
|
slot |
Request that this object is updated with the latest values from the autopilot
Definition at line 163 of file uavobject.cpp.
|
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.
|
slot |
Signal that the object has been updated
Definition at line 179 of file uavobject.cpp.
|
readwrite |
Definition at line 40 of file uavdataobject.h.