AIS and Packet modulators API: put back optional data in the action structure

This commit is contained in:
f4exb 2021-11-21 07:48:39 +01:00
parent 7c9327c125
commit a41d0319dc
22 changed files with 516 additions and 17 deletions

View File

@ -91,13 +91,13 @@ Check this button to repeatedly transmit a frame. Right click to open the dialog
<h3>14: TX</h3>
Transmits a frame containing the payload set in the data field.
Transmits a frame containing the payload set in the data field. Right click to open a dialog to adjust transmission details allowing parameters different from standard values.
<h2>API</h2>
Full details of the API can be found in the Swagger documentation.
Full details of the API can be found in the Swagger documentation. Below are a few examples:
To transmit stored data just send a "tx" action:
To transmit current data just send a "tx" action:
curl -X POST "http://127.0.0.1:8091/sdrangel/deviceset/1/channel/0/actions" -d '{"channelType": "IEEE_802_15_4_Mod", "direction": 1, "IEEE_802_15_4_ModActions": { "tx": 1}}

View File

@ -49,6 +49,7 @@ MESSAGE_CLASS_DEFINITION(AISMod::MsgReportData, Message)
MESSAGE_CLASS_DEFINITION(AISMod::MsgTx, Message)
MESSAGE_CLASS_DEFINITION(AISMod::MsgEncode, Message)
MESSAGE_CLASS_DEFINITION(AISMod::MsgTXPacketBytes, Message)
MESSAGE_CLASS_DEFINITION(AISMod::MsgTXPacketData, Message)
const char* const AISMod::m_channelIdURI = "sdrangel.channel.modais";
const char* const AISMod::m_channelId = "AISMod";
@ -676,8 +677,16 @@ int AISMod::webapiActionsPost(
{
if (swgAISModActions->getTx() != 0)
{
AISMod::MsgTx *msg = AISMod::MsgTx::create();
m_basebandSource->getInputMessageQueue()->push(msg);
if (channelActionsKeys.contains("data") && (swgAISModActions->getData()))
{
AISMod::MsgTXPacketData *msg = AISMod::MsgTXPacketData::create(*swgAISModActions->getData());
m_basebandSource->getInputMessageQueue()->push(msg);
}
else
{
AISMod::MsgTx *msg = AISMod::MsgTx::create();
m_basebandSource->getInputMessageQueue()->push(msg);
}
}
return 202;

View File

@ -130,6 +130,24 @@ public:
{ }
};
class MsgTXPacketData : public Message {
MESSAGE_CLASS_DECLARATION
public:
static MsgTXPacketData* create(const QString& data) {
return new MsgTXPacketData(data);
}
QString m_data;
private:
MsgTXPacketData(const QString& data) :
Message(),
m_data(data)
{ }
};
//=================================================================
AISMod(DeviceAPI *deviceAPI);

View File

@ -164,6 +164,14 @@ bool AISModBaseband::handleMessage(const Message& cmd)
return true;
}
else if (AISMod::MsgTXPacketData::match(cmd))
{
AISMod::MsgTXPacketData& tx = (AISMod::MsgTXPacketData&) cmd;
m_source.addTXPacket(tx.m_data);
m_source.transmit();
return true;
}
else if (DSPSignalNotification::match(cmd))
{
QMutexLocker mutexLocker(&m_mutex);

View File

@ -115,14 +115,20 @@ Check this button to repeatedly transmit a message. Right click to open the dial
<h3>25: TX</h3>
Transmits the message.
Transmits the message. Right click to open a dialog to adjust transmission details allowing parameters different from standard values.
<h2>API</h2>
Full details of the API can be found in the Swagger documentation. Here is a quick example of how to transmit a message from the command line:
Full details of the API can be found in the Swagger documentation. Below are a few examples.
curl -X POST "http://127.0.0.1:8091/sdrangel/deviceset/1/channel/0/actions" -d '{"channelType": "AISMod", "direction": 1, "AISModActions": { "tx": { "data": "000000000000000000000000000000000" }}}'
To transmit the current data just send a "tx" action:
Or to set the FM deviation:
curl -X POST "http://127.0.0.1:8091/sdrangel/deviceset/1/channel/0/actions" -d '{"channelType": "AISMod", "direction": 1, "AISModActions": { "tx": 1}}'
To transmit a message from the command line:
curl -X POST "http://127.0.0.1:8091/sdrangel/deviceset/1/channel/0/actions" -d '{"channelType": "AISMod", "direction": 1, "AISModActions": { "tx": 1, "data": "000000000000000000000000000000000" }}'
To set the FM deviation:
curl -X PATCH "http://127.0.0.1:8091/sdrangel/deviceset/1/channel/0/settings" -d '{"channelType": "AISMod", "direction": 1, "AISModSettings": {"fmDeviation": 4800}}'

View File

@ -52,6 +52,7 @@ MESSAGE_CLASS_DEFINITION(PacketMod::MsgConfigurePacketMod, Message)
MESSAGE_CLASS_DEFINITION(PacketMod::MsgTx, Message)
MESSAGE_CLASS_DEFINITION(PacketMod::MsgReportTx, Message)
MESSAGE_CLASS_DEFINITION(PacketMod::MsgTXPacketBytes, Message)
MESSAGE_CLASS_DEFINITION(PacketMod::MsgTXPacketData, Message)
const char* const PacketMod::m_channelIdURI = "sdrangel.channeltx.modpacket";
const char* const PacketMod::m_channelId = "PacketMod";
@ -661,8 +662,25 @@ int PacketMod::webapiActionsPost(
{
if (swgPacketModActions->getTx() != 0)
{
MsgTx *msg = MsgTx::create();
m_basebandSource->getInputMessageQueue()->push(msg);
if (channelActionsKeys.contains("payload")
&& (swgPacketModActions->getPayload()->getCallsign())
&& (swgPacketModActions->getPayload()->getTo())
&& (swgPacketModActions->getPayload()->getVia())
&& (swgPacketModActions->getPayload()->getData()))
{
MsgTXPacketData *msg = MsgTXPacketData::create(
*swgPacketModActions->getPayload()->getCallsign(),
*swgPacketModActions->getPayload()->getTo(),
*swgPacketModActions->getPayload()->getVia(),
*swgPacketModActions->getPayload()->getData()
);
m_basebandSource->getInputMessageQueue()->push(msg);
}
else
{
MsgTx *msg = MsgTx::create();
m_basebandSource->getInputMessageQueue()->push(msg);
}
if (getMessageQueueToGUI())
{

View File

@ -113,6 +113,31 @@ public:
{ }
};
class MsgTXPacketData : public Message {
MESSAGE_CLASS_DECLARATION
public:
static MsgTXPacketData* create(QString callsign, QString to, QString via, QString data)
{
return new MsgTXPacketData(callsign, to, via, data);
}
QString m_callsign;
QString m_to;
QString m_via;
QString m_data;
private:
MsgTXPacketData(QString callsign, QString to, QString via, QString data) :
Message(),
m_callsign(callsign),
m_to(to),
m_via(via),
m_data(data)
{ }
};
//=================================================================
PacketMod(DeviceAPI *deviceAPI);

View File

@ -164,6 +164,13 @@ bool PacketModBaseband::handleMessage(const Message& cmd)
return true;
}
else if (PacketMod::MsgTXPacketData::match(cmd))
{
PacketMod::MsgTXPacketData& tx = (PacketMod::MsgTXPacketData&) cmd;
m_source.addTXPacket(tx.m_callsign, tx.m_to, tx.m_via, tx.m_data);
return true;
}
else if (DSPSignalNotification::match(cmd))
{
QMutexLocker mutexLocker(&m_mutex);

View File

@ -76,7 +76,7 @@ The packet of data to send. To send an APRS status message, use the format <tt>>
<h3>17: TX</h3>
Transmits a packet containing the current values in callsign, to, via and data fields.
Transmits a packet containing the current values in callsign, to, via and data fields. Right click to open a dialog to adjust transmission details allowing parameters different from standard values.
<h3>18: UDP</h3>
@ -92,10 +92,16 @@ UDP port number to receive packets to be transmitted on.
<h2>API</h2>
Full details of the API can be found in the Swagger documentation. Here is a quick example of how to transmit a packet from the command line:
Full details of the API can be found in the Swagger documentation. Below are a few examples.
curl -X POST "http://127.0.0.1:8091/sdrangel/deviceset/1/channel/0/actions" -d '{"channelType": "PacketMod", "direction": 1, "PacketModActions": { "tx": { "callsign": "MYCALL", "to": "APRS", "via": "WIDE2-2", "data": ">Using SDRangel API to transmit" }}}'
To transmit a packet with current callsign, to, via and data fields simply send a "tx" action:
Or to set the mode to 9600 FSK:
curl -X POST "http://127.0.0.1:8091/sdrangel/deviceset/1/channel/0/actions" -d '{"channelType": "PacketMod", "direction": 1, "PacketModActions": { "tx": 1}}'
To transmit a packet from the command line:
curl -X POST "http://127.0.0.1:8091/sdrangel/deviceset/1/channel/0/actions" -d '{"channelType": "PacketMod", "direction": 1, "PacketModActions": { "tx": 1, "payload": { "callsign": "MYCALL", "to": "APRS", "via": "WIDE2-2", "data": ">Using SDRangel API to transmit" }}}'
To set the mode to 9600 FSK:
curl -X PATCH "http://127.0.0.1:8091/sdrangel/deviceset/1/channel/0/settings" -d '{"channelType": "PacketMod", "direction": 1, "PacketModSettings": {"mode": "9600 FSK"}}'

View File

@ -1000,6 +1000,9 @@ margin-bottom: 20px;
"encode" : {
"type" : "integer",
"description" : "Encode message from discrete data\n * 0 - do nothing\n * 1 - encode\n"
},
"data" : {
"type" : "string"
}
},
"description" : "AISMod"
@ -8283,9 +8286,28 @@ margin-bottom: 20px;
"tx" : {
"type" : "integer",
"description" : "Transmit with current data\n * 0 - Do nothing\n * 1 - Transmit\n"
},
"payload" : {
"$ref" : "#/definitions/PacketModActions_payload"
}
},
"description" : "PacketMod"
};
defs.PacketModActions_payload = {
"properties" : {
"callsign" : {
"type" : "string"
},
"to" : {
"type" : "string"
},
"via" : {
"type" : "string"
},
"data" : {
"type" : "string"
}
}
};
defs.PacketModReport = {
"properties" : {
@ -51345,7 +51367,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2021-11-20T13:05:46.792+01:00
Generated 2021-11-21T00:20:10.840+01:00
</div>
</div>
</div>

View File

@ -142,3 +142,5 @@ AISModActions:
Encode message from discrete data
* 0 - do nothing
* 1 - encode
data:
type: string

View File

@ -171,3 +171,14 @@ PacketModActions:
Transmit with current data
* 0 - Do nothing
* 1 - Transmit
payload:
type: object
properties:
callsign:
type: string
to:
type: string
via:
type: string
data:
type: string

View File

@ -142,3 +142,5 @@ AISModActions:
Encode message from discrete data
* 0 - do nothing
* 1 - encode
data:
type: string

View File

@ -171,3 +171,14 @@ PacketModActions:
Transmit with current data
* 0 - Do nothing
* 1 - Transmit
payload:
type: object
properties:
callsign:
type: string
to:
type: string
via:
type: string
data:
type: string

View File

@ -1000,6 +1000,9 @@ margin-bottom: 20px;
"encode" : {
"type" : "integer",
"description" : "Encode message from discrete data\n * 0 - do nothing\n * 1 - encode\n"
},
"data" : {
"type" : "string"
}
},
"description" : "AISMod"
@ -8283,9 +8286,28 @@ margin-bottom: 20px;
"tx" : {
"type" : "integer",
"description" : "Transmit with current data\n * 0 - Do nothing\n * 1 - Transmit\n"
},
"payload" : {
"$ref" : "#/definitions/PacketModActions_payload"
}
},
"description" : "PacketMod"
};
defs.PacketModActions_payload = {
"properties" : {
"callsign" : {
"type" : "string"
},
"to" : {
"type" : "string"
},
"via" : {
"type" : "string"
},
"data" : {
"type" : "string"
}
}
};
defs.PacketModReport = {
"properties" : {
@ -51345,7 +51367,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2021-11-20T13:05:46.792+01:00
Generated 2021-11-21T00:20:10.840+01:00
</div>
</div>
</div>

View File

@ -32,6 +32,8 @@ SWGAISModActions::SWGAISModActions() {
m_tx_isSet = false;
encode = 0;
m_encode_isSet = false;
data = nullptr;
m_data_isSet = false;
}
SWGAISModActions::~SWGAISModActions() {
@ -44,12 +46,17 @@ SWGAISModActions::init() {
m_tx_isSet = false;
encode = 0;
m_encode_isSet = false;
data = new QString("");
m_data_isSet = false;
}
void
SWGAISModActions::cleanup() {
if(data != nullptr) {
delete data;
}
}
SWGAISModActions*
@ -67,6 +74,8 @@ SWGAISModActions::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&encode, pJson["encode"], "qint32", "");
::SWGSDRangel::setValue(&data, pJson["data"], "QString", "QString");
}
QString
@ -89,6 +98,9 @@ SWGAISModActions::asJsonObject() {
if(m_encode_isSet){
obj->insert("encode", QJsonValue(encode));
}
if(data != nullptr && *data != QString("")){
toJsonValue(QString("data"), data, obj, QString("QString"));
}
return obj;
}
@ -113,6 +125,16 @@ SWGAISModActions::setEncode(qint32 encode) {
this->m_encode_isSet = true;
}
QString*
SWGAISModActions::getData() {
return data;
}
void
SWGAISModActions::setData(QString* data) {
this->data = data;
this->m_data_isSet = true;
}
bool
SWGAISModActions::isSet(){
@ -124,6 +146,9 @@ SWGAISModActions::isSet(){
if(m_encode_isSet){
isObjectUpdated = true; break;
}
if(data && *data != QString("")){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}

View File

@ -22,6 +22,7 @@
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "export.h"
@ -47,6 +48,9 @@ public:
qint32 getEncode();
void setEncode(qint32 encode);
QString* getData();
void setData(QString* data);
virtual bool isSet() override;
@ -57,6 +61,9 @@ private:
qint32 encode;
bool m_encode_isSet;
QString* data;
bool m_data_isSet;
};
}

View File

@ -188,6 +188,7 @@
#include "SWGPacketDemodReport.h"
#include "SWGPacketDemodSettings.h"
#include "SWGPacketModActions.h"
#include "SWGPacketModActions_payload.h"
#include "SWGPacketModReport.h"
#include "SWGPacketModSettings.h"
#include "SWGPagerDemodReport.h"
@ -1177,6 +1178,11 @@ namespace SWGSDRangel {
obj->init();
return obj;
}
if(QString("SWGPacketModActions_payload").compare(type) == 0) {
SWGPacketModActions_payload *obj = new SWGPacketModActions_payload();
obj->init();
return obj;
}
if(QString("SWGPacketModReport").compare(type) == 0) {
SWGPacketModReport *obj = new SWGPacketModReport();
obj->init();

View File

@ -30,6 +30,8 @@ SWGPacketModActions::SWGPacketModActions(QString* json) {
SWGPacketModActions::SWGPacketModActions() {
tx = 0;
m_tx_isSet = false;
payload = nullptr;
m_payload_isSet = false;
}
SWGPacketModActions::~SWGPacketModActions() {
@ -40,11 +42,16 @@ void
SWGPacketModActions::init() {
tx = 0;
m_tx_isSet = false;
payload = new SWGPacketModActions_payload();
m_payload_isSet = false;
}
void
SWGPacketModActions::cleanup() {
if(payload != nullptr) {
delete payload;
}
}
SWGPacketModActions*
@ -60,6 +67,8 @@ void
SWGPacketModActions::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&tx, pJson["tx"], "qint32", "");
::SWGSDRangel::setValue(&payload, pJson["payload"], "SWGPacketModActions_payload", "SWGPacketModActions_payload");
}
QString
@ -79,6 +88,9 @@ SWGPacketModActions::asJsonObject() {
if(m_tx_isSet){
obj->insert("tx", QJsonValue(tx));
}
if((payload != nullptr) && (payload->isSet())){
toJsonValue(QString("payload"), payload, obj, QString("SWGPacketModActions_payload"));
}
return obj;
}
@ -93,6 +105,16 @@ SWGPacketModActions::setTx(qint32 tx) {
this->m_tx_isSet = true;
}
SWGPacketModActions_payload*
SWGPacketModActions::getPayload() {
return payload;
}
void
SWGPacketModActions::setPayload(SWGPacketModActions_payload* payload) {
this->payload = payload;
this->m_payload_isSet = true;
}
bool
SWGPacketModActions::isSet(){
@ -101,6 +123,9 @@ SWGPacketModActions::isSet(){
if(m_tx_isSet){
isObjectUpdated = true; break;
}
if(payload && payload->isSet()){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}

View File

@ -22,6 +22,7 @@
#include <QJsonObject>
#include "SWGPacketModActions_payload.h"
#include "SWGObject.h"
#include "export.h"
@ -44,6 +45,9 @@ public:
qint32 getTx();
void setTx(qint32 tx);
SWGPacketModActions_payload* getPayload();
void setPayload(SWGPacketModActions_payload* payload);
virtual bool isSet() override;
@ -51,6 +55,9 @@ private:
qint32 tx;
bool m_tx_isSet;
SWGPacketModActions_payload* payload;
bool m_payload_isSet;
};
}

View File

@ -0,0 +1,185 @@
/**
* SDRangel
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
*
* OpenAPI spec version: 6.0.0
* Contact: f4exb06@gmail.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
#include "SWGPacketModActions_payload.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGPacketModActions_payload::SWGPacketModActions_payload(QString* json) {
init();
this->fromJson(*json);
}
SWGPacketModActions_payload::SWGPacketModActions_payload() {
callsign = nullptr;
m_callsign_isSet = false;
to = nullptr;
m_to_isSet = false;
via = nullptr;
m_via_isSet = false;
data = nullptr;
m_data_isSet = false;
}
SWGPacketModActions_payload::~SWGPacketModActions_payload() {
this->cleanup();
}
void
SWGPacketModActions_payload::init() {
callsign = new QString("");
m_callsign_isSet = false;
to = new QString("");
m_to_isSet = false;
via = new QString("");
m_via_isSet = false;
data = new QString("");
m_data_isSet = false;
}
void
SWGPacketModActions_payload::cleanup() {
if(callsign != nullptr) {
delete callsign;
}
if(to != nullptr) {
delete to;
}
if(via != nullptr) {
delete via;
}
if(data != nullptr) {
delete data;
}
}
SWGPacketModActions_payload*
SWGPacketModActions_payload::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGPacketModActions_payload::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&callsign, pJson["callsign"], "QString", "QString");
::SWGSDRangel::setValue(&to, pJson["to"], "QString", "QString");
::SWGSDRangel::setValue(&via, pJson["via"], "QString", "QString");
::SWGSDRangel::setValue(&data, pJson["data"], "QString", "QString");
}
QString
SWGPacketModActions_payload::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGPacketModActions_payload::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(callsign != nullptr && *callsign != QString("")){
toJsonValue(QString("callsign"), callsign, obj, QString("QString"));
}
if(to != nullptr && *to != QString("")){
toJsonValue(QString("to"), to, obj, QString("QString"));
}
if(via != nullptr && *via != QString("")){
toJsonValue(QString("via"), via, obj, QString("QString"));
}
if(data != nullptr && *data != QString("")){
toJsonValue(QString("data"), data, obj, QString("QString"));
}
return obj;
}
QString*
SWGPacketModActions_payload::getCallsign() {
return callsign;
}
void
SWGPacketModActions_payload::setCallsign(QString* callsign) {
this->callsign = callsign;
this->m_callsign_isSet = true;
}
QString*
SWGPacketModActions_payload::getTo() {
return to;
}
void
SWGPacketModActions_payload::setTo(QString* to) {
this->to = to;
this->m_to_isSet = true;
}
QString*
SWGPacketModActions_payload::getVia() {
return via;
}
void
SWGPacketModActions_payload::setVia(QString* via) {
this->via = via;
this->m_via_isSet = true;
}
QString*
SWGPacketModActions_payload::getData() {
return data;
}
void
SWGPacketModActions_payload::setData(QString* data) {
this->data = data;
this->m_data_isSet = true;
}
bool
SWGPacketModActions_payload::isSet(){
bool isObjectUpdated = false;
do{
if(callsign && *callsign != QString("")){
isObjectUpdated = true; break;
}
if(to && *to != QString("")){
isObjectUpdated = true; break;
}
if(via && *via != QString("")){
isObjectUpdated = true; break;
}
if(data && *data != QString("")){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,77 @@
/**
* SDRangel
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
*
* OpenAPI spec version: 6.0.0
* Contact: f4exb06@gmail.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
/*
* SWGPacketModActions_payload.h
*
*
*/
#ifndef SWGPacketModActions_payload_H_
#define SWGPacketModActions_payload_H_
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGPacketModActions_payload: public SWGObject {
public:
SWGPacketModActions_payload();
SWGPacketModActions_payload(QString* json);
virtual ~SWGPacketModActions_payload();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGPacketModActions_payload* fromJson(QString &jsonString) override;
QString* getCallsign();
void setCallsign(QString* callsign);
QString* getTo();
void setTo(QString* to);
QString* getVia();
void setVia(QString* via);
QString* getData();
void setData(QString* data);
virtual bool isSet() override;
private:
QString* callsign;
bool m_callsign_isSet;
QString* to;
bool m_to_isSet;
QString* via;
bool m_via_isSet;
QString* data;
bool m_data_isSet;
};
}
#endif /* SWGPacketModActions_payload_H_ */