dRonin
adbada4
dRonin GCS
|
#include <uavobjectfield.h>
Classes | |
struct | LimitStruct |
Public Types | |
enum | FieldType { INT8 = 0, INT16, INT32, UINT8, UINT16, UINT32, FLOAT32, ENUM, BITFIELD, STRING } |
enum | LimitType { EQUAL, NOT_EQUAL, BETWEEN, BIGGER, SMALLER } |
enum | DisplayType { DEC, HEX, BIN, OCT } |
Signals | |
void | fieldUpdated (UAVObjectField *field) |
Public Member Functions | |
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 (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 | initialize (quint8 *data, quint32 dataOffset, UAVObject *obj) |
UAVObject * | getObject () const |
FieldType | getType () const |
QString | getTypeAsString () const |
QString | getName () const |
QString | getUnits () const |
int | getNumElements () const |
QStringList | getElementNames () const |
QString | getElementName (int index=0) const |
int | getElementIndex (const QString &name) const |
Get the index of an element from it's name. More... | |
QStringList | getOptions () const |
bool | hasOption (const QString &option) |
hasOption Check if the given option exists More... | |
qint32 | pack (quint8 *dataOut) |
qint32 | unpack (const quint8 *dataIn) |
QVariant | getValue (int index=0) const |
bool | checkValue (const QVariant &data, int index=0) const |
void | setValue (const QVariant &data, int index=0) |
double | getDouble (int index=0) const |
void | setDouble (double value, int index=0) |
size_t | getNumBytes () const |
bool | isNumeric () const |
bool | isText () const |
QString | toString () const |
QString | getDescription () const |
QVariant | getDefaultValue (int index=0) const |
Get the default value (defined in the UAVO def) for the element. More... | |
bool | isDefaultValue (int index=0) |
Check if the element is set to default value. More... | |
int | getDisplayIntegerBase () const |
Get the preferred integer base for this field. More... | |
QString | getDisplayPrefix () const |
Get the prefix for the preferred display format. More... | |
bool | isWithinLimits (QVariant var, int index, int board=0) const |
QVariant | getMaxLimit (int index, int board=0) const |
QVariant | getMinLimit (int index, int board=0) const |
Protected Member Functions | |
void | clear () |
void | 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 | limitsInitialize (const QString &limits) |
Protected Attributes | |
QString | name |
QString | units |
FieldType | type |
QStringList | elementNames |
QList< int > | indices |
std::map< int, int > | enumToIndex |
QStringList | options |
int | numElements |
size_t | elementSize |
size_t | offset |
quint8 * | data |
UAVObject * | obj |
QMap< int, QList< LimitStruct > > | elementLimits |
QString | description |
QList< QVariant > | defaultValues |
DisplayType | display |
Definition at line 40 of file uavobjectfield.h.
Enumerator | |
---|---|
DEC | |
HEX | |
BIN | |
OCT |
Definition at line 58 of file uavobjectfield.h.
Enumerator | |
---|---|
INT8 | |
INT16 | |
INT32 | |
UINT8 | |
UINT16 | |
UINT32 | |
FLOAT32 | |
ENUM | |
BITFIELD | |
STRING |
Definition at line 45 of file uavobjectfield.h.
Enumerator | |
---|---|
EQUAL | |
NOT_EQUAL | |
BETWEEN | |
BIGGER | |
SMALLER |
Definition at line 57 of file uavobjectfield.h.
|
signal |
|
protected |
Definition at line 147 of file uavobjectfield.h.
|
protected |
Definition at line 151 of file uavobjectfield.h.
|
protected |
Definition at line 150 of file uavobjectfield.h.
|
protected |
Definition at line 152 of file uavobjectfield.h.
|
protected |
Definition at line 149 of file uavobjectfield.h.
|
protected |
Definition at line 140 of file uavobjectfield.h.
|
protected |
Definition at line 145 of file uavobjectfield.h.
|
protected |
Definition at line 142 of file uavobjectfield.h.
|
protected |
Definition at line 141 of file uavobjectfield.h.
|
protected |
Definition at line 137 of file uavobjectfield.h.
|
protected |
Definition at line 144 of file uavobjectfield.h.
|
protected |
Definition at line 148 of file uavobjectfield.h.
|
protected |
Definition at line 146 of file uavobjectfield.h.
|
protected |
Definition at line 143 of file uavobjectfield.h.
|
protected |
Definition at line 139 of file uavobjectfield.h.
|
protected |
Definition at line 138 of file uavobjectfield.h.