mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-24 03:02:29 -04:00
IEEE 802.15.4 modulator: added option to receive UDP data as bytes
This commit is contained in:
parent
8fb31a147b
commit
27ffcedb64
@ -49,7 +49,8 @@
|
|||||||
#include "ieee_802_15_4_mod.h"
|
#include "ieee_802_15_4_mod.h"
|
||||||
|
|
||||||
MESSAGE_CLASS_DEFINITION(IEEE_802_15_4_Mod::MsgConfigureIEEE_802_15_4_Mod, Message)
|
MESSAGE_CLASS_DEFINITION(IEEE_802_15_4_Mod::MsgConfigureIEEE_802_15_4_Mod, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod, Message)
|
MESSAGE_CLASS_DEFINITION(IEEE_802_15_4_Mod::MsgTxHexString, Message)
|
||||||
|
MESSAGE_CLASS_DEFINITION(IEEE_802_15_4_Mod::MsgTxBytes, Message)
|
||||||
|
|
||||||
const char* const IEEE_802_15_4_Mod::m_channelIdURI = "sdrangel.channeltx.mod802.15.4";
|
const char* const IEEE_802_15_4_Mod::m_channelIdURI = "sdrangel.channeltx.mod802.15.4";
|
||||||
const char* const IEEE_802_15_4_Mod::m_channelId = "IEEE_802_15_4_Mod";
|
const char* const IEEE_802_15_4_Mod::m_channelId = "IEEE_802_15_4_Mod";
|
||||||
@ -118,11 +119,11 @@ bool IEEE_802_15_4_Mod::handleMessage(const Message& cmd)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (MsgTXIEEE_802_15_4_Mod::match(cmd))
|
else if (MsgTxHexString::match(cmd))
|
||||||
{
|
{
|
||||||
// Forward a copy to baseband
|
// Forward a copy to baseband
|
||||||
MsgTXIEEE_802_15_4_Mod* rep = new MsgTXIEEE_802_15_4_Mod((MsgTXIEEE_802_15_4_Mod&)cmd);
|
MsgTxHexString* rep = new MsgTxHexString((MsgTxHexString&)cmd);
|
||||||
qDebug() << "IEEE_802_15_4_Mod::handleMessage: MsgTXIEEE_802_15_4_Mod";
|
qDebug() << "IEEE_802_15_4_Mod::handleMessage: MsgTxHexString";
|
||||||
m_basebandSource->getInputMessageQueue()->push(rep);
|
m_basebandSource->getInputMessageQueue()->push(rep);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -201,6 +202,10 @@ void IEEE_802_15_4_Mod::applySettings(const IEEE_802_15_4_ModSettings& settings,
|
|||||||
reverseAPIKeys.append("udpEnabled");
|
reverseAPIKeys.append("udpEnabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((settings.m_udpBytesFormat != m_settings.m_udpBytesFormat) || force) {
|
||||||
|
reverseAPIKeys.append("udpBytesFormat");
|
||||||
|
}
|
||||||
|
|
||||||
if ((settings.m_udpAddress != m_settings.m_udpAddress) || force) {
|
if ((settings.m_udpAddress != m_settings.m_udpAddress) || force) {
|
||||||
reverseAPIKeys.append("udpAddress");
|
reverseAPIKeys.append("udpAddress");
|
||||||
}
|
}
|
||||||
@ -342,13 +347,16 @@ void IEEE_802_15_4_Mod::webapiUpdateChannelSettings(
|
|||||||
settings.m_repeatCount = response.getIeee802154ModSettings()->getRepeatCount();
|
settings.m_repeatCount = response.getIeee802154ModSettings()->getRepeatCount();
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("udpEnabled")) {
|
if (channelSettingsKeys.contains("udpEnabled")) {
|
||||||
settings.m_udpEnabled = response.getPacketDemodSettings()->getUdpEnabled();
|
settings.m_udpEnabled = response.getIeee802154ModSettings()->getUdpEnabled() != 0;
|
||||||
|
}
|
||||||
|
if (channelSettingsKeys.contains("udpBytesFormat")) {
|
||||||
|
settings.m_udpBytesFormat = response.getIeee802154ModSettings()->getMUdpBytesFormat() != 0;
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("udpAddress")) {
|
if (channelSettingsKeys.contains("udpAddress")) {
|
||||||
settings.m_udpAddress = *response.getPacketDemodSettings()->getUdpAddress();
|
settings.m_udpAddress = *response.getIeee802154ModSettings()->getUdpAddress();
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("udpPort")) {
|
if (channelSettingsKeys.contains("udpPort")) {
|
||||||
settings.m_udpPort = response.getPacketDemodSettings()->getUdpPort();
|
settings.m_udpPort = response.getIeee802154ModSettings()->getUdpPort();
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("rgbColor")) {
|
if (channelSettingsKeys.contains("rgbColor")) {
|
||||||
settings.m_rgbColor = response.getIeee802154ModSettings()->getRgbColor();
|
settings.m_rgbColor = response.getIeee802154ModSettings()->getRgbColor();
|
||||||
@ -404,7 +412,7 @@ int IEEE_802_15_4_Mod::webapiActionsPost(
|
|||||||
{
|
{
|
||||||
QString data(*dataP);
|
QString data(*dataP);
|
||||||
|
|
||||||
IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod *msg = IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod::create(data);
|
IEEE_802_15_4_Mod::MsgTxHexString *msg = IEEE_802_15_4_Mod::MsgTxHexString::create(data);
|
||||||
m_basebandSource->getInputMessageQueue()->push(msg);
|
m_basebandSource->getInputMessageQueue()->push(msg);
|
||||||
return 202;
|
return 202;
|
||||||
}
|
}
|
||||||
@ -437,7 +445,8 @@ void IEEE_802_15_4_Mod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSetti
|
|||||||
response.getIeee802154ModSettings()->setRepeat(settings.m_repeat ? 1 : 0);
|
response.getIeee802154ModSettings()->setRepeat(settings.m_repeat ? 1 : 0);
|
||||||
response.getIeee802154ModSettings()->setRepeatDelay(settings.m_repeatDelay);
|
response.getIeee802154ModSettings()->setRepeatDelay(settings.m_repeatDelay);
|
||||||
response.getIeee802154ModSettings()->setRepeatCount(settings.m_repeatCount);
|
response.getIeee802154ModSettings()->setRepeatCount(settings.m_repeatCount);
|
||||||
response.getIeee802154ModSettings()->setUdpEnabled(settings.m_udpEnabled);
|
response.getIeee802154ModSettings()->setUdpEnabled(settings.m_udpEnabled ? 1 : 0);
|
||||||
|
response.getIeee802154ModSettings()->setMUdpBytesFormat(settings.m_udpBytesFormat ? 1 : 0);
|
||||||
response.getIeee802154ModSettings()->setUdpAddress(new QString(settings.m_udpAddress));
|
response.getIeee802154ModSettings()->setUdpAddress(new QString(settings.m_udpAddress));
|
||||||
response.getIeee802154ModSettings()->setUdpPort(settings.m_udpPort);
|
response.getIeee802154ModSettings()->setUdpPort(settings.m_udpPort);
|
||||||
response.getIeee802154ModSettings()->setRgbColor(settings.m_rgbColor);
|
response.getIeee802154ModSettings()->setRgbColor(settings.m_rgbColor);
|
||||||
@ -552,7 +561,10 @@ void IEEE_802_15_4_Mod::webapiFormatChannelSettings(
|
|||||||
swgIEEE_802_15_4_ModSettings->setRepeatCount(settings.m_repeatCount);
|
swgIEEE_802_15_4_ModSettings->setRepeatCount(settings.m_repeatCount);
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("udpEnabled") || force) {
|
if (channelSettingsKeys.contains("udpEnabled") || force) {
|
||||||
swgIEEE_802_15_4_ModSettings->setUdpEnabled(settings.m_udpEnabled);
|
swgIEEE_802_15_4_ModSettings->setUdpEnabled(settings.m_udpEnabled ? 1 : 0);
|
||||||
|
}
|
||||||
|
if (channelSettingsKeys.contains("udpBytesFormat") || force) {
|
||||||
|
swgIEEE_802_15_4_ModSettings->setMUdpBytesFormat(settings.m_udpBytesFormat ? 1 : 0);
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("udpAddress") || force) {
|
if (channelSettingsKeys.contains("udpAddress") || force) {
|
||||||
swgIEEE_802_15_4_ModSettings->setUdpAddress(new QString(settings.m_udpAddress));
|
swgIEEE_802_15_4_ModSettings->setUdpAddress(new QString(settings.m_udpAddress));
|
||||||
@ -638,9 +650,17 @@ void IEEE_802_15_4_Mod::udpRx()
|
|||||||
while (m_udpSocket->hasPendingDatagrams())
|
while (m_udpSocket->hasPendingDatagrams())
|
||||||
{
|
{
|
||||||
QNetworkDatagram datagram = m_udpSocket->receiveDatagram();
|
QNetworkDatagram datagram = m_udpSocket->receiveDatagram();
|
||||||
|
if (m_settings.m_udpBytesFormat)
|
||||||
|
{
|
||||||
|
IEEE_802_15_4_Mod::MsgTxBytes *msg = IEEE_802_15_4_Mod::MsgTxBytes::create(datagram.data());
|
||||||
|
m_basebandSource->getInputMessageQueue()->push(msg);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
// Convert from binary to hex string
|
// Convert from binary to hex string
|
||||||
QString string = datagram.data().toHex(' ');
|
QString string = datagram.data().toHex(' ');
|
||||||
IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod *msg = IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod::create(string);
|
IEEE_802_15_4_Mod::MsgTxHexString *msg = IEEE_802_15_4_Mod::MsgTxHexString::create(string);
|
||||||
m_basebandSource->getInputMessageQueue()->push(msg);
|
m_basebandSource->getInputMessageQueue()->push(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -68,20 +68,38 @@ public:
|
|||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
class MsgTXIEEE_802_15_4_Mod : public Message {
|
class MsgTxHexString : public Message {
|
||||||
MESSAGE_CLASS_DECLARATION
|
MESSAGE_CLASS_DECLARATION
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static MsgTXIEEE_802_15_4_Mod* create(QString data)
|
static MsgTxHexString* create(QString data)
|
||||||
{
|
{
|
||||||
return new MsgTXIEEE_802_15_4_Mod(data);
|
return new MsgTxHexString(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString m_data;
|
QString m_data;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
MsgTXIEEE_802_15_4_Mod(QString data) :
|
MsgTxHexString(QString data) :
|
||||||
|
Message(),
|
||||||
|
m_data(data)
|
||||||
|
{ }
|
||||||
|
};
|
||||||
|
|
||||||
|
class MsgTxBytes : public Message {
|
||||||
|
MESSAGE_CLASS_DECLARATION
|
||||||
|
|
||||||
|
public:
|
||||||
|
static MsgTxBytes* create(QByteArray data) {
|
||||||
|
return new MsgTxBytes(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
QByteArray m_data;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
MsgTxBytes(QByteArray data) :
|
||||||
Message(),
|
Message(),
|
||||||
m_data(data)
|
m_data(data)
|
||||||
{ }
|
{ }
|
||||||
|
@ -146,10 +146,17 @@ bool IEEE_802_15_4_ModBaseband::handleMessage(const Message& cmd)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod::match(cmd))
|
else if (IEEE_802_15_4_Mod::MsgTxHexString::match(cmd))
|
||||||
{
|
{
|
||||||
IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod& tx = (IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod&) cmd;
|
IEEE_802_15_4_Mod::MsgTxHexString& tx = (IEEE_802_15_4_Mod::MsgTxHexString&) cmd;
|
||||||
m_source.addTXFrame(tx.m_data);
|
m_source.addTxFrame(tx.m_data);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (IEEE_802_15_4_Mod::MsgTxBytes::match(cmd))
|
||||||
|
{
|
||||||
|
IEEE_802_15_4_Mod::MsgTxBytes& tx = (IEEE_802_15_4_Mod::MsgTxBytes&) cmd;
|
||||||
|
m_source.addTxFrame(tx.m_data);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -288,6 +288,12 @@ void IEEE_802_15_4_ModGUI::on_udpPort_editingFinished()
|
|||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IEEE_802_15_4_ModGUI::on_udpBytesFormat_clicked(bool checked)
|
||||||
|
{
|
||||||
|
m_settings.m_udpBytesFormat = checked;
|
||||||
|
applySettings();
|
||||||
|
}
|
||||||
|
|
||||||
void IEEE_802_15_4_ModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
void IEEE_802_15_4_ModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
||||||
{
|
{
|
||||||
(void) widget;
|
(void) widget;
|
||||||
@ -444,8 +450,8 @@ IEEE_802_15_4_ModGUI::~IEEE_802_15_4_ModGUI()
|
|||||||
void IEEE_802_15_4_ModGUI::transmit()
|
void IEEE_802_15_4_ModGUI::transmit()
|
||||||
{
|
{
|
||||||
QString data = ui->frame->text();
|
QString data = ui->frame->text();
|
||||||
ui->transmittedText->appendPlainText(data + "\n");
|
ui->transmittedText->appendPlainText(data);
|
||||||
IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod *msg = IEEE_802_15_4_Mod::MsgTXIEEE_802_15_4_Mod::create(data);
|
IEEE_802_15_4_Mod::MsgTxHexString *msg = IEEE_802_15_4_Mod::MsgTxHexString::create(data);
|
||||||
m_IEEE_802_15_4_Mod->getInputMessageQueue()->push(msg);
|
m_IEEE_802_15_4_Mod->getInputMessageQueue()->push(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,6 +105,7 @@ private slots:
|
|||||||
void on_udpEnabled_clicked(bool checked);
|
void on_udpEnabled_clicked(bool checked);
|
||||||
void on_udpAddress_editingFinished();
|
void on_udpAddress_editingFinished();
|
||||||
void on_udpPort_editingFinished();
|
void on_udpPort_editingFinished();
|
||||||
|
void on_udpBytesFormat_clicked(bool checked);
|
||||||
|
|
||||||
void onWidgetRolled(QWidget* widget, bool rollDown);
|
void onWidgetRolled(QWidget* widget, bool rollDown);
|
||||||
void onMenuDialogCalled(const QPoint& p);
|
void onMenuDialogCalled(const QPoint& p);
|
||||||
|
@ -485,6 +485,16 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>UDP payload sent in bytes format else blank separated hex string</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Bytes</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_2">
|
<spacer name="horizontalSpacer_2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -70,6 +70,7 @@ void IEEE_802_15_4_ModSettings::resetToDefaults()
|
|||||||
m_beta = 1.0f;
|
m_beta = 1.0f;
|
||||||
m_symbolSpan = 6;
|
m_symbolSpan = 6;
|
||||||
m_udpEnabled = false;
|
m_udpEnabled = false;
|
||||||
|
m_udpBytesFormat = false;
|
||||||
m_udpAddress = "127.0.0.1";
|
m_udpAddress = "127.0.0.1";
|
||||||
m_udpPort = 9998;
|
m_udpPort = 9998;
|
||||||
}
|
}
|
||||||
@ -182,6 +183,7 @@ QByteArray IEEE_802_15_4_ModSettings::serialize() const
|
|||||||
s.writeBool(34, m_udpEnabled);
|
s.writeBool(34, m_udpEnabled);
|
||||||
s.writeString(35, m_udpAddress);
|
s.writeString(35, m_udpAddress);
|
||||||
s.writeU32(36, m_udpPort);
|
s.writeU32(36, m_udpPort);
|
||||||
|
s.writeBool(37, m_udpBytesFormat);
|
||||||
|
|
||||||
return s.final();
|
return s.final();
|
||||||
}
|
}
|
||||||
@ -259,6 +261,7 @@ bool IEEE_802_15_4_ModSettings::deserialize(const QByteArray& data)
|
|||||||
} else {
|
} else {
|
||||||
m_udpPort = 9998;
|
m_udpPort = 9998;
|
||||||
}
|
}
|
||||||
|
d.readBool(37, &m_udpBytesFormat);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -63,6 +63,7 @@ struct IEEE_802_15_4_ModSettings
|
|||||||
float m_beta;
|
float m_beta;
|
||||||
int m_symbolSpan;
|
int m_symbolSpan;
|
||||||
bool m_udpEnabled;
|
bool m_udpEnabled;
|
||||||
|
bool m_udpBytesFormat; //!< true for bytes payload
|
||||||
QString m_udpAddress;
|
QString m_udpAddress;
|
||||||
uint16_t m_udpPort;
|
uint16_t m_udpPort;
|
||||||
|
|
||||||
|
@ -558,18 +558,24 @@ void IEEE_802_15_4_ModSource::initTX()
|
|||||||
m_scrambler.init();
|
m_scrambler.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t *IEEE_802_15_4_ModSource::hexToBin(uint8_t *p, QString data)
|
void IEEE_802_15_4_ModSource::convert(const QString dataStr, QByteArray& data)
|
||||||
{
|
{
|
||||||
// Convert string containing space separated list of hex values to binary
|
// Convert string containing space separated list of hex values to binary
|
||||||
QStringList list = data.split(" ");
|
QStringList list = dataStr.split(" ");
|
||||||
for (int i = 0; i < list.size(); i++)
|
|
||||||
{
|
for (int i = 0; i < list.size(); i++) {
|
||||||
*p++ = list[i].toInt(nullptr, 16);
|
data.append(list[i].toInt(nullptr, 16));
|
||||||
}
|
}
|
||||||
return p;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IEEE_802_15_4_ModSource::addTXFrame(QString data)
|
void IEEE_802_15_4_ModSource::addTxFrame(const QString& data)
|
||||||
|
{
|
||||||
|
QByteArray ba;
|
||||||
|
convert(data.trimmed(), ba);
|
||||||
|
addTxFrame(ba);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IEEE_802_15_4_ModSource::addTxFrame(const QByteArray& data)
|
||||||
{
|
{
|
||||||
uint8_t *crcStart;
|
uint8_t *crcStart;
|
||||||
uint8_t *p;
|
uint8_t *p;
|
||||||
@ -592,7 +598,8 @@ void IEEE_802_15_4_ModSource::addTXFrame(QString data)
|
|||||||
// PHY payload
|
// PHY payload
|
||||||
crcStart = p;
|
crcStart = p;
|
||||||
// Data
|
// Data
|
||||||
p = hexToBin(p, data.trimmed());
|
std::copy(data.data(), data.data() + data.length(), p);
|
||||||
|
p += data.length();
|
||||||
// MAC FCS
|
// MAC FCS
|
||||||
crc.calculate(crcStart, p-crcStart);
|
crc.calculate(crcStart, p-crcStart);
|
||||||
crcValue = crc.get();
|
crcValue = crc.get();
|
||||||
@ -606,7 +613,7 @@ void IEEE_802_15_4_ModSource::addTXFrame(QString data)
|
|||||||
|
|
||||||
// Dump frame
|
// Dump frame
|
||||||
QByteArray qb((char *)m_bits, p-m_bits);
|
QByteArray qb((char *)m_bits, p-m_bits);
|
||||||
qDebug() << "TX: " << qb.toHex();
|
qDebug() << "IEEE_802_15_4_ModSource::addTxFrame: Tx: " << qb.toHex();
|
||||||
|
|
||||||
// Save number of bits in frame
|
// Save number of bits in frame
|
||||||
m_bitCount = m_bitCountTotal = (p-&m_bits[0]) * 8;
|
m_bitCount = m_bitCountTotal = (p-&m_bits[0]) * 8;
|
||||||
|
@ -62,8 +62,8 @@ public:
|
|||||||
void applySettings(const IEEE_802_15_4_ModSettings& settings, bool force = false);
|
void applySettings(const IEEE_802_15_4_ModSettings& settings, bool force = false);
|
||||||
void applyChannelSettings(int channelSampleRate, int channelFrequencyOffset, bool force = false);
|
void applyChannelSettings(int channelSampleRate, int channelFrequencyOffset, bool force = false);
|
||||||
|
|
||||||
uint8_t *hexToBin(uint8_t *p, QString data);
|
void addTxFrame(const QString& data);
|
||||||
void addTXFrame(QString data);
|
void addTxFrame(const QByteArray& data);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_channelSampleRate;
|
int m_channelSampleRate;
|
||||||
@ -136,6 +136,7 @@ private:
|
|||||||
bool chipsValid(); // Are there any chips to transmit
|
bool chipsValid(); // Are there any chips to transmit
|
||||||
int getSymbol();
|
int getSymbol();
|
||||||
int getChip();
|
int getChip();
|
||||||
|
void convert(const QString dataStr, QByteArray& data);
|
||||||
void initTX();
|
void initTX();
|
||||||
void createHalfSine(int sampleRate, int chipRate);
|
void createHalfSine(int sampleRate, int chipRate);
|
||||||
|
|
||||||
|
@ -6267,6 +6267,10 @@ margin-bottom: 20px;
|
|||||||
"type" : "integer",
|
"type" : "integer",
|
||||||
"description" : "Enable forwarding of frames via UDP"
|
"description" : "Enable forwarding of frames via UDP"
|
||||||
},
|
},
|
||||||
|
"m_udpBytesFormat" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Payload format\n * 0 - Blank separated string representation of hex bytes i.e. 00 02 0a\n * 1 - Raw bytes\n"
|
||||||
|
},
|
||||||
"udpAddress" : {
|
"udpAddress" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"description" : "UDP address to listen for frames to transmit on"
|
"description" : "UDP address to listen for frames to transmit on"
|
||||||
@ -8321,10 +8325,6 @@ margin-bottom: 20px;
|
|||||||
"type" : "number",
|
"type" : "number",
|
||||||
"format" : "float"
|
"format" : "float"
|
||||||
},
|
},
|
||||||
"preEmphasisLowFreq" : {
|
|
||||||
"type" : "number",
|
|
||||||
"format" : "float"
|
|
||||||
},
|
|
||||||
"preEmphasisHighFreq" : {
|
"preEmphasisHighFreq" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
"format" : "float"
|
"format" : "float"
|
||||||
@ -51290,7 +51290,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2021-11-13T22:32:53.016+01:00
|
Generated 2021-11-16T00:55:07.690+01:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -28,6 +28,12 @@ IEEE_802_15_4_ModSettings:
|
|||||||
udpEnabled:
|
udpEnabled:
|
||||||
description: Enable forwarding of frames via UDP
|
description: Enable forwarding of frames via UDP
|
||||||
type: integer
|
type: integer
|
||||||
|
m_udpBytesFormat:
|
||||||
|
type: integer
|
||||||
|
description: >
|
||||||
|
Payload format
|
||||||
|
* 0 - Blank separated string representation of hex bytes i.e. 00 02 0a
|
||||||
|
* 1 - Raw bytes
|
||||||
udpAddress:
|
udpAddress:
|
||||||
description: UDP address to listen for frames to transmit on
|
description: UDP address to listen for frames to transmit on
|
||||||
type: string
|
type: string
|
||||||
|
@ -60,9 +60,6 @@ PacketModSettings:
|
|||||||
preEmphasisTau:
|
preEmphasisTau:
|
||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
preEmphasisLowFreq:
|
|
||||||
type: number
|
|
||||||
format: float
|
|
||||||
preEmphasisHighFreq:
|
preEmphasisHighFreq:
|
||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
|
@ -28,6 +28,12 @@ IEEE_802_15_4_ModSettings:
|
|||||||
udpEnabled:
|
udpEnabled:
|
||||||
description: Enable forwarding of frames via UDP
|
description: Enable forwarding of frames via UDP
|
||||||
type: integer
|
type: integer
|
||||||
|
m_udpBytesFormat:
|
||||||
|
type: integer
|
||||||
|
description: >
|
||||||
|
Payload format
|
||||||
|
* 0 - Blank separated string representation of hex bytes i.e. 00 02 0a
|
||||||
|
* 1 - Raw bytes
|
||||||
udpAddress:
|
udpAddress:
|
||||||
description: UDP address to listen for frames to transmit on
|
description: UDP address to listen for frames to transmit on
|
||||||
type: string
|
type: string
|
||||||
|
@ -6267,6 +6267,10 @@ margin-bottom: 20px;
|
|||||||
"type" : "integer",
|
"type" : "integer",
|
||||||
"description" : "Enable forwarding of frames via UDP"
|
"description" : "Enable forwarding of frames via UDP"
|
||||||
},
|
},
|
||||||
|
"m_udpBytesFormat" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Payload format\n * 0 - Blank separated string representation of hex bytes i.e. 00 02 0a\n * 1 - Raw bytes\n"
|
||||||
|
},
|
||||||
"udpAddress" : {
|
"udpAddress" : {
|
||||||
"type" : "string",
|
"type" : "string",
|
||||||
"description" : "UDP address to listen for frames to transmit on"
|
"description" : "UDP address to listen for frames to transmit on"
|
||||||
@ -8321,10 +8325,6 @@ margin-bottom: 20px;
|
|||||||
"type" : "number",
|
"type" : "number",
|
||||||
"format" : "float"
|
"format" : "float"
|
||||||
},
|
},
|
||||||
"preEmphasisLowFreq" : {
|
|
||||||
"type" : "number",
|
|
||||||
"format" : "float"
|
|
||||||
},
|
|
||||||
"preEmphasisHighFreq" : {
|
"preEmphasisHighFreq" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
"format" : "float"
|
"format" : "float"
|
||||||
@ -51290,7 +51290,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2021-11-13T22:32:53.016+01:00
|
Generated 2021-11-16T00:55:07.690+01:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -46,6 +46,8 @@ SWGIEEE_802_15_4_ModSettings::SWGIEEE_802_15_4_ModSettings() {
|
|||||||
m_repeat_count_isSet = false;
|
m_repeat_count_isSet = false;
|
||||||
udp_enabled = 0;
|
udp_enabled = 0;
|
||||||
m_udp_enabled_isSet = false;
|
m_udp_enabled_isSet = false;
|
||||||
|
m_udp_bytes_format = 0;
|
||||||
|
m_m_udp_bytes_format_isSet = false;
|
||||||
udp_address = nullptr;
|
udp_address = nullptr;
|
||||||
m_udp_address_isSet = false;
|
m_udp_address_isSet = false;
|
||||||
udp_port = 0;
|
udp_port = 0;
|
||||||
@ -92,6 +94,8 @@ SWGIEEE_802_15_4_ModSettings::init() {
|
|||||||
m_repeat_count_isSet = false;
|
m_repeat_count_isSet = false;
|
||||||
udp_enabled = 0;
|
udp_enabled = 0;
|
||||||
m_udp_enabled_isSet = false;
|
m_udp_enabled_isSet = false;
|
||||||
|
m_udp_bytes_format = 0;
|
||||||
|
m_m_udp_bytes_format_isSet = false;
|
||||||
udp_address = new QString("");
|
udp_address = new QString("");
|
||||||
m_udp_address_isSet = false;
|
m_udp_address_isSet = false;
|
||||||
udp_port = 0;
|
udp_port = 0;
|
||||||
@ -127,6 +131,7 @@ SWGIEEE_802_15_4_ModSettings::cleanup() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(udp_address != nullptr) {
|
if(udp_address != nullptr) {
|
||||||
delete udp_address;
|
delete udp_address;
|
||||||
}
|
}
|
||||||
@ -174,6 +179,8 @@ SWGIEEE_802_15_4_ModSettings::fromJsonObject(QJsonObject &pJson) {
|
|||||||
|
|
||||||
::SWGSDRangel::setValue(&udp_enabled, pJson["udpEnabled"], "qint32", "");
|
::SWGSDRangel::setValue(&udp_enabled, pJson["udpEnabled"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&m_udp_bytes_format, pJson["m_udpBytesFormat"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&udp_address, pJson["udpAddress"], "QString", "QString");
|
::SWGSDRangel::setValue(&udp_address, pJson["udpAddress"], "QString", "QString");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&udp_port, pJson["udpPort"], "qint32", "");
|
::SWGSDRangel::setValue(&udp_port, pJson["udpPort"], "qint32", "");
|
||||||
@ -237,6 +244,9 @@ SWGIEEE_802_15_4_ModSettings::asJsonObject() {
|
|||||||
if(m_udp_enabled_isSet){
|
if(m_udp_enabled_isSet){
|
||||||
obj->insert("udpEnabled", QJsonValue(udp_enabled));
|
obj->insert("udpEnabled", QJsonValue(udp_enabled));
|
||||||
}
|
}
|
||||||
|
if(m_m_udp_bytes_format_isSet){
|
||||||
|
obj->insert("m_udpBytesFormat", QJsonValue(m_udp_bytes_format));
|
||||||
|
}
|
||||||
if(udp_address != nullptr && *udp_address != QString("")){
|
if(udp_address != nullptr && *udp_address != QString("")){
|
||||||
toJsonValue(QString("udpAddress"), udp_address, obj, QString("QString"));
|
toJsonValue(QString("udpAddress"), udp_address, obj, QString("QString"));
|
||||||
}
|
}
|
||||||
@ -361,6 +371,16 @@ SWGIEEE_802_15_4_ModSettings::setUdpEnabled(qint32 udp_enabled) {
|
|||||||
this->m_udp_enabled_isSet = true;
|
this->m_udp_enabled_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGIEEE_802_15_4_ModSettings::getMUdpBytesFormat() {
|
||||||
|
return m_udp_bytes_format;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGIEEE_802_15_4_ModSettings::setMUdpBytesFormat(qint32 m_udp_bytes_format) {
|
||||||
|
this->m_udp_bytes_format = m_udp_bytes_format;
|
||||||
|
this->m_m_udp_bytes_format_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGIEEE_802_15_4_ModSettings::getUdpAddress() {
|
SWGIEEE_802_15_4_ModSettings::getUdpAddress() {
|
||||||
return udp_address;
|
return udp_address;
|
||||||
@ -493,6 +513,9 @@ SWGIEEE_802_15_4_ModSettings::isSet(){
|
|||||||
if(m_udp_enabled_isSet){
|
if(m_udp_enabled_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
if(m_m_udp_bytes_format_isSet){
|
||||||
|
isObjectUpdated = true; break;
|
||||||
|
}
|
||||||
if(udp_address && *udp_address != QString("")){
|
if(udp_address && *udp_address != QString("")){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,9 @@ public:
|
|||||||
qint32 getUdpEnabled();
|
qint32 getUdpEnabled();
|
||||||
void setUdpEnabled(qint32 udp_enabled);
|
void setUdpEnabled(qint32 udp_enabled);
|
||||||
|
|
||||||
|
qint32 getMUdpBytesFormat();
|
||||||
|
void setMUdpBytesFormat(qint32 m_udp_bytes_format);
|
||||||
|
|
||||||
QString* getUdpAddress();
|
QString* getUdpAddress();
|
||||||
void setUdpAddress(QString* udp_address);
|
void setUdpAddress(QString* udp_address);
|
||||||
|
|
||||||
@ -130,6 +133,9 @@ private:
|
|||||||
qint32 udp_enabled;
|
qint32 udp_enabled;
|
||||||
bool m_udp_enabled_isSet;
|
bool m_udp_enabled_isSet;
|
||||||
|
|
||||||
|
qint32 m_udp_bytes_format;
|
||||||
|
bool m_m_udp_bytes_format_isSet;
|
||||||
|
|
||||||
QString* udp_address;
|
QString* udp_address;
|
||||||
bool m_udp_address_isSet;
|
bool m_udp_address_isSet;
|
||||||
|
|
||||||
|
@ -72,8 +72,6 @@ SWGPacketModSettings::SWGPacketModSettings() {
|
|||||||
m_pre_emphasis_isSet = false;
|
m_pre_emphasis_isSet = false;
|
||||||
pre_emphasis_tau = 0.0f;
|
pre_emphasis_tau = 0.0f;
|
||||||
m_pre_emphasis_tau_isSet = false;
|
m_pre_emphasis_tau_isSet = false;
|
||||||
pre_emphasis_low_freq = 0.0f;
|
|
||||||
m_pre_emphasis_low_freq_isSet = false;
|
|
||||||
pre_emphasis_high_freq = 0.0f;
|
pre_emphasis_high_freq = 0.0f;
|
||||||
m_pre_emphasis_high_freq_isSet = false;
|
m_pre_emphasis_high_freq_isSet = false;
|
||||||
lpf_taps = 0;
|
lpf_taps = 0;
|
||||||
@ -186,8 +184,6 @@ SWGPacketModSettings::init() {
|
|||||||
m_pre_emphasis_isSet = false;
|
m_pre_emphasis_isSet = false;
|
||||||
pre_emphasis_tau = 0.0f;
|
pre_emphasis_tau = 0.0f;
|
||||||
m_pre_emphasis_tau_isSet = false;
|
m_pre_emphasis_tau_isSet = false;
|
||||||
pre_emphasis_low_freq = 0.0f;
|
|
||||||
m_pre_emphasis_low_freq_isSet = false;
|
|
||||||
pre_emphasis_high_freq = 0.0f;
|
pre_emphasis_high_freq = 0.0f;
|
||||||
m_pre_emphasis_high_freq_isSet = false;
|
m_pre_emphasis_high_freq_isSet = false;
|
||||||
lpf_taps = 0;
|
lpf_taps = 0;
|
||||||
@ -278,7 +274,6 @@ SWGPacketModSettings::cleanup() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(callsign != nullptr) {
|
if(callsign != nullptr) {
|
||||||
@ -376,8 +371,6 @@ SWGPacketModSettings::fromJsonObject(QJsonObject &pJson) {
|
|||||||
|
|
||||||
::SWGSDRangel::setValue(&pre_emphasis_tau, pJson["preEmphasisTau"], "float", "");
|
::SWGSDRangel::setValue(&pre_emphasis_tau, pJson["preEmphasisTau"], "float", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&pre_emphasis_low_freq, pJson["preEmphasisLowFreq"], "float", "");
|
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&pre_emphasis_high_freq, pJson["preEmphasisHighFreq"], "float", "");
|
::SWGSDRangel::setValue(&pre_emphasis_high_freq, pJson["preEmphasisHighFreq"], "float", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&lpf_taps, pJson["lpfTaps"], "qint32", "");
|
::SWGSDRangel::setValue(&lpf_taps, pJson["lpfTaps"], "qint32", "");
|
||||||
@ -520,9 +513,6 @@ SWGPacketModSettings::asJsonObject() {
|
|||||||
if(m_pre_emphasis_tau_isSet){
|
if(m_pre_emphasis_tau_isSet){
|
||||||
obj->insert("preEmphasisTau", QJsonValue(pre_emphasis_tau));
|
obj->insert("preEmphasisTau", QJsonValue(pre_emphasis_tau));
|
||||||
}
|
}
|
||||||
if(m_pre_emphasis_low_freq_isSet){
|
|
||||||
obj->insert("preEmphasisLowFreq", QJsonValue(pre_emphasis_low_freq));
|
|
||||||
}
|
|
||||||
if(m_pre_emphasis_high_freq_isSet){
|
if(m_pre_emphasis_high_freq_isSet){
|
||||||
obj->insert("preEmphasisHighFreq", QJsonValue(pre_emphasis_high_freq));
|
obj->insert("preEmphasisHighFreq", QJsonValue(pre_emphasis_high_freq));
|
||||||
}
|
}
|
||||||
@ -837,16 +827,6 @@ SWGPacketModSettings::setPreEmphasisTau(float pre_emphasis_tau) {
|
|||||||
this->m_pre_emphasis_tau_isSet = true;
|
this->m_pre_emphasis_tau_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
float
|
|
||||||
SWGPacketModSettings::getPreEmphasisLowFreq() {
|
|
||||||
return pre_emphasis_low_freq;
|
|
||||||
}
|
|
||||||
void
|
|
||||||
SWGPacketModSettings::setPreEmphasisLowFreq(float pre_emphasis_low_freq) {
|
|
||||||
this->pre_emphasis_low_freq = pre_emphasis_low_freq;
|
|
||||||
this->m_pre_emphasis_low_freq_isSet = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
float
|
float
|
||||||
SWGPacketModSettings::getPreEmphasisHighFreq() {
|
SWGPacketModSettings::getPreEmphasisHighFreq() {
|
||||||
return pre_emphasis_high_freq;
|
return pre_emphasis_high_freq;
|
||||||
@ -1218,9 +1198,6 @@ SWGPacketModSettings::isSet(){
|
|||||||
if(m_pre_emphasis_tau_isSet){
|
if(m_pre_emphasis_tau_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
if(m_pre_emphasis_low_freq_isSet){
|
|
||||||
isObjectUpdated = true; break;
|
|
||||||
}
|
|
||||||
if(m_pre_emphasis_high_freq_isSet){
|
if(m_pre_emphasis_high_freq_isSet){
|
||||||
isObjectUpdated = true; break;
|
isObjectUpdated = true; break;
|
||||||
}
|
}
|
||||||
|
@ -108,9 +108,6 @@ public:
|
|||||||
float getPreEmphasisTau();
|
float getPreEmphasisTau();
|
||||||
void setPreEmphasisTau(float pre_emphasis_tau);
|
void setPreEmphasisTau(float pre_emphasis_tau);
|
||||||
|
|
||||||
float getPreEmphasisLowFreq();
|
|
||||||
void setPreEmphasisLowFreq(float pre_emphasis_low_freq);
|
|
||||||
|
|
||||||
float getPreEmphasisHighFreq();
|
float getPreEmphasisHighFreq();
|
||||||
void setPreEmphasisHighFreq(float pre_emphasis_high_freq);
|
void setPreEmphasisHighFreq(float pre_emphasis_high_freq);
|
||||||
|
|
||||||
@ -271,9 +268,6 @@ private:
|
|||||||
float pre_emphasis_tau;
|
float pre_emphasis_tau;
|
||||||
bool m_pre_emphasis_tau_isSet;
|
bool m_pre_emphasis_tau_isSet;
|
||||||
|
|
||||||
float pre_emphasis_low_freq;
|
|
||||||
bool m_pre_emphasis_low_freq_isSet;
|
|
||||||
|
|
||||||
float pre_emphasis_high_freq;
|
float pre_emphasis_high_freq;
|
||||||
bool m_pre_emphasis_high_freq_isSet;
|
bool m_pre_emphasis_high_freq_isSet;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user