dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
UAVObject Class Referenceabstract

#include <uavobject.h>

Inheritance diagram for UAVObject:
UAVDataObject UAVMetaObject

Public Types

enum  UpdateMode { UPDATEMODE_MANUAL = 0, UPDATEMODE_PERIODIC = 1, UPDATEMODE_ONCHANGE = 2, UPDATEMODE_THROTTLED }
 
enum  AccessMode { ACCESS_READWRITE = 0, ACCESS_READONLY = 1 }
 

Public Slots

void requestUpdate ()
 
void requestUpdateAllInstances ()
 
void updated ()
 

Signals

void objectUpdated (UAVObject *obj)
 Signal sent whenever any field of the object is updated. More...
 
void objectUpdatedAuto (UAVObject *obj)
 objectUpdatedAuto: triggered on "setData" only (Object data updated by changing the data structure) More...
 
void 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 objectUpdatedPeriodic (UAVObject *obj)
 objectUpdatedPeriodic: not used anywhere ? More...
 
void objectUnpacked (UAVObject *obj)
 objectUnpacked: triggered whenever an object is unpacked (i.e. arrives from the telemetry link) More...
 
void updateRequested (UAVObject *obj)
 updateRequested More...
 
void updateAllInstancesRequested (UAVObject *obj)
 updateAllInstancesRequested More...
 
void transactionCompleted (UAVObject *obj, bool success)
 transactionCompleted. Triggered by a call to emitTransactionCompleted - done in telemetry.cpp whenever a transaction finishes. More...
 
void transactionCompleted (UAVObject *obj, bool success, bool nack)
 
void newInstance (UAVObject *obj)
 newInstance More...
 
void instanceRemoved (UAVObject *obj)
 instance removed from manager More...
 

Public Member Functions

 PACK (typedef struct{quint8 flags;quint16 flightTelemetryUpdatePeriod;quint16 gcsTelemetryUpdatePeriod;quint16 loggingUpdatePeriod;}) Metadata
 
 UAVObject (quint32 objID, bool isSingleInst, const QString &name)
 
void initialize (quint32 instID)
 
quint32 getObjID ()
 
quint32 getInstID ()
 
bool isSingleInstance ()
 
QString getName ()
 
QString getDescription ()
 
quint32 getNumBytes ()
 
qint32 pack (quint8 *dataOut)
 
qint32 unpack (const quint8 *dataIn)
 
virtual void setMetadata (const Metadata &mdata)=0
 
virtual Metadata getMetadata ()=0
 
virtual Metadata getDefaultMetadata ()=0
 
qint32 getNumFields ()
 
QList< UAVObjectField * > getFields ()
 
UAVObjectFieldgetField (const QString &name)
 
QString toString ()
 
QString toStringBrief ()
 
QString toStringData ()
 
QJsonObject getJsonRepresentation ()
 
void emitTransactionCompleted (bool success)
 
void emitTransactionCompleted (bool success, bool nacked)
 
void emitNewInstance (UAVObject *)
 
void emitInstanceRemoved (UAVObject *)
 

Static Public Member Functions

static void MetadataInitialize (Metadata &meta)
 
static AccessMode GetFlightAccess (const Metadata &meta)
 
static void SetFlightAccess (Metadata &meta, AccessMode mode)
 
static AccessMode GetGcsAccess (const Metadata &meta)
 
static void SetGcsAccess (Metadata &meta, AccessMode mode)
 
static quint8 GetFlightTelemetryAcked (const Metadata &meta)
 
static void SetFlightTelemetryAcked (Metadata &meta, quint8 val)
 
static quint8 GetGcsTelemetryAcked (const Metadata &meta)
 
static void SetGcsTelemetryAcked (Metadata &meta, quint8 val)
 
static UpdateMode GetFlightTelemetryUpdateMode (const Metadata &meta)
 
static void SetFlightTelemetryUpdateMode (Metadata &meta, UpdateMode val)
 
static UpdateMode GetGcsTelemetryUpdateMode (const Metadata &meta)
 
static void SetGcsTelemetryUpdateMode (Metadata &meta, UpdateMode val)
 

Protected Member Functions

void initializeFields (QList< UAVObjectField * > &fields, quint8 *data, quint32 numBytes)
 
void setDescription (const QString &description)
 

Protected Attributes

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

Detailed Description

Definition at line 65 of file uavobject.h.


The documentation for this class was generated from the following files: