mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
OP-1222 Added JSon Api embryo.
This commit is contained in:
parent
1a68ba062d
commit
9a13c49722
@ -532,6 +532,21 @@ void UAVObject::toXML(QXmlStreamWriter *xmlWriter)
|
||||
xmlWriter->writeEndElement(); // object
|
||||
}
|
||||
|
||||
void UAVObject::fromXML(QXmlStreamReader *xmlReader)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void UAVObject::toJson(QJsonObject *jsonObject)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void UAVObject::fromJson(const QJsonObject *jsonObject)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Emit the transactionCompleted event (used by the UAVTalk plugin)
|
||||
*/
|
||||
|
@ -38,6 +38,9 @@
|
||||
#include <QFile>
|
||||
#include <stdint.h>
|
||||
#include <QXmlStreamWriter>
|
||||
#include <QXmlStreamReader>
|
||||
#include <QJsonObject>
|
||||
|
||||
#include "uavobjectfield.h"
|
||||
|
||||
#define UAVOBJ_ACCESS_SHIFT 0
|
||||
@ -129,7 +132,13 @@ public:
|
||||
QString toString();
|
||||
QString toStringBrief();
|
||||
QString toStringData();
|
||||
|
||||
void toXML(QXmlStreamWriter *xmlWriter);
|
||||
void fromXML(QXmlStreamReader *xmlReader);
|
||||
|
||||
void toJson(QJsonObject *jsonObject);
|
||||
void fromJson(const QJsonObject *jsonObject);
|
||||
|
||||
void emitTransactionCompleted(bool success);
|
||||
void emitNewInstance(UAVObject *);
|
||||
|
||||
|
@ -673,6 +673,21 @@ void UAVObjectField::toXML(QXmlStreamWriter *xmlWriter)
|
||||
xmlWriter->writeEndElement(); // field
|
||||
}
|
||||
|
||||
void UAVObjectField::fromXML(QXmlStreamReader *xmlReader)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void UAVObjectField::toJson(QJsonObject *jsonObject)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void UAVObjectField::fromJson(const QJsonObject *jsonObject)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
qint32 UAVObjectField::pack(quint8 *dataOut)
|
||||
{
|
||||
QMutexLocker locker(obj->getMutex());
|
||||
|
@ -35,6 +35,8 @@
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
#include <QXmlStreamWriter>
|
||||
#include <QXmlStreamReader>
|
||||
#include <QJsonObject>
|
||||
|
||||
class UAVObject;
|
||||
|
||||
@ -74,7 +76,12 @@ public:
|
||||
bool isInteger();
|
||||
bool isText();
|
||||
QString toString();
|
||||
|
||||
void toXML(QXmlStreamWriter *xmlWriter);
|
||||
void fromXML(QXmlStreamReader *xmlReader);
|
||||
|
||||
void toJson(QJsonObject *jsonObject);
|
||||
void fromJson(const QJsonObject *jsonObject);
|
||||
|
||||
bool isWithinLimits(QVariant var, quint32 index, int board = 0);
|
||||
QVariant getMaxLimit(quint32 index, int board = 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user