38 #include "$(NAMELC).h"
41 const QString $(
NAME)::
NAME = QString(
"$(NAME)");
42 const QString $(
NAME)::DESCRIPTION = QString(
"$(DESCRIPTION)");
44 $(FIELDDESCRIPTIONS_STRINGS)};
55 initializeFields(fields, reinterpret_cast <quint8 *> (&
data), NUMBYTES);
57 setDefaultFieldValues();
59 setDescription(DESCRIPTION);
61 connect(
this, &$(
NAME)::objectUpdated,
this, &$(
NAME)::emitNotifications);
69 UAVObject::Metadata metadata;
71 $(FLIGHTACCESS) << UAVOBJ_ACCESS_SHIFT |
72 $(GCSACCESS) << UAVOBJ_GCS_ACCESS_SHIFT |
73 $(FLIGHTTELEM_ACKED) << UAVOBJ_TELEMETRY_ACKED_SHIFT |
74 $(GCSTELEM_ACKED) << UAVOBJ_GCS_TELEMETRY_ACKED_SHIFT |
75 $(FLIGHTTELEM_UPDATEMODE) << UAVOBJ_TELEMETRY_UPDATE_MODE_SHIFT |
76 $(GCSTELEM_UPDATEMODE) << UAVOBJ_GCS_TELEMETRY_UPDATE_MODE_SHIFT;
77 metadata.flightTelemetryUpdatePeriod = $(FLIGHTTELEM_UPDATEPERIOD);
78 metadata.gcsTelemetryUpdatePeriod = $(GCSTELEM_UPDATEPERIOD);
79 metadata.loggingUpdatePeriod = $(LOGGING_UPDATEPERIOD);
88 void $(
NAME)::setDefaultFieldValues()
107 Metadata mdata = getMetadata();
111 emit objectUpdatedAuto(
this);
112 emit objectUpdated(
this);
116 void $(
NAME)::emitNotifications()
118 $(NOTIFY_PROPERTIES_CHANGED)
129 obj->
initialize(instID, this->getMetaObject());
void initialize(quint32 instID, UAVMetaObject *mobj)
Metadata getDefaultMetadata()
UAVDataObject * dirtyClone()
void setData(const DataFields &data)
const QString(NAME) const QString(NAME) const QHash< QString, QString >(NAME)
UAVObject * getObject(const QString &name, quint32 instId=0)
UAVDataObject * clone(quint32 instID)
static AccessMode GetGcsAccess(const Metadata &meta)