IEEE 802.15.4 modulator: API and GUI changes

This commit is contained in:
f4exb 2021-11-21 00:01:16 +01:00
parent 830e3ff2f2
commit 7c9327c125
19 changed files with 1435 additions and 308 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

View File

@ -153,17 +153,41 @@ void IEEE_802_15_4_Mod::applySettings(const IEEE_802_15_4_ModSettings& settings,
{ {
qDebug() << "IEEE_802_15_4_Mod::applySettings:" qDebug() << "IEEE_802_15_4_Mod::applySettings:"
<< " m_inputFrequencyOffset: " << settings.m_inputFrequencyOffset << " m_inputFrequencyOffset: " << settings.m_inputFrequencyOffset
<< " m_modulation: " << settings.m_modulation
<< " m_bitRate: " << settings.m_bitRate
<< " m_subGHzBand: " << settings.m_subGHzBand
<< " m_rfBandwidth: " << settings.m_rfBandwidth << " m_rfBandwidth: " << settings.m_rfBandwidth
<< " m_gain: " << settings.m_gain << " m_gain: " << settings.m_gain
<< " m_channelMute: " << settings.m_channelMute << " m_channelMute: " << settings.m_channelMute
<< " m_repeat: " << settings.m_repeat << " m_repeat: " << settings.m_repeat
<< " m_repeatDelay: " << settings.m_repeatDelay << " m_repeatDelay: " << settings.m_repeatDelay
<< " m_repeatCount: " << settings.m_repeatCount << " m_repeatCount: " << settings.m_repeatCount
<< " m_rampUpBits: " << settings.m_rampUpBits
<< " m_rampDownBits: " << settings.m_rampDownBits
<< " m_rampRange: " << settings.m_rampRange
<< " m_modulateWhileRamping: "<< settings.m_modulateWhileRamping
<< " m_lpfTaps: " << settings.m_lpfTaps
<< " m_bbNoise: " << settings.m_bbNoise
<< " m_writeToFile: " << settings.m_writeToFile
<< " m_spectrumRate: " << settings.m_spectrumRate
<< " m_data: " << settings.m_data
<< " m_rgbColor: " << settings.m_rgbColor
<< " m_title: " << settings.m_title
<< " m_streamIndex: " << settings.m_streamIndex
<< " m_useReverseAPI: " << settings.m_useReverseAPI << " m_useReverseAPI: " << settings.m_useReverseAPI
<< " m_reverseAPIAddress: " << settings.m_reverseAPIAddress << " m_reverseAPIAddress: " << settings.m_reverseAPIAddress
<< " m_reverseAPIAddress: " << settings.m_reverseAPIPort << " m_reverseAPIAddress: " << settings.m_reverseAPIPort
<< " m_reverseAPIDeviceIndex: " << settings.m_reverseAPIDeviceIndex << " m_reverseAPIDeviceIndex: " << settings.m_reverseAPIDeviceIndex
<< " m_reverseAPIChannelIndex: " << settings.m_reverseAPIChannelIndex << " m_reverseAPIChannelIndex: " << settings.m_reverseAPIChannelIndex
<< " m_scramble: " << settings.m_scramble
<< " m_polynomial: " << settings.m_polynomial
<< " m_pulseShaping: " << settings.m_pulseShaping
<< " m_beta: " << settings.m_beta
<< " m_symbolSpan: " << settings.m_symbolSpan
<< " m_udpEnabled: " << settings.m_udpEnabled
<< " m_udpBytesFormat: " << settings.m_udpBytesFormat
<< " m_udpAddress: " << settings.m_udpAddress
<< " m_udpPort: " << settings.m_udpPort
<< " force: " << force; << " force: " << force;
QList<QString> reverseAPIKeys; QList<QString> reverseAPIKeys;
@ -172,6 +196,18 @@ void IEEE_802_15_4_Mod::applySettings(const IEEE_802_15_4_ModSettings& settings,
reverseAPIKeys.append("inputFrequencyOffset"); reverseAPIKeys.append("inputFrequencyOffset");
} }
if ((settings.m_modulation != m_settings.m_modulation) || force) {
reverseAPIKeys.append("modulation");
}
if ((settings.m_bitRate != m_settings.m_bitRate) || force) {
reverseAPIKeys.append("bitRate");
}
if ((settings.m_subGHzBand != m_settings.m_subGHzBand) || force) {
reverseAPIKeys.append("subGHzBand");
}
if ((settings.m_rfBandwidth != m_settings.m_rfBandwidth) || force) { if ((settings.m_rfBandwidth != m_settings.m_rfBandwidth) || force) {
reverseAPIKeys.append("rfBandwidth"); reverseAPIKeys.append("rfBandwidth");
} }
@ -196,6 +232,94 @@ void IEEE_802_15_4_Mod::applySettings(const IEEE_802_15_4_ModSettings& settings,
reverseAPIKeys.append("repeatCount"); reverseAPIKeys.append("repeatCount");
} }
if ((settings.m_rampUpBits != m_settings.m_rampUpBits) || force) {
reverseAPIKeys.append("rampUpBits");
}
if ((settings.m_rampDownBits != m_settings.m_rampDownBits) || force) {
reverseAPIKeys.append("rampDownBits");
}
if ((settings.m_rampRange != m_settings.m_rampRange) || force) {
reverseAPIKeys.append("rampRange");
}
if ((settings.m_modulateWhileRamping != m_settings.m_modulateWhileRamping) || force) {
reverseAPIKeys.append("modulateWhileRamping");
}
if ((settings.m_lpfTaps != m_settings.m_lpfTaps) || force) {
reverseAPIKeys.append("lpfTaps");
}
if ((settings.m_bbNoise != m_settings.m_bbNoise) || force) {
reverseAPIKeys.append("bbNoise");
}
if ((settings.m_writeToFile != m_settings.m_writeToFile) || force) {
reverseAPIKeys.append("writeToFile");
}
if ((settings.m_spectrumRate != m_settings.m_spectrumRate) || force) {
reverseAPIKeys.append("spectrumRate");
}
if ((settings.m_data != m_settings.m_data) || force) {
reverseAPIKeys.append("data");
}
if ((settings.m_rgbColor != m_settings.m_rgbColor) || force) {
reverseAPIKeys.append("rgbColor");
}
if ((settings.m_title != m_settings.m_title) || force) {
reverseAPIKeys.append("title");
}
if ((settings.m_streamIndex != m_settings.m_streamIndex) || force) {
reverseAPIKeys.append("streamIndex");
}
if ((settings.m_useReverseAPI != m_settings.m_useReverseAPI) || force) {
reverseAPIKeys.append("useReverseAPI");
}
if ((settings.m_reverseAPIAddress != m_settings.m_reverseAPIAddress) || force) {
reverseAPIKeys.append("reverseAPIAddress");
}
if ((settings.m_reverseAPIPort != m_settings.m_reverseAPIPort) || force) {
reverseAPIKeys.append("reverseAPIPort");
}
if ((settings.m_reverseAPIDeviceIndex != m_settings.m_reverseAPIDeviceIndex) || force) {
reverseAPIKeys.append("reverseAPIDeviceIndex");
}
if ((settings.m_reverseAPIChannelIndex != m_settings.m_reverseAPIChannelIndex) || force) {
reverseAPIKeys.append("reverseAPIChannelIndex");
}
if ((settings.m_scramble != m_settings.m_scramble) || force) {
reverseAPIKeys.append("scramble");
}
if ((settings.m_polynomial != m_settings.m_polynomial) || force) {
reverseAPIKeys.append("polynomial");
}
if ((settings.m_pulseShaping != m_settings.m_pulseShaping) || force) {
reverseAPIKeys.append("pulseShaping");
}
if ((settings.m_beta != m_settings.m_beta) || force) {
reverseAPIKeys.append("beta");
}
if ((settings.m_symbolSpan != m_settings.m_symbolSpan) || force) {
reverseAPIKeys.append("symbolSpan");
}
if ((settings.m_udpEnabled != m_settings.m_udpEnabled) || force) { if ((settings.m_udpEnabled != m_settings.m_udpEnabled) || force) {
reverseAPIKeys.append("udpEnabled"); reverseAPIKeys.append("udpEnabled");
} }
@ -312,8 +436,14 @@ void IEEE_802_15_4_Mod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("inputFrequencyOffset")) { if (channelSettingsKeys.contains("inputFrequencyOffset")) {
settings.m_inputFrequencyOffset = response.getIeee802154ModSettings()->getInputFrequencyOffset(); settings.m_inputFrequencyOffset = response.getIeee802154ModSettings()->getInputFrequencyOffset();
} }
if (channelSettingsKeys.contains("phy")) { if (channelSettingsKeys.contains("modulation")) {
settings.setPHY(*response.getIeee802154ModSettings()->getPhy()); settings.m_modulation = (IEEE_802_15_4_ModSettings::Modulation) response.getIeee802154ModSettings()->getModulation();
}
if (channelSettingsKeys.contains("bitRate")) {
settings.m_bitRate = response.getIeee802154ModSettings()->getBitRate();
}
if (channelSettingsKeys.contains("subGHzBand")) {
settings.m_subGHzBand = response.getIeee802154ModSettings()->getSubGHzBand() != 0;
} }
if (channelSettingsKeys.contains("rfBandwidth")) { if (channelSettingsKeys.contains("rfBandwidth")) {
settings.m_rfBandwidth = response.getIeee802154ModSettings()->getRfBandwidth(); settings.m_rfBandwidth = response.getIeee802154ModSettings()->getRfBandwidth();
@ -333,17 +463,32 @@ void IEEE_802_15_4_Mod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("repeatCount")) { if (channelSettingsKeys.contains("repeatCount")) {
settings.m_repeatCount = response.getIeee802154ModSettings()->getRepeatCount(); settings.m_repeatCount = response.getIeee802154ModSettings()->getRepeatCount();
} }
if (channelSettingsKeys.contains("udpEnabled")) { if (channelSettingsKeys.contains("rampUpBits")) {
settings.m_udpEnabled = response.getIeee802154ModSettings()->getUdpEnabled() != 0; settings.m_rampUpBits = response.getIeee802154ModSettings()->getRampUpBits();
} }
if (channelSettingsKeys.contains("udpBytesFormat")) { if (channelSettingsKeys.contains("rampDownBits")) {
settings.m_udpBytesFormat = response.getIeee802154ModSettings()->getMUdpBytesFormat() != 0; settings.m_rampDownBits = response.getIeee802154ModSettings()->getRampDownBits();
} }
if (channelSettingsKeys.contains("udpAddress")) { if (channelSettingsKeys.contains("rampRange")) {
settings.m_udpAddress = *response.getIeee802154ModSettings()->getUdpAddress(); settings.m_rampRange = response.getIeee802154ModSettings()->getRampRange();
} }
if (channelSettingsKeys.contains("udpPort")) { if (channelSettingsKeys.contains("modulateWhileRamping")) {
settings.m_udpPort = response.getIeee802154ModSettings()->getUdpPort(); settings.m_modulateWhileRamping = response.getIeee802154ModSettings()->getModulateWhileRamping() != 0;
}
if (channelSettingsKeys.contains("lpfTaps")) {
settings.m_lpfTaps = response.getIeee802154ModSettings()->getLpfTaps();
}
if (channelSettingsKeys.contains("bbNoise")) {
settings.m_bbNoise = response.getIeee802154ModSettings()->getBbNoise() != 0;
}
if (channelSettingsKeys.contains("writeToFile")) {
settings.m_writeToFile = response.getIeee802154ModSettings()->getWriteToFile() != 0;
}
if (channelSettingsKeys.contains("spectrumRate")) {
settings.m_spectrumRate = response.getIeee802154ModSettings()->getSpectrumRate();
}
if (channelSettingsKeys.contains("data")) {
settings.m_data = *response.getIeee802154ModSettings()->getData();
} }
if (channelSettingsKeys.contains("rgbColor")) { if (channelSettingsKeys.contains("rgbColor")) {
settings.m_rgbColor = response.getIeee802154ModSettings()->getRgbColor(); settings.m_rgbColor = response.getIeee802154ModSettings()->getRgbColor();
@ -369,6 +514,33 @@ void IEEE_802_15_4_Mod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) { if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getIeee802154ModSettings()->getReverseApiChannelIndex(); settings.m_reverseAPIChannelIndex = response.getIeee802154ModSettings()->getReverseApiChannelIndex();
} }
if (channelSettingsKeys.contains("scramble")) {
settings.m_scramble = response.getIeee802154ModSettings()->getScramble() != 0;
}
if (channelSettingsKeys.contains("polynomial")) {
settings.m_polynomial = response.getIeee802154ModSettings()->getPolynomial();
}
if (channelSettingsKeys.contains("pulseShaping")) {
settings.m_pulseShaping = (IEEE_802_15_4_ModSettings::PulseShaping) response.getIeee802154ModSettings()->getPulseShaping();
}
if (channelSettingsKeys.contains("beta")) {
settings.m_beta = response.getIeee802154ModSettings()->getBeta();
}
if (channelSettingsKeys.contains("symbolSpan")) {
settings.m_symbolSpan = response.getIeee802154ModSettings()->getSymbolSpan();
}
if (channelSettingsKeys.contains("udpEnabled")) {
settings.m_udpEnabled = response.getIeee802154ModSettings()->getUdpEnabled() != 0;
}
if (channelSettingsKeys.contains("udpBytesFormat")) {
settings.m_udpBytesFormat = response.getIeee802154ModSettings()->getUdpBytesFormat() != 0;
}
if (channelSettingsKeys.contains("udpAddress")) {
settings.m_udpAddress = *response.getIeee802154ModSettings()->getUdpAddress();
}
if (channelSettingsKeys.contains("udpPort")) {
settings.m_udpPort = response.getIeee802154ModSettings()->getUdpPort();
}
} }
int IEEE_802_15_4_Mod::webapiReportGet( int IEEE_802_15_4_Mod::webapiReportGet(
@ -391,14 +563,19 @@ int IEEE_802_15_4_Mod::webapiActionsPost(
if (swgIEEE_802_15_4_ModActions) if (swgIEEE_802_15_4_ModActions)
{ {
if (channelActionsKeys.contains("tx")) if (channelActionsKeys.contains("tx") && (swgIEEE_802_15_4_ModActions->getTx() != 0))
{ {
SWGSDRangel::SWGIEEE_802_15_4_ModActions_tx* tx = swgIEEE_802_15_4_ModActions->getTx(); QString *dataP;
QString *dataP = tx->getData();
if (channelActionsKeys.contains("data")) {
dataP = swgIEEE_802_15_4_ModActions->getData();
} else {
dataP = &m_settings.m_data;
}
if (dataP != nullptr) if (dataP != nullptr)
{ {
QString data(*dataP); QString data(*dataP);
IEEE_802_15_4_Mod::MsgTxHexString *msg = IEEE_802_15_4_Mod::MsgTxHexString::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;
@ -425,17 +602,24 @@ int IEEE_802_15_4_Mod::webapiActionsPost(
void IEEE_802_15_4_Mod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const IEEE_802_15_4_ModSettings& settings) void IEEE_802_15_4_Mod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const IEEE_802_15_4_ModSettings& settings)
{ {
response.getIeee802154ModSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset); response.getIeee802154ModSettings()->setInputFrequencyOffset(settings.m_inputFrequencyOffset);
response.getIeee802154ModSettings()->setPhy(new QString(settings.getPHY())); response.getIeee802154ModSettings()->setModulation((int) settings.m_modulation);
response.getIeee802154ModSettings()->setBitRate(settings.m_bitRate);
response.getIeee802154ModSettings()->setSubGHzBand(settings.m_subGHzBand ? 1 : 0);
response.getIeee802154ModSettings()->setRfBandwidth(settings.m_rfBandwidth); response.getIeee802154ModSettings()->setRfBandwidth(settings.m_rfBandwidth);
response.getIeee802154ModSettings()->setGain(settings.m_gain); response.getIeee802154ModSettings()->setGain(settings.m_gain);
response.getIeee802154ModSettings()->setChannelMute(settings.m_channelMute ? 1 : 0); response.getIeee802154ModSettings()->setChannelMute(settings.m_channelMute ? 1 : 0);
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 ? 1 : 0); response.getIeee802154ModSettings()->setRampUpBits(settings.m_rampUpBits);
response.getIeee802154ModSettings()->setMUdpBytesFormat(settings.m_udpBytesFormat ? 1 : 0); response.getIeee802154ModSettings()->setRampDownBits(settings.m_rampDownBits);
response.getIeee802154ModSettings()->setUdpAddress(new QString(settings.m_udpAddress)); response.getIeee802154ModSettings()->setRampRange(settings.m_rampRange);
response.getIeee802154ModSettings()->setUdpPort(settings.m_udpPort); response.getIeee802154ModSettings()->setModulateWhileRamping(settings.m_modulateWhileRamping ? 1 : 0);
response.getIeee802154ModSettings()->setLpfTaps(settings.m_lpfTaps);
response.getIeee802154ModSettings()->setBbNoise(settings.m_bbNoise ? 1 : 0);
response.getIeee802154ModSettings()->setWriteToFile(settings.m_writeToFile ? 1 : 0);
response.getIeee802154ModSettings()->setSpectrumRate(settings.m_spectrumRate);
response.getIeee802154ModSettings()->setData(new QString(settings.m_data));
response.getIeee802154ModSettings()->setRgbColor(settings.m_rgbColor); response.getIeee802154ModSettings()->setRgbColor(settings.m_rgbColor);
if (response.getIeee802154ModSettings()->getTitle()) { if (response.getIeee802154ModSettings()->getTitle()) {
@ -444,6 +628,7 @@ void IEEE_802_15_4_Mod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSetti
response.getIeee802154ModSettings()->setTitle(new QString(settings.m_title)); response.getIeee802154ModSettings()->setTitle(new QString(settings.m_title));
} }
response.getIeee802154ModSettings()->setStreamIndex(settings.m_streamIndex);
response.getIeee802154ModSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0); response.getIeee802154ModSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
if (response.getIeee802154ModSettings()->getReverseApiAddress()) { if (response.getIeee802154ModSettings()->getReverseApiAddress()) {
@ -455,6 +640,21 @@ void IEEE_802_15_4_Mod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSetti
response.getIeee802154ModSettings()->setReverseApiPort(settings.m_reverseAPIPort); response.getIeee802154ModSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getIeee802154ModSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex); response.getIeee802154ModSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getIeee802154ModSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex); response.getIeee802154ModSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
response.getIeee802154ModSettings()->setScramble(settings.m_scramble);
response.getIeee802154ModSettings()->setPolynomial(settings.m_polynomial);
response.getIeee802154ModSettings()->setPulseShaping(settings.m_pulseShaping ? 1 : 0);
response.getIeee802154ModSettings()->setBeta(settings.m_beta);
response.getIeee802154ModSettings()->setSymbolSpan(settings.m_symbolSpan);
response.getIeee802154ModSettings()->setUdpEnabled(settings.m_udpEnabled ? 1 : 0);
response.getIeee802154ModSettings()->setUdpBytesFormat(settings.m_udpBytesFormat ? 1 : 0);
if (response.getIeee802154ModSettings()->getUdpAddress()) {
*response.getIeee802154ModSettings()->getUdpAddress() = settings.m_udpAddress;
} else {
response.getIeee802154ModSettings()->setUdpAddress(new QString(settings.m_udpAddress));
}
response.getIeee802154ModSettings()->setUdpPort(settings.m_udpPort);
} }
void IEEE_802_15_4_Mod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response) void IEEE_802_15_4_Mod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -529,6 +729,15 @@ void IEEE_802_15_4_Mod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("inputFrequencyOffset") || force) { if (channelSettingsKeys.contains("inputFrequencyOffset") || force) {
swgIEEE_802_15_4_ModSettings->setInputFrequencyOffset(settings.m_inputFrequencyOffset); swgIEEE_802_15_4_ModSettings->setInputFrequencyOffset(settings.m_inputFrequencyOffset);
} }
if (channelSettingsKeys.contains("modulation") || force) {
swgIEEE_802_15_4_ModSettings->setModulation((int) settings.m_modulation);
}
if (channelSettingsKeys.contains("bitRate") || force) {
swgIEEE_802_15_4_ModSettings->setBitRate(settings.m_bitRate);
}
if (channelSettingsKeys.contains("subGHzBand") || force) {
swgIEEE_802_15_4_ModSettings->setSubGHzBand(settings.m_subGHzBand ? 1 : 0);
}
if (channelSettingsKeys.contains("rfBandwidth") || force) { if (channelSettingsKeys.contains("rfBandwidth") || force) {
swgIEEE_802_15_4_ModSettings->setRfBandwidth(settings.m_rfBandwidth); swgIEEE_802_15_4_ModSettings->setRfBandwidth(settings.m_rfBandwidth);
} }
@ -547,17 +756,32 @@ void IEEE_802_15_4_Mod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("repeatCount") || force) { if (channelSettingsKeys.contains("repeatCount") || force) {
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("rampUpBits") || force) {
swgIEEE_802_15_4_ModSettings->setUdpEnabled(settings.m_udpEnabled ? 1 : 0); swgIEEE_802_15_4_ModSettings->setRampUpBits(settings.m_rampUpBits);
} }
if (channelSettingsKeys.contains("udpBytesFormat") || force) { if (channelSettingsKeys.contains("rampDownBits") || force) {
swgIEEE_802_15_4_ModSettings->setMUdpBytesFormat(settings.m_udpBytesFormat ? 1 : 0); swgIEEE_802_15_4_ModSettings->setRampDownBits(settings.m_rampDownBits);
} }
if (channelSettingsKeys.contains("udpAddress") || force) { if (channelSettingsKeys.contains("rampRange") || force) {
swgIEEE_802_15_4_ModSettings->setUdpAddress(new QString(settings.m_udpAddress)); swgIEEE_802_15_4_ModSettings->setRampRange(settings.m_rampRange);
} }
if (channelSettingsKeys.contains("udpPort") || force) { if (channelSettingsKeys.contains("rampRange") || force) {
swgIEEE_802_15_4_ModSettings->setUdpPort(settings.m_udpPort); swgIEEE_802_15_4_ModSettings->setModulateWhileRamping(settings.m_modulateWhileRamping ? 1 : 0);
}
if (channelSettingsKeys.contains("lpfTaps") || force) {
swgIEEE_802_15_4_ModSettings->setLpfTaps(settings.m_lpfTaps);
}
if (channelSettingsKeys.contains("bbNoise") || force) {
swgIEEE_802_15_4_ModSettings->setBbNoise(settings.m_bbNoise ? 1 : 0);
}
if (channelSettingsKeys.contains("writeToFile") || force) {
swgIEEE_802_15_4_ModSettings->setWriteToFile(settings.m_writeToFile ? 1 : 0);
}
if (channelSettingsKeys.contains("spectrumRate") || force) {
swgIEEE_802_15_4_ModSettings->setSpectrumRate(settings.m_spectrumRate);
}
if (channelSettingsKeys.contains("data") || force) {
swgIEEE_802_15_4_ModSettings->setData(new QString(settings.m_data));
} }
if (channelSettingsKeys.contains("rgbColor") || force) { if (channelSettingsKeys.contains("rgbColor") || force) {
swgIEEE_802_15_4_ModSettings->setRgbColor(settings.m_rgbColor); swgIEEE_802_15_4_ModSettings->setRgbColor(settings.m_rgbColor);
@ -568,6 +792,48 @@ void IEEE_802_15_4_Mod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) { if (channelSettingsKeys.contains("streamIndex") || force) {
swgIEEE_802_15_4_ModSettings->setStreamIndex(settings.m_streamIndex); swgIEEE_802_15_4_ModSettings->setStreamIndex(settings.m_streamIndex);
} }
if (channelSettingsKeys.contains("useReverseAPI") || force) {
swgIEEE_802_15_4_ModSettings->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
}
if (channelSettingsKeys.contains("reverseAPIAddress") || force) {
swgIEEE_802_15_4_ModSettings->setReverseApiAddress(new QString(settings.m_reverseAPIAddress));
}
if (channelSettingsKeys.contains("reverseAPIPort") || force) {
swgIEEE_802_15_4_ModSettings->setReverseApiPort(settings.m_reverseAPIPort);
}
if (channelSettingsKeys.contains("reverseAPIDeviceIndex") || force) {
swgIEEE_802_15_4_ModSettings->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
}
if (channelSettingsKeys.contains("reverseAPIChannelIndex") || force) {
swgIEEE_802_15_4_ModSettings->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
}
if (channelSettingsKeys.contains("scramble") || force) {
swgIEEE_802_15_4_ModSettings->setScramble(settings.m_scramble ? 1 : 0);
}
if (channelSettingsKeys.contains("polynomial") || force) {
swgIEEE_802_15_4_ModSettings->setPolynomial(settings.m_polynomial);
}
if (channelSettingsKeys.contains("pulseShaping") || force) {
swgIEEE_802_15_4_ModSettings->setPolynomial(settings.m_pulseShaping ? 1 : 0);
}
if (channelSettingsKeys.contains("beta") || force) {
swgIEEE_802_15_4_ModSettings->setBeta(settings.m_beta);
}
if (channelSettingsKeys.contains("symbolSpan") || force) {
swgIEEE_802_15_4_ModSettings->setBeta(settings.m_symbolSpan);
}
if (channelSettingsKeys.contains("udpEnabled") || force) {
swgIEEE_802_15_4_ModSettings->setUdpEnabled(settings.m_udpEnabled ? 1 : 0);
}
if (channelSettingsKeys.contains("udpBytesFormat") || force) {
swgIEEE_802_15_4_ModSettings->setUdpBytesFormat(settings.m_udpBytesFormat ? 1 : 0);
}
if (channelSettingsKeys.contains("udpAddress") || force) {
swgIEEE_802_15_4_ModSettings->setUdpAddress(new QString(settings.m_udpAddress));
}
if (channelSettingsKeys.contains("udpPort") || force) {
swgIEEE_802_15_4_ModSettings->setUdpPort(settings.m_udpPort);
}
} }
void IEEE_802_15_4_Mod::networkManagerFinished(QNetworkReply *reply) void IEEE_802_15_4_Mod::networkManagerFinished(QNetworkReply *reply)

View File

@ -21,6 +21,7 @@
#include <QFileDialog> #include <QFileDialog>
#include <QTime> #include <QTime>
#include <QDebug> #include <QDebug>
#include <QMessageBox>
#include "device/deviceuiset.h" #include "device/deviceuiset.h"
#include "plugin/pluginapi.h" #include "plugin/pluginapi.h"
@ -110,6 +111,7 @@ bool IEEE_802_15_4_ModGUI::handleMessage(const Message& message)
} }
else if (IEEE_802_15_4_Mod::MsgConfigureIEEE_802_15_4_Mod::match(message)) else if (IEEE_802_15_4_Mod::MsgConfigureIEEE_802_15_4_Mod::match(message))
{ {
qDebug("IEEE_802_15_4_ModGUI::handleMessage: MsgConfigureIEEE_802_15_4_Mod");
const IEEE_802_15_4_Mod::MsgConfigureIEEE_802_15_4_Mod& cfg = (IEEE_802_15_4_Mod::MsgConfigureIEEE_802_15_4_Mod&) message; const IEEE_802_15_4_Mod::MsgConfigureIEEE_802_15_4_Mod& cfg = (IEEE_802_15_4_Mod::MsgConfigureIEEE_802_15_4_Mod&) message;
m_settings = cfg.getSettings(); m_settings = cfg.getSettings();
blockApplySettings(true); blockApplySettings(true);
@ -147,12 +149,22 @@ void IEEE_802_15_4_ModGUI::handleSourceMessages()
void IEEE_802_15_4_ModGUI::checkSampleRate() void IEEE_802_15_4_ModGUI::checkSampleRate()
{ {
int cr = m_settings.getChipRate(); int cr = m_settings.getChipRate();
if ((m_basebandSampleRate % cr) != 0) if ((m_basebandSampleRate % cr) != 0)
setWindowTitle(m_channelMarker.getTitle() + " - Baseband sample rate is not an integer multiple of chip rate"); {
ui->chipRateText->setStyleSheet("QLabel { background:rgb(200,50,50); }");
ui->chipRateText->setToolTip(QString("Baseband sample rate %1 S/s is not an integer multiple of chip rate %2 S/s").arg(m_basebandSampleRate).arg(cr));
}
else if ((m_basebandSampleRate / cr) <= 2) else if ((m_basebandSampleRate / cr) <= 2)
setWindowTitle(m_channelMarker.getTitle() + " - Baseband sample rate is too low"); {
ui->chipRateText->setStyleSheet("QLabel { background:rgb(200,50,50); }");
ui->chipRateText->setToolTip(QString("Baseband sample rate %1 S/s is too low for chip rate %2 S/s").arg(m_basebandSampleRate).arg(cr));
}
else else
setWindowTitle(m_channelMarker.getTitle()); {
ui->chipRateText->setStyleSheet("QLabel { background:rgb(79,79,79); }");
ui->chipRateText->setToolTip("Chip rate");
}
} }
void IEEE_802_15_4_ModGUI::on_deltaFrequency_changed(qint64 value) void IEEE_802_15_4_ModGUI::on_deltaFrequency_changed(qint64 value)
@ -172,11 +184,12 @@ void IEEE_802_15_4_ModGUI::on_phy_currentIndexChanged(int value)
if (m_doApplySettings) if (m_doApplySettings)
m_settings.setPHY(phy); m_settings.setPHY(phy);
ui->rfBWText->setText(QString("%1M").arg(m_settings.m_rfBandwidth / 1000000.0, 0, 'f', 1)); displayRFBandwidth(m_settings.m_rfBandwidth);
ui->rfBW->setValue(m_settings.m_rfBandwidth / 1000.0); ui->rfBW->setValue(m_settings.m_rfBandwidth / 1000.0);
ui->glSpectrum->setCenterFrequency(0); ui->glSpectrum->setCenterFrequency(0);
ui->glSpectrum->setSampleRate(m_settings.m_spectrumRate); ui->glSpectrum->setSampleRate(m_settings.m_spectrumRate);
checkSampleRate(); displayChipRate(m_settings);
checkSampleRate();
applySettings(); applySettings();
// Remove custom PHY when deselected, as we no longer know how to set it // Remove custom PHY when deselected, as we no longer know how to set it
@ -187,7 +200,7 @@ void IEEE_802_15_4_ModGUI::on_phy_currentIndexChanged(int value)
void IEEE_802_15_4_ModGUI::on_rfBW_valueChanged(int value) void IEEE_802_15_4_ModGUI::on_rfBW_valueChanged(int value)
{ {
float bw = value * 1000.0f; float bw = value * 1000.0f;
ui->rfBWText->setText(QString("%1M").arg(value / 1000.0, 0, 'f', 1)); displayRFBandwidth(bw);
m_channelMarker.setBandwidth(bw); m_channelMarker.setBandwidth(bw);
m_settings.m_rfBandwidth = bw; m_settings.m_rfBandwidth = bw;
applySettings(); applySettings();
@ -241,14 +254,22 @@ void IEEE_802_15_4_ModGUI::repeatSelect()
void IEEE_802_15_4_ModGUI::txSettingsSelect() void IEEE_802_15_4_ModGUI::txSettingsSelect()
{ {
IEEE_802_15_4_ModTXSettingsDialog dialog(m_settings.m_rampUpBits, m_settings.m_rampDownBits, IEEE_802_15_4_ModTXSettingsDialog dialog(
m_settings.m_rampRange, m_settings.m_modulateWhileRamping, m_settings.m_rampUpBits,
m_settings.m_modulation, m_settings.m_bitRate, m_settings.m_rampDownBits,
m_settings.m_pulseShaping, m_settings.m_beta, m_settings.m_symbolSpan, m_settings.m_rampRange,
m_settings.m_scramble, m_settings.m_polynomial, m_settings.m_modulateWhileRamping,
m_settings.m_lpfTaps, m_settings.m_modulation,
m_settings.m_bbNoise, m_settings.m_bitRate,
m_settings.m_writeToFile); m_settings.m_pulseShaping,
m_settings.m_beta,
m_settings.m_symbolSpan,
m_settings.m_scramble,
m_settings.m_polynomial,
m_settings.m_lpfTaps,
m_settings.m_bbNoise,
m_settings.m_writeToFile
);
if (dialog.exec() == QDialog::Accepted) if (dialog.exec() == QDialog::Accepted)
{ {
m_settings.m_rampUpBits = dialog.m_rampUpBits; m_settings.m_rampUpBits = dialog.m_rampUpBits;
@ -523,9 +544,11 @@ void IEEE_802_15_4_ModGUI::displaySettings()
ui->glSpectrum->setCenterFrequency(0); ui->glSpectrum->setCenterFrequency(0);
ui->glSpectrum->setSampleRate(m_settings.m_spectrumRate); ui->glSpectrum->setSampleRate(m_settings.m_spectrumRate);
ui->rfBWText->setText(QString("%1M").arg(m_settings.m_rfBandwidth / 1000000.0, 0, 'f', 1)); displayRFBandwidth(m_settings.m_rfBandwidth);
ui->rfBW->setValue(m_settings.m_rfBandwidth / 1000.0); ui->rfBW->setValue(m_settings.m_rfBandwidth / 1000.0);
displayChipRate(m_settings);
ui->gainText->setText(QString("%1").arg((double)m_settings.m_gain, 0, 'f', 1)); ui->gainText->setText(QString("%1").arg((double)m_settings.m_gain, 0, 'f', 1));
ui->gain->setValue(m_settings.m_gain); ui->gain->setValue(m_settings.m_gain);
@ -541,6 +564,35 @@ void IEEE_802_15_4_ModGUI::displaySettings()
blockApplySettings(false); blockApplySettings(false);
} }
void IEEE_802_15_4_ModGUI::displayRFBandwidth(int bandwidth)
{
ui->rfBWText->setText(getDisplayValueWithMultiplier(bandwidth));
}
void IEEE_802_15_4_ModGUI::displayChipRate(const IEEE_802_15_4_ModSettings& settings)
{
ui->chipRateText->setText(getDisplayValueWithMultiplier(settings.getChipRate()));
}
QString IEEE_802_15_4_ModGUI::getDisplayValueWithMultiplier(int value)
{
if (value < 1000) {
return QString("%1").arg(value);
} else if (value < 10000) {
return QString("%1k").arg(value / 1000.0, 0, 'f', 2);
} else if (value < 100000) {
return QString("%1k").arg(value / 1000.0, 0, 'f', 1);
} else if (value < 1000000) {
return QString("%1k").arg(value / 1000.0);
} else if (value < 10000000) {
return QString("%1M").arg(value / 1000000.0, 0, 'f', 2);
} else if (value < 100000000) {
return QString("%1M").arg(value / 1000000.0, 0, 'f', 1);
} else {
return QString("%1M").arg(value / 1000000.0);
}
}
void IEEE_802_15_4_ModGUI::displayStreamIndex() void IEEE_802_15_4_ModGUI::displayStreamIndex()
{ {
if (m_deviceUISet->m_deviceMIMOEngine) { if (m_deviceUISet->m_deviceMIMOEngine) {

View File

@ -84,6 +84,9 @@ private:
void applySettings(bool force = false); void applySettings(bool force = false);
void displaySettings(); void displaySettings();
void displayStreamIndex(); void displayStreamIndex();
void displayRFBandwidth(int bandwidth);
void displayChipRate(const IEEE_802_15_4_ModSettings& settings);
QString getDisplayValueWithMultiplier(int value);
void leaveEvent(QEvent*); void leaveEvent(QEvent*);
void enterEvent(QEvent*); void enterEvent(QEvent*);

View File

@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>363</width> <width>605</width>
<height>937</height> <height>937</height>
</rect> </rect>
</property> </property>
@ -42,13 +42,13 @@
<rect> <rect>
<x>2</x> <x>2</x>
<y>2</y> <y>2</y>
<width>341</width> <width>600</width>
<height>151</height> <height>151</height>
</rect> </rect>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>280</width> <width>600</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -192,7 +192,7 @@
<widget class="QComboBox" name="phy"> <widget class="QComboBox" name="phy">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>170</width> <width>200</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
@ -241,9 +241,25 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="Line" name="line_2"> <widget class="QLabel" name="chipRateLabel">
<property name="orientation"> <property name="text">
<enum>Qt::Vertical</enum> <string>CR</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="chipRateText">
<property name="minimumSize">
<size>
<width>45</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>1000k</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
@ -272,16 +288,16 @@
<string>RF bandwidth</string> <string>RF bandwidth</string>
</property> </property>
<property name="minimum"> <property name="minimum">
<number>300</number> <number>30</number>
</property> </property>
<property name="maximum"> <property name="maximum">
<number>10000</number> <number>10000</number>
</property> </property>
<property name="singleStep"> <property name="singleStep">
<number>100</number> <number>1</number>
</property> </property>
<property name="pageStep"> <property name="pageStep">
<number>100</number> <number>1</number>
</property> </property>
<property name="value"> <property name="value">
<number>300</number> <number>300</number>
@ -295,25 +311,18 @@
<widget class="QLabel" name="rfBWText"> <widget class="QLabel" name="rfBWText">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>30</width> <width>40</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>2.0M</string> <string>10.0M</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item> <item>
@ -575,7 +584,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>190</y> <y>190</y>
<width>351</width> <width>600</width>
<height>141</height> <height>141</height>
</rect> </rect>
</property> </property>
@ -585,6 +594,12 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>600</width>
<height>0</height>
</size>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Transmitted Frames</string> <string>Transmitted Frames</string>
</property> </property>
@ -618,10 +633,16 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>340</y> <y>340</y>
<width>351</width> <width>600</width>
<height>284</height> <height>284</height>
</rect> </rect>
</property> </property>
<property name="minimumSize">
<size>
<width>600</width>
<height>0</height>
</size>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Baseband Waveform</string> <string>Baseband Waveform</string>
</property> </property>
@ -667,10 +688,16 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>630</y> <y>630</y>
<width>351</width> <width>600</width>
<height>284</height> <height>284</height>
</rect> </rect>
</property> </property>
<property name="minimumSize">
<size>
<width>600</width>
<height>0</height>
</size>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Baseband Spectrum</string> <string>Baseband Spectrum</string>
</property> </property>

View File

@ -77,13 +77,15 @@ void IEEE_802_15_4_ModSettings::resetToDefaults()
bool IEEE_802_15_4_ModSettings::setPHY(QString phy) bool IEEE_802_15_4_ModSettings::setPHY(QString phy)
{ {
int bitRate; float bitRate;
bool valid; bool valid;
// First part of phy string should give bitrate in kbps // First part of phy string should give bitrate in kbps
bitRate = phy.split("k")[0].toInt(&valid) * 1000; bitRate = phy.split("k")[0].toFloat(&valid) * 1000.0f;
if (!valid)
if (!valid) {
return false; return false;
}
if (phy.contains("BPSK")) if (phy.contains("BPSK"))
{ {
@ -119,7 +121,13 @@ bool IEEE_802_15_4_ModSettings::setPHY(QString phy)
QString IEEE_802_15_4_ModSettings::getPHY() const QString IEEE_802_15_4_ModSettings::getPHY() const
{ {
return QString("%1kbps %2").arg(m_bitRate/1000).arg(m_modulation == IEEE_802_15_4_ModSettings::BPSK ? "BPSK" : "O-QPSK"); int decPos = 0;
if (m_bitRate < 10000) {
decPos = 1;
}
return QString("%1kbps %2").arg(m_bitRate / 1000.0, 0, 'f', decPos).arg(m_modulation == IEEE_802_15_4_ModSettings::BPSK ? "BPSK" : "O-QPSK");
} }
int IEEE_802_15_4_ModSettings::getChipRate() const int IEEE_802_15_4_ModSettings::getChipRate() const
@ -136,6 +144,7 @@ int IEEE_802_15_4_ModSettings::getChipRate() const
bitsPerSymbol = 4; bitsPerSymbol = 4;
chipsPerSymbol = m_subGHzBand ? 16 : 32; chipsPerSymbol = m_subGHzBand ? 16 : 32;
} }
return m_bitRate * chipsPerSymbol / bitsPerSymbol; return m_bitRate * chipsPerSymbol / bitsPerSymbol;
} }

View File

@ -27,10 +27,20 @@ class Serializable;
struct IEEE_802_15_4_ModSettings struct IEEE_802_15_4_ModSettings
{ {
enum Modulation {
BPSK,
OQPSK
};
enum PulseShaping {
RC,
SINE
};
static const int infinitePackets = -1; static const int infinitePackets = -1;
qint64 m_inputFrequencyOffset; qint64 m_inputFrequencyOffset;
enum Modulation {BPSK, OQPSK} m_modulation; Modulation m_modulation;
int m_bitRate; int m_bitRate;
bool m_subGHzBand; bool m_subGHzBand;
Real m_rfBandwidth; Real m_rfBandwidth;
@ -59,7 +69,7 @@ struct IEEE_802_15_4_ModSettings
uint16_t m_reverseAPIChannelIndex; uint16_t m_reverseAPIChannelIndex;
bool m_scramble; bool m_scramble;
int m_polynomial; int m_polynomial;
enum PulseShaping {RC, SINE} m_pulseShaping; PulseShaping m_pulseShaping;
float m_beta; float m_beta;
int m_symbolSpan; int m_symbolSpan;
bool m_udpEnabled; bool m_udpEnabled;

View File

@ -33,52 +33,79 @@ Channel Page | Channels | Frequencies (MHz) | Bit rate (kbps) | Chip rate (kcps
0 | 11-26 | 2405, 2410... 2480 | 250 | 2000 | O-QPSK | Sine | 8 0 | 11-26 | 2405, 2410... 2480 | 250 | 2000 | O-QPSK | Sine | 8
2 | 0 | 868.3 | 100 | 400 | O-QPSK | Sine/RC | 2.4 2 | 0 | 868.3 | 100 | 400 | O-QPSK | Sine/RC | 2.4
2 | 1-10 | 906, 908... 926 | 250 | 1000 | O-QPSK | Sine | 4 2 | 1-10 | 906, 908... 926 | 250 | 1000 | O-QPSK | Sine | 4
5 | 0-3 | 780, 782.. 786 | 250 | 1000 | O-QPSK | RC r=.8 | 4 5 | 0-3 | 780, 782... 786 | 250 | 1000 | O-QPSK | RC r=.8 | 4
11 | 0-6 | 2363, 2368... 2393 | 250 | 2000 | O-QPSK | Sine | 8 11 | 0-6 | 2363, 2368... 2393 | 250 | 2000 | O-QPSK | Sine | 8
11 | 7-13 | 2367, 2372... 2397 | 250 | 2000 | O-QPSK | Sine | 8 11 | 7-13 | 2367, 2372... 2397 | 250 | 2000 | O-QPSK | Sine | 8
11 | 14 | 2395 | 250 | 2000 | O-QPSK | Sine | 8 11 | 14 | 2395 | 250 | 2000 | O-QPSK | Sine | 8
<h3>5: RF Bandwidth</h3> <h3>5: Chip rate</h3>
This is the chip rate. It must be a multiple of the baseband sample rate and the baseband sample rate should be at least twice the chip rate. If one or both of these conditions are not met the background turns to red and the tooltip details the condition.
<h3>6: RF Bandwidth</h3>
This specifies the bandwidth of a LPF that is applied to the output signal to limit the RF bandwidth. This specifies the bandwidth of a LPF that is applied to the output signal to limit the RF bandwidth.
PHY | Occupied BW (99%) PHY | Occupied BW (99%)
----------------------------|------------------- ----------------------------|-------------------
20kbps BPSK | 400kHz 20kbps BPSK | 400kHz
40kbps BPSK | 760kHz 40kbps BPSK | 760kHz
100kbps O-QPSK | 330kHz 100kbps O-QPSK | 330kHz
250kbps <1GHz O-QPSK (Sine) | 1.2MHz 250kbps <1GHz O-QPSK (Sine) | 1.2MHz
250kbps <1GHz O-QPSK (RC) | 1.2MHz 250kbps <1GHz O-QPSK (RC) | 1.2MHz
250kbps >2GHz O-QPSK | 2.6MHz 250kbps >2GHz O-QPSK | 2.6MHz
<h3>6: Gain</h3> <h3>7: Gain</h3>
Adjusts the gain in dB from -60 to 0dB. The gain should be set to ensure the level meter remains below 100%. If the baseband signal clips, this can lead to out-of-band spurious. Adjusts the gain in dB from -60 to 0dB. The gain should be set to ensure the level meter remains below 100% (see 8). If the baseband signal clips, this can lead to out-of-band spurious.
<h3>7: Level meter in %</h3> <h3>8: Level meter in %</h3>
- top bar (beige): average value - top bar (beige): average value
- bottom bar (brown): instantaneous peak value - bottom bar (brown): instantaneous peak value
- tip vertical bar (bright red): peak hold value - tip vertical bar (bright red): peak hold value
<h3>8: Data</h3> <h3>9: UDP input</h3>
Check to get data from UDP
<h3>10: UDP address and port</h3>
This UDP data packets listening address and port
<h3>11: Get data in bytes format</h3>
Check this if the data received is in bytes. When not checked data is expected in string format as blank separated hex bytes same as data below (12))
<h3>12: Data</h3>
The frame of data to send as hex bytes. For example, to send a MAC ACK frame, enter "02 00 00". The MAC CRC should not be included, as this is calculated and appended automatically. The frame of data to send as hex bytes. For example, to send a MAC ACK frame, enter "02 00 00". The MAC CRC should not be included, as this is calculated and appended automatically.
<h3>9: Repeat</h3> In the diagram below this is the blue part without the "frame check sequence". Thus its maximum length is 125 bytes.
![802.15.4 Modulator frame](../../../doc/img/IEEE_802_15_4_Mod_frame.png)
<h3>13: Repeat</h3>
Check this button to repeatedly transmit a frame. Right click to open the dialog to adjust the delay between retransmission and number of times the frame should be repeated. Check this button to repeatedly transmit a frame. Right click to open the dialog to adjust the delay between retransmission and number of times the frame should be repeated.
<h3>10: TX</h3> <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.
<h2>API</h2> <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 frame from the command line: Full details of the API can be found in the Swagger documentation.
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": { "data": "02 00 00" }}}' To transmit stored data just send a "tx" action:
Or to set the PHY to 20kbps BPSK: 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}}
curl -X PATCH "http://127.0.0.1:8091/sdrangel/deviceset/1/channel/0/settings" -d '{"channelType": "IEEE_802_15_4_Mod", "direction": 1, "IEEE_802_15_4_ModSettings": {"phy": "20kbps BPSK"}}' To transmit a frame from the command line:
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, "data": "02 00 00" }}'
To set the PHY to 20kbps BPSK:
curl -X PATCH "http://127.0.0.1:8091/sdrangel/deviceset/1/channel/0/settings" -d '{"channelType": "IEEE_802_15_4_Mod", "direction": 1, "IEEE_802_15_4_ModSettings": {"beta": 1, "bitRate": 20000,
"modulation': 0, "pulseShaping": 0, "rfBandwidth": 400000, "subGHzBand": 1 }}'

View File

@ -6202,19 +6202,15 @@ margin-bottom: 20px;
defs.IEEE_802_15_4_ModActions = { defs.IEEE_802_15_4_ModActions = {
"properties" : { "properties" : {
"tx" : { "tx" : {
"$ref" : "#/definitions/IEEE_802_15_4_ModActions_tx" "type" : "integer",
"description" : "Initialize a transmission cycle\n * 0 - Do nothing\n * 1 - Start transmission cycle\n"
},
"data" : {
"type" : "string",
"description" : "Hex coded bytes of data to transmit, excluding CRC (E.g for an ACK - 02 00 00). Preempts settings data.\n"
} }
}, },
"description" : "IEEE_802_15_4_Mod" "description" : "IEEE_802_15_4_Mod"
};
defs.IEEE_802_15_4_ModActions_tx = {
"properties" : {
"data" : {
"type" : "string",
"description" : "Hex coded bytes of data to transmit, excluding CRC (E.g for an ACK - 02 00 00)."
}
},
"description" : "Transmit a frame\n"
}; };
defs.IEEE_802_15_4_ModReport = { defs.IEEE_802_15_4_ModReport = {
"properties" : { "properties" : {
@ -6235,9 +6231,16 @@ margin-bottom: 20px;
"type" : "integer", "type" : "integer",
"format" : "int64" "format" : "int64"
}, },
"phy" : { "modulation" : {
"type" : "string", "type" : "integer",
"description" : "Physical layer. \"20kbps BPSK\", \"40kbps BPSK\", \"100kbps <1GHz O-QPSK\", \"250kbps <1GHz O-QPSK (Sine)\", \"250kbps <1GHz O-QPSK (RC)\", or \"250kbps >2GHz O-QPSK\"." "description" : "Modulation type\n * 0 - BPSK\n * 1 - OQPSK\n"
},
"bitRate" : {
"type" : "integer"
},
"subGHzBand" : {
"type" : "integer",
"description" : "Boolean value\n * 0 - Over 1 GHz standard\n * 1 - Under 1 GHz standard\n"
}, },
"rfBandwidth" : { "rfBandwidth" : {
"type" : "number", "type" : "number",
@ -6248,7 +6251,8 @@ margin-bottom: 20px;
"format" : "float" "format" : "float"
}, },
"channelMute" : { "channelMute" : {
"type" : "integer" "type" : "integer",
"description" : "* 0 - Effective transmission * 1 - Transmission is muted\n"
}, },
"repeat" : { "repeat" : {
"type" : "integer", "type" : "integer",
@ -6263,21 +6267,36 @@ margin-bottom: 20px;
"type" : "integer", "type" : "integer",
"description" : "Number of times to repeat the frame (-1 for infinite)." "description" : "Number of times to repeat the frame (-1 for infinite)."
}, },
"udpEnabled" : { "rampUpBits" : {
"type" : "integer", "type" : "integer"
"description" : "Enable forwarding of frames via UDP"
}, },
"m_udpBytesFormat" : { "rampDownBits" : {
"type" : "integer", "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" : { "rampRange" : {
"type" : "integer"
},
"modulateWhileRamping" : {
"type" : "integer",
"description" : "Boolean value\n * 0 - do not modulate in ramping phase\n * 1 - modulate in ramping phase\n"
},
"lpfTaps" : {
"type" : "integer"
},
"bbNoise" : {
"type" : "integer",
"description" : "Boolean value\n * 0 - Do not add gaussian noise in baseband\n * 1 - Add gaussian noise in baseband\n"
},
"writeToFile" : {
"type" : "integer",
"description" : "Boolean value\n * 0 - Do not write frames to .csv file\n * 1 - Write frames to .csv file\n"
},
"spectrumRate" : {
"type" : "integer"
},
"data" : {
"type" : "string", "type" : "string",
"description" : "UDP address to listen for frames to transmit on" "description" : "Hex coded bytes of data to transmit, excluding CRC (E.g for an ACK - 02 00 00)"
},
"udpPort" : {
"type" : "integer",
"description" : "UDP port to listen for frames to transmit on"
}, },
"rgbColor" : { "rgbColor" : {
"type" : "integer" "type" : "integer"
@ -6304,6 +6323,42 @@ margin-bottom: 20px;
}, },
"reverseAPIChannelIndex" : { "reverseAPIChannelIndex" : {
"type" : "integer" "type" : "integer"
},
"scramble" : {
"type" : "integer",
"description" : "Boolean value\n * 0 - Do not scramble data\n * 1 - Scramble data\n"
},
"polynomial" : {
"type" : "integer",
"description" : "Scrambling polynomial"
},
"pulseShaping" : {
"type" : "integer",
"description" : "Pulse shaping filter\n * 0 - Root Cosime\n * 1 - Sine\n"
},
"beta" : {
"type" : "number",
"format" : "float",
"description" : "Pulse shapint filter beta factor"
},
"symbolSpan" : {
"type" : "integer"
},
"udpEnabled" : {
"type" : "integer",
"description" : "Enable forwarding of frames via UDP"
},
"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" : {
"type" : "string",
"description" : "UDP address to listen for frames to transmit on"
},
"udpPort" : {
"type" : "integer",
"description" : "UDP port to listen for frames to transmit on"
} }
}, },
"description" : "IEEE_802_15_4_Mod" "description" : "IEEE_802_15_4_Mod"
@ -51290,7 +51345,7 @@ except ApiException as e:
</div> </div>
<div id="generator"> <div id="generator">
<div class="content"> <div class="content">
Generated 2021-11-16T00:55:07.690+01:00 Generated 2021-11-20T13:05:46.792+01:00
</div> </div>
</div> </div>
</div> </div>

View File

@ -4,9 +4,20 @@ IEEE_802_15_4_ModSettings:
inputFrequencyOffset: inputFrequencyOffset:
type: integer type: integer
format: int64 format: int64
phy: modulation:
description: Physical layer. "20kbps BPSK", "40kbps BPSK", "100kbps <1GHz O-QPSK", "250kbps <1GHz O-QPSK (Sine)", "250kbps <1GHz O-QPSK (RC)", or "250kbps >2GHz O-QPSK". description: >
type: string Modulation type
* 0 - BPSK
* 1 - OQPSK
type: integer
bitRate:
type: integer
subGHzBand:
type: integer
description: >
Boolean value
* 0 - Over 1 GHz standard
* 1 - Under 1 GHz standard
rfBandwidth: rfBandwidth:
type: number type: number
format: float format: float
@ -15,6 +26,9 @@ IEEE_802_15_4_ModSettings:
format: float format: float
channelMute: channelMute:
type: integer type: integer
description: >
* 0 - Effective transmission
* 1 - Transmission is muted
repeat: repeat:
description: Whether to repeated transmit the frame (1 for yes, 0 for no). description: Whether to repeated transmit the frame (1 for yes, 0 for no).
type: integer type: integer
@ -25,21 +39,37 @@ IEEE_802_15_4_ModSettings:
repeatCount: repeatCount:
description: Number of times to repeat the frame (-1 for infinite). description: Number of times to repeat the frame (-1 for infinite).
type: integer type: integer
udpEnabled: rampUpBits:
description: Enable forwarding of frames via UDP
type: integer type: integer
m_udpBytesFormat: rampDownBits:
type: integer
rampRange:
type: integer
modulateWhileRamping:
type: integer type: integer
description: > description: >
Payload format Boolean value
* 0 - Blank separated string representation of hex bytes i.e. 00 02 0a * 0 - do not modulate in ramping phase
* 1 - Raw bytes * 1 - modulate in ramping phase
udpAddress: lpfTaps:
description: UDP address to listen for frames to transmit on
type: string
udpPort:
description: UDP port to listen for frames to transmit on
type: integer type: integer
bbNoise:
type: integer
description: >
Boolean value
* 0 - Do not add gaussian noise in baseband
* 1 - Add gaussian noise in baseband
writeToFile:
type: integer
description: >
Boolean value
* 0 - Do not write frames to .csv file
* 1 - Write frames to .csv file
spectrumRate:
type: integer
data:
type: string
description: Hex coded bytes of data to transmit, excluding CRC (E.g for an ACK - 02 00 00)
rgbColor: rgbColor:
type: integer type: integer
title: title:
@ -58,6 +88,42 @@ IEEE_802_15_4_ModSettings:
type: integer type: integer
reverseAPIChannelIndex: reverseAPIChannelIndex:
type: integer type: integer
scramble:
type: integer
description: >
Boolean value
* 0 - Do not scramble data
* 1 - Scramble data
polynomial:
type: integer
description: Scrambling polynomial
pulseShaping:
type: integer
description: >
Pulse shaping filter
* 0 - Root Cosime
* 1 - Sine
beta:
type: number
format: float
description: Pulse shapint filter beta factor
symbolSpan:
type: integer
udpEnabled:
description: Enable forwarding of frames via UDP
type: integer
udpBytesFormat:
type: integer
description: >
Payload format
* 0 - Blank separated string representation of hex bytes i.e. 00 02 0a
* 1 - Raw bytes
udpAddress:
description: UDP address to listen for frames to transmit on
type: string
udpPort:
description: UDP port to listen for frames to transmit on
type: integer
IEEE_802_15_4_ModReport: IEEE_802_15_4_ModReport:
description: IEEE_802_15_4_Mod description: IEEE_802_15_4_Mod
@ -73,10 +139,12 @@ IEEE_802_15_4_ModActions:
description: IEEE_802_15_4_Mod description: IEEE_802_15_4_Mod
properties: properties:
tx: tx:
type: object type: integer
properties:
data:
description: Hex coded bytes of data to transmit, excluding CRC (E.g for an ACK - 02 00 00).
type: string
description: > description: >
Transmit a frame Initialize a transmission cycle
* 0 - Do nothing
* 1 - Start transmission cycle
data:
type: string
description: >
Hex coded bytes of data to transmit, excluding CRC (E.g for an ACK - 02 00 00). Preempts settings data.

View File

@ -4,9 +4,20 @@ IEEE_802_15_4_ModSettings:
inputFrequencyOffset: inputFrequencyOffset:
type: integer type: integer
format: int64 format: int64
phy: modulation:
description: Physical layer. "20kbps BPSK", "40kbps BPSK", "100kbps <1GHz O-QPSK", "250kbps <1GHz O-QPSK (Sine)", "250kbps <1GHz O-QPSK (RC)", or "250kbps >2GHz O-QPSK". description: >
type: string Modulation type
* 0 - BPSK
* 1 - OQPSK
type: integer
bitRate:
type: integer
subGHzBand:
type: integer
description: >
Boolean value
* 0 - Over 1 GHz standard
* 1 - Under 1 GHz standard
rfBandwidth: rfBandwidth:
type: number type: number
format: float format: float
@ -15,6 +26,9 @@ IEEE_802_15_4_ModSettings:
format: float format: float
channelMute: channelMute:
type: integer type: integer
description: >
* 0 - Effective transmission
* 1 - Transmission is muted
repeat: repeat:
description: Whether to repeated transmit the frame (1 for yes, 0 for no). description: Whether to repeated transmit the frame (1 for yes, 0 for no).
type: integer type: integer
@ -25,21 +39,37 @@ IEEE_802_15_4_ModSettings:
repeatCount: repeatCount:
description: Number of times to repeat the frame (-1 for infinite). description: Number of times to repeat the frame (-1 for infinite).
type: integer type: integer
udpEnabled: rampUpBits:
description: Enable forwarding of frames via UDP
type: integer type: integer
m_udpBytesFormat: rampDownBits:
type: integer
rampRange:
type: integer
modulateWhileRamping:
type: integer type: integer
description: > description: >
Payload format Boolean value
* 0 - Blank separated string representation of hex bytes i.e. 00 02 0a * 0 - do not modulate in ramping phase
* 1 - Raw bytes * 1 - modulate in ramping phase
udpAddress: lpfTaps:
description: UDP address to listen for frames to transmit on
type: string
udpPort:
description: UDP port to listen for frames to transmit on
type: integer type: integer
bbNoise:
type: integer
description: >
Boolean value
* 0 - Do not add gaussian noise in baseband
* 1 - Add gaussian noise in baseband
writeToFile:
type: integer
description: >
Boolean value
* 0 - Do not write frames to .csv file
* 1 - Write frames to .csv file
spectrumRate:
type: integer
data:
type: string
description: Hex coded bytes of data to transmit, excluding CRC (E.g for an ACK - 02 00 00)
rgbColor: rgbColor:
type: integer type: integer
title: title:
@ -58,6 +88,42 @@ IEEE_802_15_4_ModSettings:
type: integer type: integer
reverseAPIChannelIndex: reverseAPIChannelIndex:
type: integer type: integer
scramble:
type: integer
description: >
Boolean value
* 0 - Do not scramble data
* 1 - Scramble data
polynomial:
type: integer
description: Scrambling polynomial
pulseShaping:
type: integer
description: >
Pulse shaping filter
* 0 - Root Cosime
* 1 - Sine
beta:
type: number
format: float
description: Pulse shapint filter beta factor
symbolSpan:
type: integer
udpEnabled:
description: Enable forwarding of frames via UDP
type: integer
udpBytesFormat:
type: integer
description: >
Payload format
* 0 - Blank separated string representation of hex bytes i.e. 00 02 0a
* 1 - Raw bytes
udpAddress:
description: UDP address to listen for frames to transmit on
type: string
udpPort:
description: UDP port to listen for frames to transmit on
type: integer
IEEE_802_15_4_ModReport: IEEE_802_15_4_ModReport:
description: IEEE_802_15_4_Mod description: IEEE_802_15_4_Mod
@ -73,10 +139,12 @@ IEEE_802_15_4_ModActions:
description: IEEE_802_15_4_Mod description: IEEE_802_15_4_Mod
properties: properties:
tx: tx:
type: object type: integer
properties:
data:
description: Hex coded bytes of data to transmit, excluding CRC (E.g for an ACK - 02 00 00).
type: string
description: > description: >
Transmit a frame Initialize a transmission cycle
* 0 - Do nothing
* 1 - Start transmission cycle
data:
type: string
description: >
Hex coded bytes of data to transmit, excluding CRC (E.g for an ACK - 02 00 00). Preempts settings data.

View File

@ -6202,19 +6202,15 @@ margin-bottom: 20px;
defs.IEEE_802_15_4_ModActions = { defs.IEEE_802_15_4_ModActions = {
"properties" : { "properties" : {
"tx" : { "tx" : {
"$ref" : "#/definitions/IEEE_802_15_4_ModActions_tx" "type" : "integer",
"description" : "Initialize a transmission cycle\n * 0 - Do nothing\n * 1 - Start transmission cycle\n"
},
"data" : {
"type" : "string",
"description" : "Hex coded bytes of data to transmit, excluding CRC (E.g for an ACK - 02 00 00). Preempts settings data.\n"
} }
}, },
"description" : "IEEE_802_15_4_Mod" "description" : "IEEE_802_15_4_Mod"
};
defs.IEEE_802_15_4_ModActions_tx = {
"properties" : {
"data" : {
"type" : "string",
"description" : "Hex coded bytes of data to transmit, excluding CRC (E.g for an ACK - 02 00 00)."
}
},
"description" : "Transmit a frame\n"
}; };
defs.IEEE_802_15_4_ModReport = { defs.IEEE_802_15_4_ModReport = {
"properties" : { "properties" : {
@ -6235,9 +6231,16 @@ margin-bottom: 20px;
"type" : "integer", "type" : "integer",
"format" : "int64" "format" : "int64"
}, },
"phy" : { "modulation" : {
"type" : "string", "type" : "integer",
"description" : "Physical layer. \"20kbps BPSK\", \"40kbps BPSK\", \"100kbps <1GHz O-QPSK\", \"250kbps <1GHz O-QPSK (Sine)\", \"250kbps <1GHz O-QPSK (RC)\", or \"250kbps >2GHz O-QPSK\"." "description" : "Modulation type\n * 0 - BPSK\n * 1 - OQPSK\n"
},
"bitRate" : {
"type" : "integer"
},
"subGHzBand" : {
"type" : "integer",
"description" : "Boolean value\n * 0 - Over 1 GHz standard\n * 1 - Under 1 GHz standard\n"
}, },
"rfBandwidth" : { "rfBandwidth" : {
"type" : "number", "type" : "number",
@ -6248,7 +6251,8 @@ margin-bottom: 20px;
"format" : "float" "format" : "float"
}, },
"channelMute" : { "channelMute" : {
"type" : "integer" "type" : "integer",
"description" : "* 0 - Effective transmission * 1 - Transmission is muted\n"
}, },
"repeat" : { "repeat" : {
"type" : "integer", "type" : "integer",
@ -6263,21 +6267,36 @@ margin-bottom: 20px;
"type" : "integer", "type" : "integer",
"description" : "Number of times to repeat the frame (-1 for infinite)." "description" : "Number of times to repeat the frame (-1 for infinite)."
}, },
"udpEnabled" : { "rampUpBits" : {
"type" : "integer", "type" : "integer"
"description" : "Enable forwarding of frames via UDP"
}, },
"m_udpBytesFormat" : { "rampDownBits" : {
"type" : "integer", "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" : { "rampRange" : {
"type" : "integer"
},
"modulateWhileRamping" : {
"type" : "integer",
"description" : "Boolean value\n * 0 - do not modulate in ramping phase\n * 1 - modulate in ramping phase\n"
},
"lpfTaps" : {
"type" : "integer"
},
"bbNoise" : {
"type" : "integer",
"description" : "Boolean value\n * 0 - Do not add gaussian noise in baseband\n * 1 - Add gaussian noise in baseband\n"
},
"writeToFile" : {
"type" : "integer",
"description" : "Boolean value\n * 0 - Do not write frames to .csv file\n * 1 - Write frames to .csv file\n"
},
"spectrumRate" : {
"type" : "integer"
},
"data" : {
"type" : "string", "type" : "string",
"description" : "UDP address to listen for frames to transmit on" "description" : "Hex coded bytes of data to transmit, excluding CRC (E.g for an ACK - 02 00 00)"
},
"udpPort" : {
"type" : "integer",
"description" : "UDP port to listen for frames to transmit on"
}, },
"rgbColor" : { "rgbColor" : {
"type" : "integer" "type" : "integer"
@ -6304,6 +6323,42 @@ margin-bottom: 20px;
}, },
"reverseAPIChannelIndex" : { "reverseAPIChannelIndex" : {
"type" : "integer" "type" : "integer"
},
"scramble" : {
"type" : "integer",
"description" : "Boolean value\n * 0 - Do not scramble data\n * 1 - Scramble data\n"
},
"polynomial" : {
"type" : "integer",
"description" : "Scrambling polynomial"
},
"pulseShaping" : {
"type" : "integer",
"description" : "Pulse shaping filter\n * 0 - Root Cosime\n * 1 - Sine\n"
},
"beta" : {
"type" : "number",
"format" : "float",
"description" : "Pulse shapint filter beta factor"
},
"symbolSpan" : {
"type" : "integer"
},
"udpEnabled" : {
"type" : "integer",
"description" : "Enable forwarding of frames via UDP"
},
"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" : {
"type" : "string",
"description" : "UDP address to listen for frames to transmit on"
},
"udpPort" : {
"type" : "integer",
"description" : "UDP port to listen for frames to transmit on"
} }
}, },
"description" : "IEEE_802_15_4_Mod" "description" : "IEEE_802_15_4_Mod"
@ -51290,7 +51345,7 @@ except ApiException as e:
</div> </div>
<div id="generator"> <div id="generator">
<div class="content"> <div class="content">
Generated 2021-11-16T00:55:07.690+01:00 Generated 2021-11-20T13:05:46.792+01:00
</div> </div>
</div> </div>
</div> </div>

View File

@ -28,8 +28,10 @@ SWGIEEE_802_15_4_ModActions::SWGIEEE_802_15_4_ModActions(QString* json) {
} }
SWGIEEE_802_15_4_ModActions::SWGIEEE_802_15_4_ModActions() { SWGIEEE_802_15_4_ModActions::SWGIEEE_802_15_4_ModActions() {
tx = nullptr; tx = 0;
m_tx_isSet = false; m_tx_isSet = false;
data = nullptr;
m_data_isSet = false;
} }
SWGIEEE_802_15_4_ModActions::~SWGIEEE_802_15_4_ModActions() { SWGIEEE_802_15_4_ModActions::~SWGIEEE_802_15_4_ModActions() {
@ -38,14 +40,17 @@ SWGIEEE_802_15_4_ModActions::~SWGIEEE_802_15_4_ModActions() {
void void
SWGIEEE_802_15_4_ModActions::init() { SWGIEEE_802_15_4_ModActions::init() {
tx = new SWGIEEE_802_15_4_ModActions_tx(); tx = 0;
m_tx_isSet = false; m_tx_isSet = false;
data = new QString("");
m_data_isSet = false;
} }
void void
SWGIEEE_802_15_4_ModActions::cleanup() { SWGIEEE_802_15_4_ModActions::cleanup() {
if(tx != nullptr) {
delete tx; if(data != nullptr) {
delete data;
} }
} }
@ -60,7 +65,9 @@ SWGIEEE_802_15_4_ModActions::fromJson(QString &json) {
void void
SWGIEEE_802_15_4_ModActions::fromJsonObject(QJsonObject &pJson) { SWGIEEE_802_15_4_ModActions::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&tx, pJson["tx"], "SWGIEEE_802_15_4_ModActions_tx", "SWGIEEE_802_15_4_ModActions_tx"); ::SWGSDRangel::setValue(&tx, pJson["tx"], "qint32", "");
::SWGSDRangel::setValue(&data, pJson["data"], "QString", "QString");
} }
@ -78,29 +85,45 @@ SWGIEEE_802_15_4_ModActions::asJson ()
QJsonObject* QJsonObject*
SWGIEEE_802_15_4_ModActions::asJsonObject() { SWGIEEE_802_15_4_ModActions::asJsonObject() {
QJsonObject* obj = new QJsonObject(); QJsonObject* obj = new QJsonObject();
if((tx != nullptr) && (tx->isSet())){ if(m_tx_isSet){
toJsonValue(QString("tx"), tx, obj, QString("SWGIEEE_802_15_4_ModActions_tx")); obj->insert("tx", QJsonValue(tx));
}
if(data != nullptr && *data != QString("")){
toJsonValue(QString("data"), data, obj, QString("QString"));
} }
return obj; return obj;
} }
SWGIEEE_802_15_4_ModActions_tx* qint32
SWGIEEE_802_15_4_ModActions::getTx() { SWGIEEE_802_15_4_ModActions::getTx() {
return tx; return tx;
} }
void void
SWGIEEE_802_15_4_ModActions::setTx(SWGIEEE_802_15_4_ModActions_tx* tx) { SWGIEEE_802_15_4_ModActions::setTx(qint32 tx) {
this->tx = tx; this->tx = tx;
this->m_tx_isSet = true; this->m_tx_isSet = true;
} }
QString*
SWGIEEE_802_15_4_ModActions::getData() {
return data;
}
void
SWGIEEE_802_15_4_ModActions::setData(QString* data) {
this->data = data;
this->m_data_isSet = true;
}
bool bool
SWGIEEE_802_15_4_ModActions::isSet(){ SWGIEEE_802_15_4_ModActions::isSet(){
bool isObjectUpdated = false; bool isObjectUpdated = false;
do{ do{
if(tx && tx->isSet()){ if(m_tx_isSet){
isObjectUpdated = true; break;
}
if(data && *data != QString("")){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }
}while(false); }while(false);

View File

@ -22,7 +22,7 @@
#include <QJsonObject> #include <QJsonObject>
#include "SWGIEEE_802_15_4_ModActions_tx.h" #include <QString>
#include "SWGObject.h" #include "SWGObject.h"
#include "export.h" #include "export.h"
@ -42,16 +42,22 @@ public:
virtual void fromJsonObject(QJsonObject &json) override; virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGIEEE_802_15_4_ModActions* fromJson(QString &jsonString) override; virtual SWGIEEE_802_15_4_ModActions* fromJson(QString &jsonString) override;
SWGIEEE_802_15_4_ModActions_tx* getTx(); qint32 getTx();
void setTx(SWGIEEE_802_15_4_ModActions_tx* tx); void setTx(qint32 tx);
QString* getData();
void setData(QString* data);
virtual bool isSet() override; virtual bool isSet() override;
private: private:
SWGIEEE_802_15_4_ModActions_tx* tx; qint32 tx;
bool m_tx_isSet; bool m_tx_isSet;
QString* data;
bool m_data_isSet;
}; };
} }

View File

@ -30,8 +30,12 @@ SWGIEEE_802_15_4_ModSettings::SWGIEEE_802_15_4_ModSettings(QString* json) {
SWGIEEE_802_15_4_ModSettings::SWGIEEE_802_15_4_ModSettings() { SWGIEEE_802_15_4_ModSettings::SWGIEEE_802_15_4_ModSettings() {
input_frequency_offset = 0L; input_frequency_offset = 0L;
m_input_frequency_offset_isSet = false; m_input_frequency_offset_isSet = false;
phy = nullptr; modulation = 0;
m_phy_isSet = false; m_modulation_isSet = false;
bit_rate = 0;
m_bit_rate_isSet = false;
sub_g_hz_band = 0;
m_sub_g_hz_band_isSet = false;
rf_bandwidth = 0.0f; rf_bandwidth = 0.0f;
m_rf_bandwidth_isSet = false; m_rf_bandwidth_isSet = false;
gain = 0.0f; gain = 0.0f;
@ -44,14 +48,24 @@ SWGIEEE_802_15_4_ModSettings::SWGIEEE_802_15_4_ModSettings() {
m_repeat_delay_isSet = false; m_repeat_delay_isSet = false;
repeat_count = 0; repeat_count = 0;
m_repeat_count_isSet = false; m_repeat_count_isSet = false;
udp_enabled = 0; ramp_up_bits = 0;
m_udp_enabled_isSet = false; m_ramp_up_bits_isSet = false;
m_udp_bytes_format = 0; ramp_down_bits = 0;
m_m_udp_bytes_format_isSet = false; m_ramp_down_bits_isSet = false;
udp_address = nullptr; ramp_range = 0;
m_udp_address_isSet = false; m_ramp_range_isSet = false;
udp_port = 0; modulate_while_ramping = 0;
m_udp_port_isSet = false; m_modulate_while_ramping_isSet = false;
lpf_taps = 0;
m_lpf_taps_isSet = false;
bb_noise = 0;
m_bb_noise_isSet = false;
write_to_file = 0;
m_write_to_file_isSet = false;
spectrum_rate = 0;
m_spectrum_rate_isSet = false;
data = nullptr;
m_data_isSet = false;
rgb_color = 0; rgb_color = 0;
m_rgb_color_isSet = false; m_rgb_color_isSet = false;
title = nullptr; title = nullptr;
@ -68,6 +82,24 @@ SWGIEEE_802_15_4_ModSettings::SWGIEEE_802_15_4_ModSettings() {
m_reverse_api_device_index_isSet = false; m_reverse_api_device_index_isSet = false;
reverse_api_channel_index = 0; reverse_api_channel_index = 0;
m_reverse_api_channel_index_isSet = false; m_reverse_api_channel_index_isSet = false;
scramble = 0;
m_scramble_isSet = false;
polynomial = 0;
m_polynomial_isSet = false;
pulse_shaping = 0;
m_pulse_shaping_isSet = false;
beta = 0.0f;
m_beta_isSet = false;
symbol_span = 0;
m_symbol_span_isSet = false;
udp_enabled = 0;
m_udp_enabled_isSet = false;
udp_bytes_format = 0;
m_udp_bytes_format_isSet = false;
udp_address = nullptr;
m_udp_address_isSet = false;
udp_port = 0;
m_udp_port_isSet = false;
} }
SWGIEEE_802_15_4_ModSettings::~SWGIEEE_802_15_4_ModSettings() { SWGIEEE_802_15_4_ModSettings::~SWGIEEE_802_15_4_ModSettings() {
@ -78,8 +110,12 @@ void
SWGIEEE_802_15_4_ModSettings::init() { SWGIEEE_802_15_4_ModSettings::init() {
input_frequency_offset = 0L; input_frequency_offset = 0L;
m_input_frequency_offset_isSet = false; m_input_frequency_offset_isSet = false;
phy = new QString(""); modulation = 0;
m_phy_isSet = false; m_modulation_isSet = false;
bit_rate = 0;
m_bit_rate_isSet = false;
sub_g_hz_band = 0;
m_sub_g_hz_band_isSet = false;
rf_bandwidth = 0.0f; rf_bandwidth = 0.0f;
m_rf_bandwidth_isSet = false; m_rf_bandwidth_isSet = false;
gain = 0.0f; gain = 0.0f;
@ -92,14 +128,24 @@ SWGIEEE_802_15_4_ModSettings::init() {
m_repeat_delay_isSet = false; m_repeat_delay_isSet = false;
repeat_count = 0; repeat_count = 0;
m_repeat_count_isSet = false; m_repeat_count_isSet = false;
udp_enabled = 0; ramp_up_bits = 0;
m_udp_enabled_isSet = false; m_ramp_up_bits_isSet = false;
m_udp_bytes_format = 0; ramp_down_bits = 0;
m_m_udp_bytes_format_isSet = false; m_ramp_down_bits_isSet = false;
udp_address = new QString(""); ramp_range = 0;
m_udp_address_isSet = false; m_ramp_range_isSet = false;
udp_port = 0; modulate_while_ramping = 0;
m_udp_port_isSet = false; m_modulate_while_ramping_isSet = false;
lpf_taps = 0;
m_lpf_taps_isSet = false;
bb_noise = 0;
m_bb_noise_isSet = false;
write_to_file = 0;
m_write_to_file_isSet = false;
spectrum_rate = 0;
m_spectrum_rate_isSet = false;
data = new QString("");
m_data_isSet = false;
rgb_color = 0; rgb_color = 0;
m_rgb_color_isSet = false; m_rgb_color_isSet = false;
title = new QString(""); title = new QString("");
@ -116,27 +162,50 @@ SWGIEEE_802_15_4_ModSettings::init() {
m_reverse_api_device_index_isSet = false; m_reverse_api_device_index_isSet = false;
reverse_api_channel_index = 0; reverse_api_channel_index = 0;
m_reverse_api_channel_index_isSet = false; m_reverse_api_channel_index_isSet = false;
scramble = 0;
m_scramble_isSet = false;
polynomial = 0;
m_polynomial_isSet = false;
pulse_shaping = 0;
m_pulse_shaping_isSet = false;
beta = 0.0f;
m_beta_isSet = false;
symbol_span = 0;
m_symbol_span_isSet = false;
udp_enabled = 0;
m_udp_enabled_isSet = false;
udp_bytes_format = 0;
m_udp_bytes_format_isSet = false;
udp_address = new QString("");
m_udp_address_isSet = false;
udp_port = 0;
m_udp_port_isSet = false;
} }
void void
SWGIEEE_802_15_4_ModSettings::cleanup() { SWGIEEE_802_15_4_ModSettings::cleanup() {
if(phy != nullptr) {
delete phy;
if(data != nullptr) {
delete data;
} }
if(udp_address != nullptr) {
delete udp_address;
}
if(title != nullptr) { if(title != nullptr) {
delete title; delete title;
} }
@ -148,6 +217,17 @@ SWGIEEE_802_15_4_ModSettings::cleanup() {
if(udp_address != nullptr) {
delete udp_address;
}
} }
SWGIEEE_802_15_4_ModSettings* SWGIEEE_802_15_4_ModSettings*
@ -163,7 +243,11 @@ void
SWGIEEE_802_15_4_ModSettings::fromJsonObject(QJsonObject &pJson) { SWGIEEE_802_15_4_ModSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&input_frequency_offset, pJson["inputFrequencyOffset"], "qint64", ""); ::SWGSDRangel::setValue(&input_frequency_offset, pJson["inputFrequencyOffset"], "qint64", "");
::SWGSDRangel::setValue(&phy, pJson["phy"], "QString", "QString"); ::SWGSDRangel::setValue(&modulation, pJson["modulation"], "qint32", "");
::SWGSDRangel::setValue(&bit_rate, pJson["bitRate"], "qint32", "");
::SWGSDRangel::setValue(&sub_g_hz_band, pJson["subGHzBand"], "qint32", "");
::SWGSDRangel::setValue(&rf_bandwidth, pJson["rfBandwidth"], "float", ""); ::SWGSDRangel::setValue(&rf_bandwidth, pJson["rfBandwidth"], "float", "");
@ -177,13 +261,23 @@ SWGIEEE_802_15_4_ModSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&repeat_count, pJson["repeatCount"], "qint32", ""); ::SWGSDRangel::setValue(&repeat_count, pJson["repeatCount"], "qint32", "");
::SWGSDRangel::setValue(&udp_enabled, pJson["udpEnabled"], "qint32", ""); ::SWGSDRangel::setValue(&ramp_up_bits, pJson["rampUpBits"], "qint32", "");
::SWGSDRangel::setValue(&m_udp_bytes_format, pJson["m_udpBytesFormat"], "qint32", ""); ::SWGSDRangel::setValue(&ramp_down_bits, pJson["rampDownBits"], "qint32", "");
::SWGSDRangel::setValue(&udp_address, pJson["udpAddress"], "QString", "QString"); ::SWGSDRangel::setValue(&ramp_range, pJson["rampRange"], "qint32", "");
::SWGSDRangel::setValue(&udp_port, pJson["udpPort"], "qint32", ""); ::SWGSDRangel::setValue(&modulate_while_ramping, pJson["modulateWhileRamping"], "qint32", "");
::SWGSDRangel::setValue(&lpf_taps, pJson["lpfTaps"], "qint32", "");
::SWGSDRangel::setValue(&bb_noise, pJson["bbNoise"], "qint32", "");
::SWGSDRangel::setValue(&write_to_file, pJson["writeToFile"], "qint32", "");
::SWGSDRangel::setValue(&spectrum_rate, pJson["spectrumRate"], "qint32", "");
::SWGSDRangel::setValue(&data, pJson["data"], "QString", "QString");
::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", ""); ::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", "");
@ -201,6 +295,24 @@ SWGIEEE_802_15_4_ModSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&reverse_api_channel_index, pJson["reverseAPIChannelIndex"], "qint32", ""); ::SWGSDRangel::setValue(&reverse_api_channel_index, pJson["reverseAPIChannelIndex"], "qint32", "");
::SWGSDRangel::setValue(&scramble, pJson["scramble"], "qint32", "");
::SWGSDRangel::setValue(&polynomial, pJson["polynomial"], "qint32", "");
::SWGSDRangel::setValue(&pulse_shaping, pJson["pulseShaping"], "qint32", "");
::SWGSDRangel::setValue(&beta, pJson["beta"], "float", "");
::SWGSDRangel::setValue(&symbol_span, pJson["symbolSpan"], "qint32", "");
::SWGSDRangel::setValue(&udp_enabled, pJson["udpEnabled"], "qint32", "");
::SWGSDRangel::setValue(&udp_bytes_format, pJson["udpBytesFormat"], "qint32", "");
::SWGSDRangel::setValue(&udp_address, pJson["udpAddress"], "QString", "QString");
::SWGSDRangel::setValue(&udp_port, pJson["udpPort"], "qint32", "");
} }
QString QString
@ -220,8 +332,14 @@ SWGIEEE_802_15_4_ModSettings::asJsonObject() {
if(m_input_frequency_offset_isSet){ if(m_input_frequency_offset_isSet){
obj->insert("inputFrequencyOffset", QJsonValue(input_frequency_offset)); obj->insert("inputFrequencyOffset", QJsonValue(input_frequency_offset));
} }
if(phy != nullptr && *phy != QString("")){ if(m_modulation_isSet){
toJsonValue(QString("phy"), phy, obj, QString("QString")); obj->insert("modulation", QJsonValue(modulation));
}
if(m_bit_rate_isSet){
obj->insert("bitRate", QJsonValue(bit_rate));
}
if(m_sub_g_hz_band_isSet){
obj->insert("subGHzBand", QJsonValue(sub_g_hz_band));
} }
if(m_rf_bandwidth_isSet){ if(m_rf_bandwidth_isSet){
obj->insert("rfBandwidth", QJsonValue(rf_bandwidth)); obj->insert("rfBandwidth", QJsonValue(rf_bandwidth));
@ -241,17 +359,32 @@ SWGIEEE_802_15_4_ModSettings::asJsonObject() {
if(m_repeat_count_isSet){ if(m_repeat_count_isSet){
obj->insert("repeatCount", QJsonValue(repeat_count)); obj->insert("repeatCount", QJsonValue(repeat_count));
} }
if(m_udp_enabled_isSet){ if(m_ramp_up_bits_isSet){
obj->insert("udpEnabled", QJsonValue(udp_enabled)); obj->insert("rampUpBits", QJsonValue(ramp_up_bits));
} }
if(m_m_udp_bytes_format_isSet){ if(m_ramp_down_bits_isSet){
obj->insert("m_udpBytesFormat", QJsonValue(m_udp_bytes_format)); obj->insert("rampDownBits", QJsonValue(ramp_down_bits));
} }
if(udp_address != nullptr && *udp_address != QString("")){ if(m_ramp_range_isSet){
toJsonValue(QString("udpAddress"), udp_address, obj, QString("QString")); obj->insert("rampRange", QJsonValue(ramp_range));
} }
if(m_udp_port_isSet){ if(m_modulate_while_ramping_isSet){
obj->insert("udpPort", QJsonValue(udp_port)); obj->insert("modulateWhileRamping", QJsonValue(modulate_while_ramping));
}
if(m_lpf_taps_isSet){
obj->insert("lpfTaps", QJsonValue(lpf_taps));
}
if(m_bb_noise_isSet){
obj->insert("bbNoise", QJsonValue(bb_noise));
}
if(m_write_to_file_isSet){
obj->insert("writeToFile", QJsonValue(write_to_file));
}
if(m_spectrum_rate_isSet){
obj->insert("spectrumRate", QJsonValue(spectrum_rate));
}
if(data != nullptr && *data != QString("")){
toJsonValue(QString("data"), data, obj, QString("QString"));
} }
if(m_rgb_color_isSet){ if(m_rgb_color_isSet){
obj->insert("rgbColor", QJsonValue(rgb_color)); obj->insert("rgbColor", QJsonValue(rgb_color));
@ -277,6 +410,33 @@ SWGIEEE_802_15_4_ModSettings::asJsonObject() {
if(m_reverse_api_channel_index_isSet){ if(m_reverse_api_channel_index_isSet){
obj->insert("reverseAPIChannelIndex", QJsonValue(reverse_api_channel_index)); obj->insert("reverseAPIChannelIndex", QJsonValue(reverse_api_channel_index));
} }
if(m_scramble_isSet){
obj->insert("scramble", QJsonValue(scramble));
}
if(m_polynomial_isSet){
obj->insert("polynomial", QJsonValue(polynomial));
}
if(m_pulse_shaping_isSet){
obj->insert("pulseShaping", QJsonValue(pulse_shaping));
}
if(m_beta_isSet){
obj->insert("beta", QJsonValue(beta));
}
if(m_symbol_span_isSet){
obj->insert("symbolSpan", QJsonValue(symbol_span));
}
if(m_udp_enabled_isSet){
obj->insert("udpEnabled", QJsonValue(udp_enabled));
}
if(m_udp_bytes_format_isSet){
obj->insert("udpBytesFormat", QJsonValue(udp_bytes_format));
}
if(udp_address != nullptr && *udp_address != QString("")){
toJsonValue(QString("udpAddress"), udp_address, obj, QString("QString"));
}
if(m_udp_port_isSet){
obj->insert("udpPort", QJsonValue(udp_port));
}
return obj; return obj;
} }
@ -291,14 +451,34 @@ SWGIEEE_802_15_4_ModSettings::setInputFrequencyOffset(qint64 input_frequency_off
this->m_input_frequency_offset_isSet = true; this->m_input_frequency_offset_isSet = true;
} }
QString* qint32
SWGIEEE_802_15_4_ModSettings::getPhy() { SWGIEEE_802_15_4_ModSettings::getModulation() {
return phy; return modulation;
} }
void void
SWGIEEE_802_15_4_ModSettings::setPhy(QString* phy) { SWGIEEE_802_15_4_ModSettings::setModulation(qint32 modulation) {
this->phy = phy; this->modulation = modulation;
this->m_phy_isSet = true; this->m_modulation_isSet = true;
}
qint32
SWGIEEE_802_15_4_ModSettings::getBitRate() {
return bit_rate;
}
void
SWGIEEE_802_15_4_ModSettings::setBitRate(qint32 bit_rate) {
this->bit_rate = bit_rate;
this->m_bit_rate_isSet = true;
}
qint32
SWGIEEE_802_15_4_ModSettings::getSubGHzBand() {
return sub_g_hz_band;
}
void
SWGIEEE_802_15_4_ModSettings::setSubGHzBand(qint32 sub_g_hz_band) {
this->sub_g_hz_band = sub_g_hz_band;
this->m_sub_g_hz_band_isSet = true;
} }
float float
@ -362,43 +542,93 @@ SWGIEEE_802_15_4_ModSettings::setRepeatCount(qint32 repeat_count) {
} }
qint32 qint32
SWGIEEE_802_15_4_ModSettings::getUdpEnabled() { SWGIEEE_802_15_4_ModSettings::getRampUpBits() {
return udp_enabled; return ramp_up_bits;
} }
void void
SWGIEEE_802_15_4_ModSettings::setUdpEnabled(qint32 udp_enabled) { SWGIEEE_802_15_4_ModSettings::setRampUpBits(qint32 ramp_up_bits) {
this->udp_enabled = udp_enabled; this->ramp_up_bits = ramp_up_bits;
this->m_udp_enabled_isSet = true; this->m_ramp_up_bits_isSet = true;
} }
qint32 qint32
SWGIEEE_802_15_4_ModSettings::getMUdpBytesFormat() { SWGIEEE_802_15_4_ModSettings::getRampDownBits() {
return m_udp_bytes_format; return ramp_down_bits;
} }
void void
SWGIEEE_802_15_4_ModSettings::setMUdpBytesFormat(qint32 m_udp_bytes_format) { SWGIEEE_802_15_4_ModSettings::setRampDownBits(qint32 ramp_down_bits) {
this->m_udp_bytes_format = m_udp_bytes_format; this->ramp_down_bits = ramp_down_bits;
this->m_m_udp_bytes_format_isSet = true; this->m_ramp_down_bits_isSet = true;
}
qint32
SWGIEEE_802_15_4_ModSettings::getRampRange() {
return ramp_range;
}
void
SWGIEEE_802_15_4_ModSettings::setRampRange(qint32 ramp_range) {
this->ramp_range = ramp_range;
this->m_ramp_range_isSet = true;
}
qint32
SWGIEEE_802_15_4_ModSettings::getModulateWhileRamping() {
return modulate_while_ramping;
}
void
SWGIEEE_802_15_4_ModSettings::setModulateWhileRamping(qint32 modulate_while_ramping) {
this->modulate_while_ramping = modulate_while_ramping;
this->m_modulate_while_ramping_isSet = true;
}
qint32
SWGIEEE_802_15_4_ModSettings::getLpfTaps() {
return lpf_taps;
}
void
SWGIEEE_802_15_4_ModSettings::setLpfTaps(qint32 lpf_taps) {
this->lpf_taps = lpf_taps;
this->m_lpf_taps_isSet = true;
}
qint32
SWGIEEE_802_15_4_ModSettings::getBbNoise() {
return bb_noise;
}
void
SWGIEEE_802_15_4_ModSettings::setBbNoise(qint32 bb_noise) {
this->bb_noise = bb_noise;
this->m_bb_noise_isSet = true;
}
qint32
SWGIEEE_802_15_4_ModSettings::getWriteToFile() {
return write_to_file;
}
void
SWGIEEE_802_15_4_ModSettings::setWriteToFile(qint32 write_to_file) {
this->write_to_file = write_to_file;
this->m_write_to_file_isSet = true;
}
qint32
SWGIEEE_802_15_4_ModSettings::getSpectrumRate() {
return spectrum_rate;
}
void
SWGIEEE_802_15_4_ModSettings::setSpectrumRate(qint32 spectrum_rate) {
this->spectrum_rate = spectrum_rate;
this->m_spectrum_rate_isSet = true;
} }
QString* QString*
SWGIEEE_802_15_4_ModSettings::getUdpAddress() { SWGIEEE_802_15_4_ModSettings::getData() {
return udp_address; return data;
} }
void void
SWGIEEE_802_15_4_ModSettings::setUdpAddress(QString* udp_address) { SWGIEEE_802_15_4_ModSettings::setData(QString* data) {
this->udp_address = udp_address; this->data = data;
this->m_udp_address_isSet = true; this->m_data_isSet = true;
}
qint32
SWGIEEE_802_15_4_ModSettings::getUdpPort() {
return udp_port;
}
void
SWGIEEE_802_15_4_ModSettings::setUdpPort(qint32 udp_port) {
this->udp_port = udp_port;
this->m_udp_port_isSet = true;
} }
qint32 qint32
@ -481,6 +711,96 @@ SWGIEEE_802_15_4_ModSettings::setReverseApiChannelIndex(qint32 reverse_api_chann
this->m_reverse_api_channel_index_isSet = true; this->m_reverse_api_channel_index_isSet = true;
} }
qint32
SWGIEEE_802_15_4_ModSettings::getScramble() {
return scramble;
}
void
SWGIEEE_802_15_4_ModSettings::setScramble(qint32 scramble) {
this->scramble = scramble;
this->m_scramble_isSet = true;
}
qint32
SWGIEEE_802_15_4_ModSettings::getPolynomial() {
return polynomial;
}
void
SWGIEEE_802_15_4_ModSettings::setPolynomial(qint32 polynomial) {
this->polynomial = polynomial;
this->m_polynomial_isSet = true;
}
qint32
SWGIEEE_802_15_4_ModSettings::getPulseShaping() {
return pulse_shaping;
}
void
SWGIEEE_802_15_4_ModSettings::setPulseShaping(qint32 pulse_shaping) {
this->pulse_shaping = pulse_shaping;
this->m_pulse_shaping_isSet = true;
}
float
SWGIEEE_802_15_4_ModSettings::getBeta() {
return beta;
}
void
SWGIEEE_802_15_4_ModSettings::setBeta(float beta) {
this->beta = beta;
this->m_beta_isSet = true;
}
qint32
SWGIEEE_802_15_4_ModSettings::getSymbolSpan() {
return symbol_span;
}
void
SWGIEEE_802_15_4_ModSettings::setSymbolSpan(qint32 symbol_span) {
this->symbol_span = symbol_span;
this->m_symbol_span_isSet = true;
}
qint32
SWGIEEE_802_15_4_ModSettings::getUdpEnabled() {
return udp_enabled;
}
void
SWGIEEE_802_15_4_ModSettings::setUdpEnabled(qint32 udp_enabled) {
this->udp_enabled = udp_enabled;
this->m_udp_enabled_isSet = true;
}
qint32
SWGIEEE_802_15_4_ModSettings::getUdpBytesFormat() {
return udp_bytes_format;
}
void
SWGIEEE_802_15_4_ModSettings::setUdpBytesFormat(qint32 udp_bytes_format) {
this->udp_bytes_format = udp_bytes_format;
this->m_udp_bytes_format_isSet = true;
}
QString*
SWGIEEE_802_15_4_ModSettings::getUdpAddress() {
return udp_address;
}
void
SWGIEEE_802_15_4_ModSettings::setUdpAddress(QString* udp_address) {
this->udp_address = udp_address;
this->m_udp_address_isSet = true;
}
qint32
SWGIEEE_802_15_4_ModSettings::getUdpPort() {
return udp_port;
}
void
SWGIEEE_802_15_4_ModSettings::setUdpPort(qint32 udp_port) {
this->udp_port = udp_port;
this->m_udp_port_isSet = true;
}
bool bool
SWGIEEE_802_15_4_ModSettings::isSet(){ SWGIEEE_802_15_4_ModSettings::isSet(){
@ -489,7 +809,13 @@ SWGIEEE_802_15_4_ModSettings::isSet(){
if(m_input_frequency_offset_isSet){ if(m_input_frequency_offset_isSet){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }
if(phy && *phy != QString("")){ if(m_modulation_isSet){
isObjectUpdated = true; break;
}
if(m_bit_rate_isSet){
isObjectUpdated = true; break;
}
if(m_sub_g_hz_band_isSet){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }
if(m_rf_bandwidth_isSet){ if(m_rf_bandwidth_isSet){
@ -510,16 +836,31 @@ SWGIEEE_802_15_4_ModSettings::isSet(){
if(m_repeat_count_isSet){ if(m_repeat_count_isSet){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }
if(m_udp_enabled_isSet){ if(m_ramp_up_bits_isSet){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }
if(m_m_udp_bytes_format_isSet){ if(m_ramp_down_bits_isSet){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }
if(udp_address && *udp_address != QString("")){ if(m_ramp_range_isSet){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }
if(m_udp_port_isSet){ if(m_modulate_while_ramping_isSet){
isObjectUpdated = true; break;
}
if(m_lpf_taps_isSet){
isObjectUpdated = true; break;
}
if(m_bb_noise_isSet){
isObjectUpdated = true; break;
}
if(m_write_to_file_isSet){
isObjectUpdated = true; break;
}
if(m_spectrum_rate_isSet){
isObjectUpdated = true; break;
}
if(data && *data != QString("")){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }
if(m_rgb_color_isSet){ if(m_rgb_color_isSet){
@ -546,6 +887,33 @@ SWGIEEE_802_15_4_ModSettings::isSet(){
if(m_reverse_api_channel_index_isSet){ if(m_reverse_api_channel_index_isSet){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }
if(m_scramble_isSet){
isObjectUpdated = true; break;
}
if(m_polynomial_isSet){
isObjectUpdated = true; break;
}
if(m_pulse_shaping_isSet){
isObjectUpdated = true; break;
}
if(m_beta_isSet){
isObjectUpdated = true; break;
}
if(m_symbol_span_isSet){
isObjectUpdated = true; break;
}
if(m_udp_enabled_isSet){
isObjectUpdated = true; break;
}
if(m_udp_bytes_format_isSet){
isObjectUpdated = true; break;
}
if(udp_address && *udp_address != QString("")){
isObjectUpdated = true; break;
}
if(m_udp_port_isSet){
isObjectUpdated = true; break;
}
}while(false); }while(false);
return isObjectUpdated; return isObjectUpdated;
} }

View File

@ -45,8 +45,14 @@ public:
qint64 getInputFrequencyOffset(); qint64 getInputFrequencyOffset();
void setInputFrequencyOffset(qint64 input_frequency_offset); void setInputFrequencyOffset(qint64 input_frequency_offset);
QString* getPhy(); qint32 getModulation();
void setPhy(QString* phy); void setModulation(qint32 modulation);
qint32 getBitRate();
void setBitRate(qint32 bit_rate);
qint32 getSubGHzBand();
void setSubGHzBand(qint32 sub_g_hz_band);
float getRfBandwidth(); float getRfBandwidth();
void setRfBandwidth(float rf_bandwidth); void setRfBandwidth(float rf_bandwidth);
@ -66,17 +72,32 @@ public:
qint32 getRepeatCount(); qint32 getRepeatCount();
void setRepeatCount(qint32 repeat_count); void setRepeatCount(qint32 repeat_count);
qint32 getUdpEnabled(); qint32 getRampUpBits();
void setUdpEnabled(qint32 udp_enabled); void setRampUpBits(qint32 ramp_up_bits);
qint32 getMUdpBytesFormat(); qint32 getRampDownBits();
void setMUdpBytesFormat(qint32 m_udp_bytes_format); void setRampDownBits(qint32 ramp_down_bits);
QString* getUdpAddress(); qint32 getRampRange();
void setUdpAddress(QString* udp_address); void setRampRange(qint32 ramp_range);
qint32 getUdpPort(); qint32 getModulateWhileRamping();
void setUdpPort(qint32 udp_port); void setModulateWhileRamping(qint32 modulate_while_ramping);
qint32 getLpfTaps();
void setLpfTaps(qint32 lpf_taps);
qint32 getBbNoise();
void setBbNoise(qint32 bb_noise);
qint32 getWriteToFile();
void setWriteToFile(qint32 write_to_file);
qint32 getSpectrumRate();
void setSpectrumRate(qint32 spectrum_rate);
QString* getData();
void setData(QString* data);
qint32 getRgbColor(); qint32 getRgbColor();
void setRgbColor(qint32 rgb_color); void setRgbColor(qint32 rgb_color);
@ -102,6 +123,33 @@ public:
qint32 getReverseApiChannelIndex(); qint32 getReverseApiChannelIndex();
void setReverseApiChannelIndex(qint32 reverse_api_channel_index); void setReverseApiChannelIndex(qint32 reverse_api_channel_index);
qint32 getScramble();
void setScramble(qint32 scramble);
qint32 getPolynomial();
void setPolynomial(qint32 polynomial);
qint32 getPulseShaping();
void setPulseShaping(qint32 pulse_shaping);
float getBeta();
void setBeta(float beta);
qint32 getSymbolSpan();
void setSymbolSpan(qint32 symbol_span);
qint32 getUdpEnabled();
void setUdpEnabled(qint32 udp_enabled);
qint32 getUdpBytesFormat();
void setUdpBytesFormat(qint32 udp_bytes_format);
QString* getUdpAddress();
void setUdpAddress(QString* udp_address);
qint32 getUdpPort();
void setUdpPort(qint32 udp_port);
virtual bool isSet() override; virtual bool isSet() override;
@ -109,8 +157,14 @@ private:
qint64 input_frequency_offset; qint64 input_frequency_offset;
bool m_input_frequency_offset_isSet; bool m_input_frequency_offset_isSet;
QString* phy; qint32 modulation;
bool m_phy_isSet; bool m_modulation_isSet;
qint32 bit_rate;
bool m_bit_rate_isSet;
qint32 sub_g_hz_band;
bool m_sub_g_hz_band_isSet;
float rf_bandwidth; float rf_bandwidth;
bool m_rf_bandwidth_isSet; bool m_rf_bandwidth_isSet;
@ -130,17 +184,32 @@ private:
qint32 repeat_count; qint32 repeat_count;
bool m_repeat_count_isSet; bool m_repeat_count_isSet;
qint32 udp_enabled; qint32 ramp_up_bits;
bool m_udp_enabled_isSet; bool m_ramp_up_bits_isSet;
qint32 m_udp_bytes_format; qint32 ramp_down_bits;
bool m_m_udp_bytes_format_isSet; bool m_ramp_down_bits_isSet;
QString* udp_address; qint32 ramp_range;
bool m_udp_address_isSet; bool m_ramp_range_isSet;
qint32 udp_port; qint32 modulate_while_ramping;
bool m_udp_port_isSet; bool m_modulate_while_ramping_isSet;
qint32 lpf_taps;
bool m_lpf_taps_isSet;
qint32 bb_noise;
bool m_bb_noise_isSet;
qint32 write_to_file;
bool m_write_to_file_isSet;
qint32 spectrum_rate;
bool m_spectrum_rate_isSet;
QString* data;
bool m_data_isSet;
qint32 rgb_color; qint32 rgb_color;
bool m_rgb_color_isSet; bool m_rgb_color_isSet;
@ -166,6 +235,33 @@ private:
qint32 reverse_api_channel_index; qint32 reverse_api_channel_index;
bool m_reverse_api_channel_index_isSet; bool m_reverse_api_channel_index_isSet;
qint32 scramble;
bool m_scramble_isSet;
qint32 polynomial;
bool m_polynomial_isSet;
qint32 pulse_shaping;
bool m_pulse_shaping_isSet;
float beta;
bool m_beta_isSet;
qint32 symbol_span;
bool m_symbol_span_isSet;
qint32 udp_enabled;
bool m_udp_enabled_isSet;
qint32 udp_bytes_format;
bool m_udp_bytes_format_isSet;
QString* udp_address;
bool m_udp_address_isSet;
qint32 udp_port;
bool m_udp_port_isSet;
}; };
} }

View File

@ -140,7 +140,6 @@
#include "SWGHackRFInputSettings.h" #include "SWGHackRFInputSettings.h"
#include "SWGHackRFOutputSettings.h" #include "SWGHackRFOutputSettings.h"
#include "SWGIEEE_802_15_4_ModActions.h" #include "SWGIEEE_802_15_4_ModActions.h"
#include "SWGIEEE_802_15_4_ModActions_tx.h"
#include "SWGIEEE_802_15_4_ModReport.h" #include "SWGIEEE_802_15_4_ModReport.h"
#include "SWGIEEE_802_15_4_ModSettings.h" #include "SWGIEEE_802_15_4_ModSettings.h"
#include "SWGInstanceChannelsResponse.h" #include "SWGInstanceChannelsResponse.h"
@ -938,11 +937,6 @@ namespace SWGSDRangel {
obj->init(); obj->init();
return obj; return obj;
} }
if(QString("SWGIEEE_802_15_4_ModActions_tx").compare(type) == 0) {
SWGIEEE_802_15_4_ModActions_tx *obj = new SWGIEEE_802_15_4_ModActions_tx();
obj->init();
return obj;
}
if(QString("SWGIEEE_802_15_4_ModReport").compare(type) == 0) { if(QString("SWGIEEE_802_15_4_ModReport").compare(type) == 0) {
SWGIEEE_802_15_4_ModReport *obj = new SWGIEEE_802_15_4_ModReport(); SWGIEEE_802_15_4_ModReport *obj = new SWGIEEE_802_15_4_ModReport();
obj->init(); obj->init();