1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-17 23:28:50 -05:00

Feature plugins framework: REST API source yaml files and generated code

This commit is contained in:
f4exb 2020-09-21 03:05:44 +02:00
parent e36ab79b7a
commit 20ef49ea84
39 changed files with 16455 additions and 1830 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,53 @@
ChannelReport:
description: Base channel report. Only the channel report corresponding to the channel specified in the channelType field is or should be present.
discriminator: channelType
required:
- deviceHwType
- direction
properties:
channelType:
description: Channel type code
type: string
direction:
description: 0 for Rx only, 1 for Tx only or 2 for any number and direction (default 0)
type: integer
AMDemodReport:
$ref: "/doc/swagger/include/AMDemod.yaml#/AMDemodReport"
AMModReport:
$ref: "/doc/swagger/include/AMMod.yaml#/AMModReport"
ATVModReport:
$ref: "/doc/swagger/include/ATVMod.yaml#/ATVModReport"
BFMDemodReport:
$ref: "/doc/swagger/include/BFMDemod.yaml#/BFMDemodReport"
DSDDemodReport:
$ref: "/doc/swagger/include/DSDDemod.yaml#/DSDDemodReport"
FileSinkReport:
$ref: "/doc/swagger/include/FileSink.yaml#/FileSinkReport"
FileSourceReport:
$ref: "/doc/swagger/include/FileSource.yaml#/FileSourceReport"
FreeDVDemodReport:
$ref: "/doc/swagger/include/FreeDVDemod.yaml#/FreeDVDemodReport"
FreeDVModReport:
$ref: "/doc/swagger/include/FreeDVMod.yaml#/FreeDVModReport"
FreqTrackerReport:
$ref: "/doc/swagger/include/FreqTracker.yaml#/FreqTrackerReport"
NFMDemodReport:
$ref: "/doc/swagger/include/NFMDemod.yaml#/NFMDemodReport"
NFMModReport:
$ref: "/doc/swagger/include/NFMMod.yaml#/NFMModReport"
SSBDemodReport:
$ref: "/doc/swagger/include/SSBDemod.yaml#/SSBDemodReport"
RemoteSourceReport:
$ref: "/doc/swagger/include/RemoteSource.yaml#/RemoteSourceReport"
PacketModReport:
$ref: "/doc/swagger/include/PacketMod.yaml#/PacketModReport"
SSBModReport:
$ref: "/doc/swagger/include/SSBMod.yaml#/SSBModReport"
UDPSourceReport:
$ref: "/doc/swagger/include/UDPSource.yaml#/UDPSourceReport"
UDPSinkReport:
$ref: "/doc/swagger/include/UDPSink.yaml#/UDPSinkReport"
WFMDemodReport:
$ref: "/doc/swagger/include/WFMDemod.yaml#/WFMDemodReport"
WFMModReport:
$ref: "/doc/swagger/include/WFMMod.yaml#/WFMModReport"

View File

@ -0,0 +1,17 @@
FeatureActions:
description: Base feature actions. Only the feature actions corresponding to the feature specified in the featureType field is or should be present.
discriminator: featureType
required:
- featureType
properties:
featureType:
description: Feature type code
type: string
originatorFeatureSetIndex:
description: Optional for reverse API. This is the feature set index from where the message comes from.
type: integer
originatorFeatureIndex:
description: Optional for reverse API. This is the feature index from where the message comes from.
type: integer
SimplePTTActions:
$ref: "/doc/swagger/include/SimplePTT.yaml#/SimplePTTActions"

View File

@ -0,0 +1,11 @@
FeatureReport:
description: Base feature report. Only the feature report corresponding to the feature specified in the featureType field is or should be present.
discriminator: featureType
required:
- featureType
properties:
featureType:
description: Feature type code
type: string
SimplePTTReport:
$ref: "/doc/swagger/include/SimplePTT.yaml#/SimplePTTReport"

View File

@ -0,0 +1,17 @@
FeatureSettings:
description: Base feature settings. Only the feature settings corresponding to the feature specified in the featureType field is or should be present.
discriminator: featureType
required:
- featureType
properties:
featureType:
description: Feature type code
type: string
originatorFeatureSetIndex:
description: Optional for reverse API. This is the feature set index from where the message comes from.
type: integer
originatorFeatureIndex:
description: Optional for reverse API. This is the feature index from where the message comes from.
type: integer
SimplePTTSettings:
$ref: "/doc/swagger/include/SimplePTT.yaml#/SimplePTTSettings"

View File

@ -0,0 +1,50 @@
SimplePTTSettings:
description: "Simple PTT settings"
properties:
title:
type: string
rgbColor:
type: integer
rxDeviceSetIndex:
description: index of the Rx device set to connect the Rx side to
type: integer
txDeviceSetIndex:
description: index of the Tx device set to connect the Tx side to
type: integer
rx2TxDelayMs:
description: Delay in milliseconds from Rx off to Tx on
type: integer
tx2RxDelayMs:
description: Delay in milliseconds from Tx off to Rx on
type: integer
useReverseAPI:
description: Synchronize with reverse API (1 for yes, 0 for no)
type: integer
reverseAPIAddress:
type: string
reverseAPIPort:
type: integer
reverseAPIDeviceIndex:
type: integer
reverseAPIChannelIndex:
type: integer
SimplePTTReport:
description: "Simple PTT report"
properties:
ptt:
type: integer
description: >
PTT status
* 0 - released
* 1 - engaged
SimplePTTActions:
description: "Simple PTT actions"
properties:
ptt:
type: integer
description: >
PTT action
* 0 - release
* 1 - engage

View File

@ -883,6 +883,23 @@ paths:
"501":
$ref: "#/responses/Response_501"
/sdrangel/featuresets:
x-swagger-router-controller: instance
get:
description: Get summary information about feature sets opened in the instance
operationId: instanceFeatureSetsGet
tags:
- Instance
responses:
"200":
description: On success return feature set list
schema:
$ref: "#/definitions/FeatureSetList"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/deviceset:
x-swagger-router-controller: instance
post:
@ -1457,8 +1474,9 @@ paths:
$ref: "#/responses/Response_501"
/sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}:
x-swagger-router-controller: deviceset
delete:
description: delete channel (server only)
description: delete a channel
operationId: devicesetChannelDelete
tags:
- DeviceSet
@ -1483,7 +1501,7 @@ paths:
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Device or channel not found
description: Device set or channel not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
@ -1519,7 +1537,7 @@ paths:
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Device or channel not found
description: Device set or channel not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
@ -1558,7 +1576,7 @@ paths:
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Device or channel not found
description: Device set or channel not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
@ -1597,7 +1615,7 @@ paths:
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Device or channel not found
description: Device set or channel not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
@ -1627,13 +1645,13 @@ paths:
"200":
description: On success return channel report
schema:
$ref: "#/definitions/ChannelReport"
$ref: "/doc/swagger/include/ChannelReport.yaml#/ChannelReport"
"400":
description: Invalid device set or channel index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Device or channel not found
description: Device set or channel not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
@ -1683,6 +1701,400 @@ paths:
"501":
$ref: "#/responses/Response_501"
/sdrangel/featureset/{featureSetIndex}:
x-swagger-router-controller: featureset
get:
description: Get feature set information
operationId: featuresetGet
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the device set list
responses:
"200":
description: On success return details on the feature set
schema:
$ref: "#/definitions/FeatureSet"
"404":
description: Invalid index
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/featureset/{featureSetIndex}/feature:
x-swagger-router-controller: featureset
post:
description: add a feature
operationId: featuresetFeaturePost
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- name: body
in: body
description: Feature identification (no settings data)
required: true
schema:
$ref: "/doc/swagger/include/FeatureSettings.yaml#/FeatureSettings"
responses:
"202":
description: Message to add a feature was sent successfully
schema:
$ref: "#/definitions/SuccessResponse"
"400":
description: Invalid feature set index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Feature not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/featureset/{featureSetIndex}/feature/{featureIndex}:
x-swagger-router-controller: featureset
delete:
description: delete a feature
operationId: featuresetFeatureDelete
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- in: path
name: featureIndex
type: integer
required: true
description: Index of feature in the features list
responses:
"200":
description: On success return deleted feature settings
schema:
$ref: "/doc/swagger/include/FeatureSettings.yaml#/FeatureSettings"
"400":
description: Invalid feature set or feature index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Feature set or feature not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/featureset/{featureSetIndex}/feature/{featureIndex}/run:
x-swagger-router-controller: featureset
get:
description: get feature run status
operationId: featuresetFeatureRunGet
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- in: path
name: featureIndex
type: integer
required: true
description: Index of feature in the features list
responses:
"200":
description: On success return current feature run state
schema:
$ref: "#/definitions/DeviceState"
"400":
description: Invalid feature set index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Feature not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
post:
description: start feature
operationId: featuresetFeatureRunPost
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- in: path
name: featureIndex
type: integer
required: true
description: Index of feature in the features list
responses:
"200":
description: On success return state before change
schema:
$ref: "#/definitions/DeviceState"
"400":
description: Invalid feature set index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Feature not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
delete:
description: stop feature
operationId: featuresetFeatureRunDelete
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- in: path
name: featureIndex
type: integer
required: true
description: Index of feature in the features list
responses:
"200":
description: On success return state before change
schema:
$ref: "#/definitions/DeviceState"
"400":
description: Invalid device set index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Device not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/featureset/{featureSetIndex}/feature/{featureIndex}/settings:
x-swagger-router-controller: featureset
get:
description: get a feature settings
operationId: featuresetFeatureSettingsGet
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- in: path
name: featureIndex
type: integer
required: true
description: Index of the feature in the features list for this feature set
responses:
"200":
description: On success return feature settings
schema:
$ref: "/doc/swagger/include/FeatureSettings.yaml#/FeatureSettings"
"400":
description: Invalid feature set or feature index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Feature set or feature not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
put:
description: apply all settings unconditionally (force)
operationId: featuresetFEatureSettingsPut
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- in: path
name: featureIndex
type: integer
required: true
description: Index of the feature in the features list for this feature set
- name: body
in: body
description: Feature settings to apply
required: true
schema:
$ref: "/doc/swagger/include/FeatureSettings.yaml#/FeatureSettings"
responses:
"200":
description: On success return feature new settings
schema:
$ref: "/doc/swagger/include/FeatureSettings.yaml#/FeatureSettings"
"400":
description: Invalid feature set or feature index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Feature set or feature not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
patch:
description: apply settings differentially (no force)
operationId: featuresetFeatureSettingsPatch
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- in: path
name: featureIndex
type: integer
required: true
description: Index of the feature in the features list for this feature set
- name: body
in: body
description: Feature settings to apply
required: true
schema:
$ref: "/doc/swagger/include/FeatureSettings.yaml#/FeatureSettings"
responses:
"200":
description: On success return feature new settings
schema:
$ref: "/doc/swagger/include/FeatureSettings.yaml#/FeatureSettings"
"400":
description: Invalid feature set or feature index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Feature set or feature not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/featureset/{featureSetIndex}/feature/{featureIndex}/report:
x-swagger-router-controller: featureset
get:
description: get a feature report
operationId: featuresetFeatureReportGet
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- in: path
name: featureIndex
type: integer
required: true
description: Index of the feature in the features list for this feature set
responses:
"200":
description: On success return feature report
schema:
$ref: "/doc/swagger/include/FeatureReport.yaml#/FeatureReport"
"400":
description: Invalid feature set or feature index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Feature set or feature not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/featureset/{featureSetIndex}/feature/{featureIndex}/actions:
x-swagger-router-controller: featureset
post:
description: post an action or actions on a channel
operationId: featuresetFeatureActionsPost
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- in: path
name: featureIndex
type: integer
required: true
description: Index of the feature in the features list for this feature set
- name: body
in: body
description: Action(s) to apply to the feature
required: true
schema:
$ref: "/doc/swagger/include/FeatureActions.yaml#/FeatureActions"
responses:
"202":
description: Message to perform action was sent successfully
schema:
$ref: "#/definitions/SuccessResponse"
"400":
description: Invalid feature set or feature index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Feature set or feature not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/swagger:
x-swagger-pipe: swagger_raw
@ -1891,6 +2303,53 @@ definitions:
items:
$ref: "#/definitions/DeviceSet"
Feature:
description: "Feature summarized information"
required:
- index
- id
- uid
- title
properties:
index:
description: "Index in the list of features"
type: integer
id:
description: "Key to identify the type of feature"
type: string
uid:
description: "Feature instance unique id"
type: integer
format: int64
title:
description: "Freeform title of the feature"
type: string
FeatureSet:
description: "Grouping of features"
required:
- featurecount
properties:
featurecount:
description: "Number of features in the set"
type: integer
features:
description: "Features list"
type: array
items:
$ref: "#/definitions/Feature"
FeatureSetList:
description: "List of feature sets opened in this instance"
required:
- featuresetcount
properties:
featuresetcount:
description: "Number of feature sets opened in this instance"
type: integer
featureSets:
type: array
items:
$ref: "#/definitions/FeatureSet"
DeviceState:
description: "Device running state"
properties:
@ -1976,7 +2435,7 @@ definitions:
description: "Channel shift frequency in Hz from the center of baseband"
type: integer
report:
$ref: "#/definitions/ChannelReport"
$ref: "/doc/swagger/include/ChannelReport.yaml#/ChannelReport"
ChannelsDetail:
description: "All channels detailed information"
@ -2266,113 +2725,6 @@ definitions:
preset:
$ref: "#/definitions/PresetIdentifier"
DeviceReport:
description: Base device report. Only the device report corresponding to the device specified in the deviceHwType is or should be present.
discriminator: deviceHwType
required:
- deviceHwType
- direction
properties:
deviceHwType:
description: Device hardware type code
type: string
direction:
description: 0 for Rx only, 1 for Tx only or 2 for any number and direction (default 0)
type: integer
airspyReport:
$ref: "/doc/swagger/include/Airspy.yaml#/AirspyReport"
airspyHFReport:
$ref: "/doc/swagger/include/AirspyHF.yaml#/AirspyHFReport"
bladeRF2InputReport:
$ref: "/doc/swagger/include/BladeRF2.yaml#/BladeRF2InputReport"
bladeRF2OutputReport:
$ref: "/doc/swagger/include/BladeRF2.yaml#/BladeRF2OutputReport"
fileInputReport:
$ref: "/doc/swagger/include/FileInput.yaml#/FileInputReport"
limeSdrInputReport:
$ref: "/doc/swagger/include/LimeSdr.yaml#/LimeSdrInputReport"
kiwiSDRReport:
$ref: "/doc/swagger/include/KiwiSDR.yaml#/KiwiSDRReport"
limeSdrOutputReport:
$ref: "/doc/swagger/include/LimeSdr.yaml#/LimeSdrOutputReport"
localInputReport:
$ref: "/doc/swagger/include/LocalInput.yaml#/LocalInputReport"
localOutputReport:
$ref: "/doc/swagger/include/LocalOutput.yaml#/LocalOutputReport"
perseusReport:
$ref: "/doc/swagger/include/Perseus.yaml#/PerseusReport"
plutoSdrInputReport:
$ref: "/doc/swagger/include/PlutoSdr.yaml#/PlutoSdrInputReport"
plutoSdrOutputReport:
$ref: "/doc/swagger/include/PlutoSdr.yaml#/PlutoSdrOutputReport"
rtlSdrReport:
$ref: "/doc/swagger/include/RtlSdr.yaml#/RtlSdrReport"
remoteOutputReport:
$ref: "/doc/swagger/include/RemoteOutput.yaml#/RemoteOutputReport"
remoteInputReport:
$ref: "/doc/swagger/include/RemoteInput.yaml#/RemoteInputReport"
sdrPlayReport:
$ref: "/doc/swagger/include/SDRPlay.yaml#/SDRPlayReport"
soapySDRInputReport:
$ref: "/doc/swagger/include/SoapySDR.yaml#/SoapySDRReport"
soapySDROutputReport:
$ref: "/doc/swagger/include/SoapySDR.yaml#/SoapySDRReport"
xtrxInputReport:
$ref: "/doc/swagger/include/Xtrx.yaml#/XtrxInputReport"
xtrxOutputReport:
$ref: "/doc/swagger/include/Xtrx.yaml#/XtrxOutputReport"
ChannelReport:
description: Base channel report. Only the channel report corresponding to the channel specified in the channelType field is or should be present.
discriminator: channelType
properties:
channelType:
description: Channel type code
type: string
direction:
description: 0 for Rx only, 1 for Tx only or 2 for any number and direction (default 0)
type: integer
AMDemodReport:
$ref: "/doc/swagger/include/AMDemod.yaml#/AMDemodReport"
AMModReport:
$ref: "/doc/swagger/include/AMMod.yaml#/AMModReport"
ATVModReport:
$ref: "/doc/swagger/include/ATVMod.yaml#/ATVModReport"
BFMDemodReport:
$ref: "/doc/swagger/include/BFMDemod.yaml#/BFMDemodReport"
DSDDemodReport:
$ref: "/doc/swagger/include/DSDDemod.yaml#/DSDDemodReport"
FileSinkReport:
$ref: "/doc/swagger/include/FileSink.yaml#/FileSinkReport"
FileSourceReport:
$ref: "/doc/swagger/include/FileSource.yaml#/FileSourceReport"
FreeDVDemodReport:
$ref: "/doc/swagger/include/FreeDVDemod.yaml#/FreeDVDemodReport"
FreeDVModReport:
$ref: "/doc/swagger/include/FreeDVMod.yaml#/FreeDVModReport"
FreqTrackerReport:
$ref: "/doc/swagger/include/FreqTracker.yaml#/FreqTrackerReport"
NFMDemodReport:
$ref: "/doc/swagger/include/NFMDemod.yaml#/NFMDemodReport"
NFMModReport:
$ref: "/doc/swagger/include/NFMMod.yaml#/NFMModReport"
PacketModReport:
$ref: "/doc/swagger/include/PacketMod.yaml#/PacketModReport"
SSBDemodReport:
$ref: "/doc/swagger/include/SSBDemod.yaml#/SSBDemodReport"
RemoteSourceReport:
$ref: "/doc/swagger/include/RemoteSource.yaml#/RemoteSourceReport"
SSBModReport:
$ref: "/doc/swagger/include/SSBMod.yaml#/SSBModReport"
UDPSourceReport:
$ref: "/doc/swagger/include/UDPSource.yaml#/UDPSourceReport"
UDPSinkReport:
$ref: "/doc/swagger/include/UDPSink.yaml#/UDPSinkReport"
WFMDemodReport:
$ref: "/doc/swagger/include/WFMDemod.yaml#/WFMDemodReport"
WFMModReport:
$ref: "/doc/swagger/include/WFMMod.yaml#/WFMModReport"
responses:
Response_500:

View File

@ -0,0 +1,53 @@
ChannelReport:
description: Base channel report. Only the channel report corresponding to the channel specified in the channelType field is or should be present.
discriminator: channelType
required:
- deviceHwType
- direction
properties:
channelType:
description: Channel type code
type: string
direction:
description: 0 for Rx only, 1 for Tx only or 2 for any number and direction (default 0)
type: integer
AMDemodReport:
$ref: "http://swgserver:8081/api/swagger/include/AMDemod.yaml#/AMDemodReport"
AMModReport:
$ref: "http://swgserver:8081/api/swagger/include/AMMod.yaml#/AMModReport"
ATVModReport:
$ref: "http://swgserver:8081/api/swagger/include/ATVMod.yaml#/ATVModReport"
BFMDemodReport:
$ref: "http://swgserver:8081/api/swagger/include/BFMDemod.yaml#/BFMDemodReport"
DSDDemodReport:
$ref: "http://swgserver:8081/api/swagger/include/DSDDemod.yaml#/DSDDemodReport"
FileSinkReport:
$ref: "http://swgserver:8081/api/swagger/include/FileSink.yaml#/FileSinkReport"
FileSourceReport:
$ref: "http://swgserver:8081/api/swagger/include/FileSource.yaml#/FileSourceReport"
FreeDVDemodReport:
$ref: "http://swgserver:8081/api/swagger/include/FreeDVDemod.yaml#/FreeDVDemodReport"
FreeDVModReport:
$ref: "http://swgserver:8081/api/swagger/include/FreeDVMod.yaml#/FreeDVModReport"
FreqTrackerReport:
$ref: "http://swgserver:8081/api/swagger/include/FreqTracker.yaml#/FreqTrackerReport"
NFMDemodReport:
$ref: "http://swgserver:8081/api/swagger/include/NFMDemod.yaml#/NFMDemodReport"
NFMModReport:
$ref: "http://swgserver:8081/api/swagger/include/NFMMod.yaml#/NFMModReport"
SSBDemodReport:
$ref: "http://swgserver:8081/api/swagger/include/SSBDemod.yaml#/SSBDemodReport"
RemoteSourceReport:
$ref: "http://swgserver:8081/api/swagger/include/RemoteSource.yaml#/RemoteSourceReport"
PacketModReport:
$ref: "http://swgserver:8081/api/swagger/include/PacketMod.yaml#/PacketModReport"
SSBModReport:
$ref: "http://swgserver:8081/api/swagger/include/SSBMod.yaml#/SSBModReport"
UDPSourceReport:
$ref: "http://swgserver:8081/api/swagger/include/UDPSource.yaml#/UDPSourceReport"
UDPSinkReport:
$ref: "http://swgserver:8081/api/swagger/include/UDPSink.yaml#/UDPSinkReport"
WFMDemodReport:
$ref: "http://swgserver:8081/api/swagger/include/WFMDemod.yaml#/WFMDemodReport"
WFMModReport:
$ref: "http://swgserver:8081/api/swagger/include/WFMMod.yaml#/WFMModReport"

View File

@ -0,0 +1,17 @@
FeatureActions:
description: Base feature actions. Only the feature actions corresponding to the feature specified in the featureType field is or should be present.
discriminator: featureType
required:
- featureType
properties:
featureType:
description: Feature type code
type: string
originatorFeatureSetIndex:
description: Optional for reverse API. This is the feature set index from where the message comes from.
type: integer
originatorFeatureIndex:
description: Optional for reverse API. This is the feature index from where the message comes from.
type: integer
SimplePTTActions:
$ref: "http://swgserver:8081/api/swagger/include/SimplePTT.yaml#/SimplePTTActions"

View File

@ -0,0 +1,11 @@
FeatureReport:
description: Base feature report. Only the feature report corresponding to the feature specified in the featureType field is or should be present.
discriminator: featureType
required:
- featureType
properties:
featureType:
description: Feature type code
type: string
SimplePTTReport:
$ref: "http://swgserver:8081/api/swagger/include/SimplePTT.yaml#/SimplePTTReport"

View File

@ -0,0 +1,17 @@
FeatureSettings:
description: Base feature settings. Only the feature settings corresponding to the feature specified in the featureType field is or should be present.
discriminator: featureType
required:
- featureType
properties:
featureType:
description: Feature type code
type: string
originatorFeatureSetIndex:
description: Optional for reverse API. This is the feature set index from where the message comes from.
type: integer
originatorFeatureIndex:
description: Optional for reverse API. This is the feature index from where the message comes from.
type: integer
SimplePTTSettings:
$ref: "http://swgserver:8081/api/swagger/include/SimplePTT.yaml#/SimplePTTSettings"

View File

@ -0,0 +1,50 @@
SimplePTTSettings:
description: "Simple PTT settings"
properties:
title:
type: string
rgbColor:
type: integer
rxDeviceSetIndex:
description: index of the Rx device set to connect the Rx side to
type: integer
txDeviceSetIndex:
description: index of the Tx device set to connect the Tx side to
type: integer
rx2TxDelayMs:
description: Delay in milliseconds from Rx off to Tx on
type: integer
tx2RxDelayMs:
description: Delay in milliseconds from Tx off to Rx on
type: integer
useReverseAPI:
description: Synchronize with reverse API (1 for yes, 0 for no)
type: integer
reverseAPIAddress:
type: string
reverseAPIPort:
type: integer
reverseAPIDeviceIndex:
type: integer
reverseAPIChannelIndex:
type: integer
SimplePTTReport:
description: "Simple PTT report"
properties:
ptt:
type: integer
description: >
PTT status
* 0 - released
* 1 - engaged
SimplePTTActions:
description: "Simple PTT actions"
properties:
ptt:
type: integer
description: >
PTT action
* 0 - release
* 1 - engage

View File

@ -883,6 +883,23 @@ paths:
"501":
$ref: "#/responses/Response_501"
/sdrangel/featuresets:
x-swagger-router-controller: instance
get:
description: Get summary information about feature sets opened in the instance
operationId: instanceFeatureSetsGet
tags:
- Instance
responses:
"200":
description: On success return feature set list
schema:
$ref: "#/definitions/FeatureSetList"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/deviceset:
x-swagger-router-controller: instance
post:
@ -1457,8 +1474,9 @@ paths:
$ref: "#/responses/Response_501"
/sdrangel/deviceset/{deviceSetIndex}/channel/{channelIndex}:
x-swagger-router-controller: deviceset
delete:
description: delete channel (server only)
description: delete a channel
operationId: devicesetChannelDelete
tags:
- DeviceSet
@ -1483,7 +1501,7 @@ paths:
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Device or channel not found
description: Device set or channel not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
@ -1519,7 +1537,7 @@ paths:
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Device or channel not found
description: Device set or channel not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
@ -1558,7 +1576,7 @@ paths:
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Device or channel not found
description: Device set or channel not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
@ -1597,7 +1615,7 @@ paths:
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Device or channel not found
description: Device set or channel not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
@ -1627,13 +1645,13 @@ paths:
"200":
description: On success return channel report
schema:
$ref: "#/definitions/ChannelReport"
$ref: "http://swgserver:8081/api/swagger/include/ChannelReport.yaml#/ChannelReport"
"400":
description: Invalid device set or channel index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Device or channel not found
description: Device set or channel not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
@ -1683,6 +1701,400 @@ paths:
"501":
$ref: "#/responses/Response_501"
/sdrangel/featureset/{featureSetIndex}:
x-swagger-router-controller: featureset
get:
description: Get feature set information
operationId: featuresetGet
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the device set list
responses:
"200":
description: On success return details on the feature set
schema:
$ref: "#/definitions/FeatureSet"
"404":
description: Invalid index
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/featureset/{featureSetIndex}/feature:
x-swagger-router-controller: featureset
post:
description: add a feature
operationId: featuresetFeaturePost
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- name: body
in: body
description: Feature identification (no settings data)
required: true
schema:
$ref: "http://swgserver:8081/api/swagger/include/FeatureSettings.yaml#/FeatureSettings"
responses:
"202":
description: Message to add a feature was sent successfully
schema:
$ref: "#/definitions/SuccessResponse"
"400":
description: Invalid feature set index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Feature not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/featureset/{featureSetIndex}/feature/{featureIndex}:
x-swagger-router-controller: featureset
delete:
description: delete a feature
operationId: featuresetFeatureDelete
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- in: path
name: featureIndex
type: integer
required: true
description: Index of feature in the features list
responses:
"200":
description: On success return deleted feature settings
schema:
$ref: "http://swgserver:8081/api/swagger/include/FeatureSettings.yaml#/FeatureSettings"
"400":
description: Invalid feature set or feature index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Feature set or feature not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/featureset/{featureSetIndex}/feature/{featureIndex}/run:
x-swagger-router-controller: featureset
get:
description: get feature run status
operationId: featuresetFeatureRunGet
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- in: path
name: featureIndex
type: integer
required: true
description: Index of feature in the features list
responses:
"200":
description: On success return current feature run state
schema:
$ref: "#/definitions/DeviceState"
"400":
description: Invalid feature set index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Feature not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
post:
description: start feature
operationId: featuresetFeatureRunPost
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- in: path
name: featureIndex
type: integer
required: true
description: Index of feature in the features list
responses:
"200":
description: On success return state before change
schema:
$ref: "#/definitions/DeviceState"
"400":
description: Invalid feature set index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Feature not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
delete:
description: stop feature
operationId: featuresetFeatureRunDelete
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- in: path
name: featureIndex
type: integer
required: true
description: Index of feature in the features list
responses:
"200":
description: On success return state before change
schema:
$ref: "#/definitions/DeviceState"
"400":
description: Invalid device set index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Device not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/featureset/{featureSetIndex}/feature/{featureIndex}/settings:
x-swagger-router-controller: featureset
get:
description: get a feature settings
operationId: featuresetFeatureSettingsGet
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- in: path
name: featureIndex
type: integer
required: true
description: Index of the feature in the features list for this feature set
responses:
"200":
description: On success return feature settings
schema:
$ref: "http://swgserver:8081/api/swagger/include/FeatureSettings.yaml#/FeatureSettings"
"400":
description: Invalid feature set or feature index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Feature set or feature not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
put:
description: apply all settings unconditionally (force)
operationId: featuresetFEatureSettingsPut
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- in: path
name: featureIndex
type: integer
required: true
description: Index of the feature in the features list for this feature set
- name: body
in: body
description: Feature settings to apply
required: true
schema:
$ref: "http://swgserver:8081/api/swagger/include/FeatureSettings.yaml#/FeatureSettings"
responses:
"200":
description: On success return feature new settings
schema:
$ref: "http://swgserver:8081/api/swagger/include/FeatureSettings.yaml#/FeatureSettings"
"400":
description: Invalid feature set or feature index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Feature set or feature not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
patch:
description: apply settings differentially (no force)
operationId: featuresetFeatureSettingsPatch
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- in: path
name: featureIndex
type: integer
required: true
description: Index of the feature in the features list for this feature set
- name: body
in: body
description: Feature settings to apply
required: true
schema:
$ref: "http://swgserver:8081/api/swagger/include/FeatureSettings.yaml#/FeatureSettings"
responses:
"200":
description: On success return feature new settings
schema:
$ref: "http://swgserver:8081/api/swagger/include/FeatureSettings.yaml#/FeatureSettings"
"400":
description: Invalid feature set or feature index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Feature set or feature not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/featureset/{featureSetIndex}/feature/{featureIndex}/report:
x-swagger-router-controller: featureset
get:
description: get a feature report
operationId: featuresetFeatureReportGet
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- in: path
name: featureIndex
type: integer
required: true
description: Index of the feature in the features list for this feature set
responses:
"200":
description: On success return feature report
schema:
$ref: "http://swgserver:8081/api/swagger/include/FeatureReport.yaml#/FeatureReport"
"400":
description: Invalid feature set or feature index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Feature set or feature not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/featureset/{featureSetIndex}/feature/{featureIndex}/actions:
x-swagger-router-controller: featureset
post:
description: post an action or actions on a channel
operationId: featuresetFeatureActionsPost
tags:
- FeatureSet
parameters:
- in: path
name: featureSetIndex
type: integer
required: true
description: Index of feature set in the feature set list
- in: path
name: featureIndex
type: integer
required: true
description: Index of the feature in the features list for this feature set
- name: body
in: body
description: Action(s) to apply to the feature
required: true
schema:
$ref: "http://swgserver:8081/api/swagger/include/FeatureActions.yaml#/FeatureActions"
responses:
"202":
description: Message to perform action was sent successfully
schema:
$ref: "#/definitions/SuccessResponse"
"400":
description: Invalid feature set or feature index
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Feature set or feature not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/swagger:
x-swagger-pipe: swagger_raw
@ -1891,6 +2303,53 @@ definitions:
items:
$ref: "#/definitions/DeviceSet"
Feature:
description: "Feature summarized information"
required:
- index
- id
- uid
- title
properties:
index:
description: "Index in the list of features"
type: integer
id:
description: "Key to identify the type of feature"
type: string
uid:
description: "Feature instance unique id"
type: integer
format: int64
title:
description: "Freeform title of the feature"
type: string
FeatureSet:
description: "Grouping of features"
required:
- featurecount
properties:
featurecount:
description: "Number of features in the set"
type: integer
features:
description: "Features list"
type: array
items:
$ref: "#/definitions/Feature"
FeatureSetList:
description: "List of feature sets opened in this instance"
required:
- featuresetcount
properties:
featuresetcount:
description: "Number of feature sets opened in this instance"
type: integer
featureSets:
type: array
items:
$ref: "#/definitions/FeatureSet"
DeviceState:
description: "Device running state"
properties:
@ -1976,7 +2435,7 @@ definitions:
description: "Channel shift frequency in Hz from the center of baseband"
type: integer
report:
$ref: "#/definitions/ChannelReport"
$ref: "http://swgserver:8081/api/swagger/include/ChannelReport.yaml#/ChannelReport"
ChannelsDetail:
description: "All channels detailed information"
@ -2266,113 +2725,6 @@ definitions:
preset:
$ref: "#/definitions/PresetIdentifier"
DeviceReport:
description: Base device report. Only the device report corresponding to the device specified in the deviceHwType is or should be present.
discriminator: deviceHwType
required:
- deviceHwType
- direction
properties:
deviceHwType:
description: Device hardware type code
type: string
direction:
description: 0 for Rx only, 1 for Tx only or 2 for any number and direction (default 0)
type: integer
airspyReport:
$ref: "http://swgserver:8081/api/swagger/include/Airspy.yaml#/AirspyReport"
airspyHFReport:
$ref: "http://swgserver:8081/api/swagger/include/AirspyHF.yaml#/AirspyHFReport"
bladeRF2InputReport:
$ref: "http://swgserver:8081/api/swagger/include/BladeRF2.yaml#/BladeRF2InputReport"
bladeRF2OutputReport:
$ref: "http://swgserver:8081/api/swagger/include/BladeRF2.yaml#/BladeRF2OutputReport"
fileInputReport:
$ref: "http://swgserver:8081/api/swagger/include/FileInput.yaml#/FileInputReport"
limeSdrInputReport:
$ref: "http://swgserver:8081/api/swagger/include/LimeSdr.yaml#/LimeSdrInputReport"
kiwiSDRReport:
$ref: "http://swgserver:8081/api/swagger/include/KiwiSDR.yaml#/KiwiSDRReport"
limeSdrOutputReport:
$ref: "http://swgserver:8081/api/swagger/include/LimeSdr.yaml#/LimeSdrOutputReport"
localInputReport:
$ref: "http://swgserver:8081/api/swagger/include/LocalInput.yaml#/LocalInputReport"
localOutputReport:
$ref: "http://swgserver:8081/api/swagger/include/LocalOutput.yaml#/LocalOutputReport"
perseusReport:
$ref: "http://swgserver:8081/api/swagger/include/Perseus.yaml#/PerseusReport"
plutoSdrInputReport:
$ref: "http://swgserver:8081/api/swagger/include/PlutoSdr.yaml#/PlutoSdrInputReport"
plutoSdrOutputReport:
$ref: "http://swgserver:8081/api/swagger/include/PlutoSdr.yaml#/PlutoSdrOutputReport"
rtlSdrReport:
$ref: "http://swgserver:8081/api/swagger/include/RtlSdr.yaml#/RtlSdrReport"
remoteOutputReport:
$ref: "http://swgserver:8081/api/swagger/include/RemoteOutput.yaml#/RemoteOutputReport"
remoteInputReport:
$ref: "http://swgserver:8081/api/swagger/include/RemoteInput.yaml#/RemoteInputReport"
sdrPlayReport:
$ref: "http://swgserver:8081/api/swagger/include/SDRPlay.yaml#/SDRPlayReport"
soapySDRInputReport:
$ref: "http://swgserver:8081/api/swagger/include/SoapySDR.yaml#/SoapySDRReport"
soapySDROutputReport:
$ref: "http://swgserver:8081/api/swagger/include/SoapySDR.yaml#/SoapySDRReport"
xtrxInputReport:
$ref: "http://swgserver:8081/api/swagger/include/Xtrx.yaml#/XtrxInputReport"
xtrxOutputReport:
$ref: "http://swgserver:8081/api/swagger/include/Xtrx.yaml#/XtrxOutputReport"
ChannelReport:
description: Base channel report. Only the channel report corresponding to the channel specified in the channelType field is or should be present.
discriminator: channelType
properties:
channelType:
description: Channel type code
type: string
direction:
description: 0 for Rx only, 1 for Tx only or 2 for any number and direction (default 0)
type: integer
AMDemodReport:
$ref: "http://swgserver:8081/api/swagger/include/AMDemod.yaml#/AMDemodReport"
AMModReport:
$ref: "http://swgserver:8081/api/swagger/include/AMMod.yaml#/AMModReport"
ATVModReport:
$ref: "http://swgserver:8081/api/swagger/include/ATVMod.yaml#/ATVModReport"
BFMDemodReport:
$ref: "http://swgserver:8081/api/swagger/include/BFMDemod.yaml#/BFMDemodReport"
DSDDemodReport:
$ref: "http://swgserver:8081/api/swagger/include/DSDDemod.yaml#/DSDDemodReport"
FileSinkReport:
$ref: "http://swgserver:8081/api/swagger/include/FileSink.yaml#/FileSinkReport"
FileSourceReport:
$ref: "http://swgserver:8081/api/swagger/include/FileSource.yaml#/FileSourceReport"
FreeDVDemodReport:
$ref: "http://swgserver:8081/api/swagger/include/FreeDVDemod.yaml#/FreeDVDemodReport"
FreeDVModReport:
$ref: "http://swgserver:8081/api/swagger/include/FreeDVMod.yaml#/FreeDVModReport"
FreqTrackerReport:
$ref: "http://swgserver:8081/api/swagger/include/FreqTracker.yaml#/FreqTrackerReport"
NFMDemodReport:
$ref: "http://swgserver:8081/api/swagger/include/NFMDemod.yaml#/NFMDemodReport"
NFMModReport:
$ref: "http://swgserver:8081/api/swagger/include/NFMMod.yaml#/NFMModReport"
PacketModReport:
$ref: "http://swgserver:8081/api/swagger/include/PacketMod.yaml#/PacketModReport"
SSBDemodReport:
$ref: "http://swgserver:8081/api/swagger/include/SSBDemod.yaml#/SSBDemodReport"
RemoteSourceReport:
$ref: "http://swgserver:8081/api/swagger/include/RemoteSource.yaml#/RemoteSourceReport"
SSBModReport:
$ref: "http://swgserver:8081/api/swagger/include/SSBMod.yaml#/SSBModReport"
UDPSourceReport:
$ref: "http://swgserver:8081/api/swagger/include/UDPSource.yaml#/UDPSourceReport"
UDPSinkReport:
$ref: "http://swgserver:8081/api/swagger/include/UDPSink.yaml#/UDPSinkReport"
WFMDemodReport:
$ref: "http://swgserver:8081/api/swagger/include/WFMDemod.yaml#/WFMDemodReport"
WFMModReport:
$ref: "http://swgserver:8081/api/swagger/include/WFMMod.yaml#/WFMModReport"
responses:
Response_500:

File diff suppressed because it is too large Load Diff

View File

@ -56,12 +56,12 @@ SWGChannelReport::SWGChannelReport() {
m_nfm_demod_report_isSet = false;
nfm_mod_report = nullptr;
m_nfm_mod_report_isSet = false;
packet_mod_report = nullptr;
m_packet_mod_report_isSet = false;
ssb_demod_report = nullptr;
m_ssb_demod_report_isSet = false;
remote_source_report = nullptr;
m_remote_source_report_isSet = false;
packet_mod_report = nullptr;
m_packet_mod_report_isSet = false;
ssb_mod_report = nullptr;
m_ssb_mod_report_isSet = false;
udp_source_report = nullptr;
@ -108,12 +108,12 @@ SWGChannelReport::init() {
m_nfm_demod_report_isSet = false;
nfm_mod_report = new SWGNFMModReport();
m_nfm_mod_report_isSet = false;
packet_mod_report = new SWGPacketModReport();
m_packet_mod_report_isSet = false;
ssb_demod_report = new SWGSSBDemodReport();
m_ssb_demod_report_isSet = false;
remote_source_report = new SWGRemoteSourceReport();
m_remote_source_report_isSet = false;
packet_mod_report = new SWGPacketModReport();
m_packet_mod_report_isSet = false;
ssb_mod_report = new SWGSSBModReport();
m_ssb_mod_report_isSet = false;
udp_source_report = new SWGUDPSourceReport();
@ -168,15 +168,15 @@ SWGChannelReport::cleanup() {
if(nfm_mod_report != nullptr) {
delete nfm_mod_report;
}
if(packet_mod_report != nullptr) {
delete packet_mod_report;
}
if(ssb_demod_report != nullptr) {
delete ssb_demod_report;
}
if(remote_source_report != nullptr) {
delete remote_source_report;
}
if(packet_mod_report != nullptr) {
delete packet_mod_report;
}
if(ssb_mod_report != nullptr) {
delete ssb_mod_report;
}
@ -233,12 +233,12 @@ SWGChannelReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&nfm_mod_report, pJson["NFMModReport"], "SWGNFMModReport", "SWGNFMModReport");
::SWGSDRangel::setValue(&packet_mod_report, pJson["PacketModReport"], "SWGPacketModReport", "SWGPacketModReport");
::SWGSDRangel::setValue(&ssb_demod_report, pJson["SSBDemodReport"], "SWGSSBDemodReport", "SWGSSBDemodReport");
::SWGSDRangel::setValue(&remote_source_report, pJson["RemoteSourceReport"], "SWGRemoteSourceReport", "SWGRemoteSourceReport");
::SWGSDRangel::setValue(&packet_mod_report, pJson["PacketModReport"], "SWGPacketModReport", "SWGPacketModReport");
::SWGSDRangel::setValue(&ssb_mod_report, pJson["SSBModReport"], "SWGSSBModReport", "SWGSSBModReport");
::SWGSDRangel::setValue(&udp_source_report, pJson["UDPSourceReport"], "SWGUDPSourceReport", "SWGUDPSourceReport");
@ -307,15 +307,15 @@ SWGChannelReport::asJsonObject() {
if((nfm_mod_report != nullptr) && (nfm_mod_report->isSet())){
toJsonValue(QString("NFMModReport"), nfm_mod_report, obj, QString("SWGNFMModReport"));
}
if((packet_mod_report != nullptr) && (packet_mod_report->isSet())){
toJsonValue(QString("PacketModReport"), packet_mod_report, obj, QString("SWGPacketModReport"));
}
if((ssb_demod_report != nullptr) && (ssb_demod_report->isSet())){
toJsonValue(QString("SSBDemodReport"), ssb_demod_report, obj, QString("SWGSSBDemodReport"));
}
if((remote_source_report != nullptr) && (remote_source_report->isSet())){
toJsonValue(QString("RemoteSourceReport"), remote_source_report, obj, QString("SWGRemoteSourceReport"));
}
if((packet_mod_report != nullptr) && (packet_mod_report->isSet())){
toJsonValue(QString("PacketModReport"), packet_mod_report, obj, QString("SWGPacketModReport"));
}
if((ssb_mod_report != nullptr) && (ssb_mod_report->isSet())){
toJsonValue(QString("SSBModReport"), ssb_mod_report, obj, QString("SWGSSBModReport"));
}
@ -475,16 +475,6 @@ SWGChannelReport::setNfmModReport(SWGNFMModReport* nfm_mod_report) {
this->m_nfm_mod_report_isSet = true;
}
SWGPacketModReport*
SWGChannelReport::getPacketModReport() {
return packet_mod_report;
}
void
SWGChannelReport::setPacketModReport(SWGPacketModReport* packet_mod_report) {
this->packet_mod_report = packet_mod_report;
this->m_packet_mod_report_isSet = true;
}
SWGSSBDemodReport*
SWGChannelReport::getSsbDemodReport() {
return ssb_demod_report;
@ -505,6 +495,16 @@ SWGChannelReport::setRemoteSourceReport(SWGRemoteSourceReport* remote_source_rep
this->m_remote_source_report_isSet = true;
}
SWGPacketModReport*
SWGChannelReport::getPacketModReport() {
return packet_mod_report;
}
void
SWGChannelReport::setPacketModReport(SWGPacketModReport* packet_mod_report) {
this->packet_mod_report = packet_mod_report;
this->m_packet_mod_report_isSet = true;
}
SWGSSBModReport*
SWGChannelReport::getSsbModReport() {
return ssb_mod_report;
@ -602,15 +602,15 @@ SWGChannelReport::isSet(){
if(nfm_mod_report && nfm_mod_report->isSet()){
isObjectUpdated = true; break;
}
if(packet_mod_report && packet_mod_report->isSet()){
isObjectUpdated = true; break;
}
if(ssb_demod_report && ssb_demod_report->isSet()){
isObjectUpdated = true; break;
}
if(remote_source_report && remote_source_report->isSet()){
isObjectUpdated = true; break;
}
if(packet_mod_report && packet_mod_report->isSet()){
isObjectUpdated = true; break;
}
if(ssb_mod_report && ssb_mod_report->isSet()){
isObjectUpdated = true; break;
}

View File

@ -104,15 +104,15 @@ public:
SWGNFMModReport* getNfmModReport();
void setNfmModReport(SWGNFMModReport* nfm_mod_report);
SWGPacketModReport* getPacketModReport();
void setPacketModReport(SWGPacketModReport* packet_mod_report);
SWGSSBDemodReport* getSsbDemodReport();
void setSsbDemodReport(SWGSSBDemodReport* ssb_demod_report);
SWGRemoteSourceReport* getRemoteSourceReport();
void setRemoteSourceReport(SWGRemoteSourceReport* remote_source_report);
SWGPacketModReport* getPacketModReport();
void setPacketModReport(SWGPacketModReport* packet_mod_report);
SWGSSBModReport* getSsbModReport();
void setSsbModReport(SWGSSBModReport* ssb_mod_report);
@ -174,15 +174,15 @@ private:
SWGNFMModReport* nfm_mod_report;
bool m_nfm_mod_report_isSet;
SWGPacketModReport* packet_mod_report;
bool m_packet_mod_report_isSet;
SWGSSBDemodReport* ssb_demod_report;
bool m_ssb_demod_report_isSet;
SWGRemoteSourceReport* remote_source_report;
bool m_remote_source_report_isSet;
SWGPacketModReport* packet_mod_report;
bool m_packet_mod_report_isSet;
SWGSSBModReport* ssb_mod_report;
bool m_ssb_mod_report_isSet;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,656 @@
/**
* SDRangel
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
*
* OpenAPI spec version: 4.15.0
* Contact: f4exb06@gmail.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
#include "SWGFeatureSetApi.h"
#include "SWGHelpers.h"
#include "SWGModelFactory.h"
#include <QJsonArray>
#include <QJsonDocument>
namespace SWGSDRangel {
SWGFeatureSetApi::SWGFeatureSetApi() {}
SWGFeatureSetApi::~SWGFeatureSetApi() {}
SWGFeatureSetApi::SWGFeatureSetApi(QString host, QString basePath) {
this->host = host;
this->basePath = basePath;
}
void
SWGFeatureSetApi::featuresetFEatureSettingsPut(qint32 feature_set_index, qint32 feature_index, SWGFeatureSettings& body) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/featureset/{featureSetIndex}/feature/{featureIndex}/settings");
QString feature_set_indexPathParam("{"); feature_set_indexPathParam.append("featureSetIndex").append("}");
fullPath.replace(feature_set_indexPathParam, stringValue(feature_set_index));
QString feature_indexPathParam("{"); feature_indexPathParam.append("featureIndex").append("}");
fullPath.replace(feature_indexPathParam, stringValue(feature_index));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "PUT");
QString output = body.asJson();
input.request_body.append(output);
foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
this,
&SWGFeatureSetApi::featuresetFEatureSettingsPutCallback);
worker->execute(&input);
}
void
SWGFeatureSetApi::featuresetFEatureSettingsPutCallback(SWGHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
if (worker->error_type == QNetworkReply::NoError) {
msg = QString("Success! %1 bytes").arg(worker->response.length());
}
else {
msg = "Error: " + worker->error_str;
}
QString json(worker->response);
SWGFeatureSettings* output = static_cast<SWGFeatureSettings*>(create(json, QString("SWGFeatureSettings")));
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit featuresetFEatureSettingsPutSignal(output);
} else {
emit featuresetFEatureSettingsPutSignalE(output, error_type, error_str);
emit featuresetFEatureSettingsPutSignalEFull(worker, error_type, error_str);
}
}
void
SWGFeatureSetApi::featuresetFeatureActionsPost(qint32 feature_set_index, qint32 feature_index, SWGFeatureActions& body) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/featureset/{featureSetIndex}/feature/{featureIndex}/actions");
QString feature_set_indexPathParam("{"); feature_set_indexPathParam.append("featureSetIndex").append("}");
fullPath.replace(feature_set_indexPathParam, stringValue(feature_set_index));
QString feature_indexPathParam("{"); feature_indexPathParam.append("featureIndex").append("}");
fullPath.replace(feature_indexPathParam, stringValue(feature_index));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "POST");
QString output = body.asJson();
input.request_body.append(output);
foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
this,
&SWGFeatureSetApi::featuresetFeatureActionsPostCallback);
worker->execute(&input);
}
void
SWGFeatureSetApi::featuresetFeatureActionsPostCallback(SWGHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
if (worker->error_type == QNetworkReply::NoError) {
msg = QString("Success! %1 bytes").arg(worker->response.length());
}
else {
msg = "Error: " + worker->error_str;
}
QString json(worker->response);
SWGSuccessResponse* output = static_cast<SWGSuccessResponse*>(create(json, QString("SWGSuccessResponse")));
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit featuresetFeatureActionsPostSignal(output);
} else {
emit featuresetFeatureActionsPostSignalE(output, error_type, error_str);
emit featuresetFeatureActionsPostSignalEFull(worker, error_type, error_str);
}
}
void
SWGFeatureSetApi::featuresetFeatureDelete(qint32 feature_set_index, qint32 feature_index) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/featureset/{featureSetIndex}/feature/{featureIndex}");
QString feature_set_indexPathParam("{"); feature_set_indexPathParam.append("featureSetIndex").append("}");
fullPath.replace(feature_set_indexPathParam, stringValue(feature_set_index));
QString feature_indexPathParam("{"); feature_indexPathParam.append("featureIndex").append("}");
fullPath.replace(feature_indexPathParam, stringValue(feature_index));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "DELETE");
foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
this,
&SWGFeatureSetApi::featuresetFeatureDeleteCallback);
worker->execute(&input);
}
void
SWGFeatureSetApi::featuresetFeatureDeleteCallback(SWGHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
if (worker->error_type == QNetworkReply::NoError) {
msg = QString("Success! %1 bytes").arg(worker->response.length());
}
else {
msg = "Error: " + worker->error_str;
}
QString json(worker->response);
SWGFeatureSettings* output = static_cast<SWGFeatureSettings*>(create(json, QString("SWGFeatureSettings")));
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit featuresetFeatureDeleteSignal(output);
} else {
emit featuresetFeatureDeleteSignalE(output, error_type, error_str);
emit featuresetFeatureDeleteSignalEFull(worker, error_type, error_str);
}
}
void
SWGFeatureSetApi::featuresetFeaturePost(qint32 feature_set_index, SWGFeatureSettings& body) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/featureset/{featureSetIndex}/feature");
QString feature_set_indexPathParam("{"); feature_set_indexPathParam.append("featureSetIndex").append("}");
fullPath.replace(feature_set_indexPathParam, stringValue(feature_set_index));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "POST");
QString output = body.asJson();
input.request_body.append(output);
foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
this,
&SWGFeatureSetApi::featuresetFeaturePostCallback);
worker->execute(&input);
}
void
SWGFeatureSetApi::featuresetFeaturePostCallback(SWGHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
if (worker->error_type == QNetworkReply::NoError) {
msg = QString("Success! %1 bytes").arg(worker->response.length());
}
else {
msg = "Error: " + worker->error_str;
}
QString json(worker->response);
SWGSuccessResponse* output = static_cast<SWGSuccessResponse*>(create(json, QString("SWGSuccessResponse")));
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit featuresetFeaturePostSignal(output);
} else {
emit featuresetFeaturePostSignalE(output, error_type, error_str);
emit featuresetFeaturePostSignalEFull(worker, error_type, error_str);
}
}
void
SWGFeatureSetApi::featuresetFeatureReportGet(qint32 feature_set_index, qint32 feature_index) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/featureset/{featureSetIndex}/feature/{featureIndex}/report");
QString feature_set_indexPathParam("{"); feature_set_indexPathParam.append("featureSetIndex").append("}");
fullPath.replace(feature_set_indexPathParam, stringValue(feature_set_index));
QString feature_indexPathParam("{"); feature_indexPathParam.append("featureIndex").append("}");
fullPath.replace(feature_indexPathParam, stringValue(feature_index));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET");
foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
this,
&SWGFeatureSetApi::featuresetFeatureReportGetCallback);
worker->execute(&input);
}
void
SWGFeatureSetApi::featuresetFeatureReportGetCallback(SWGHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
if (worker->error_type == QNetworkReply::NoError) {
msg = QString("Success! %1 bytes").arg(worker->response.length());
}
else {
msg = "Error: " + worker->error_str;
}
QString json(worker->response);
SWGFeatureReport* output = static_cast<SWGFeatureReport*>(create(json, QString("SWGFeatureReport")));
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit featuresetFeatureReportGetSignal(output);
} else {
emit featuresetFeatureReportGetSignalE(output, error_type, error_str);
emit featuresetFeatureReportGetSignalEFull(worker, error_type, error_str);
}
}
void
SWGFeatureSetApi::featuresetFeatureRunDelete(qint32 feature_set_index, qint32 feature_index) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/featureset/{featureSetIndex}/feature/{featureIndex}/run");
QString feature_set_indexPathParam("{"); feature_set_indexPathParam.append("featureSetIndex").append("}");
fullPath.replace(feature_set_indexPathParam, stringValue(feature_set_index));
QString feature_indexPathParam("{"); feature_indexPathParam.append("featureIndex").append("}");
fullPath.replace(feature_indexPathParam, stringValue(feature_index));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "DELETE");
foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
this,
&SWGFeatureSetApi::featuresetFeatureRunDeleteCallback);
worker->execute(&input);
}
void
SWGFeatureSetApi::featuresetFeatureRunDeleteCallback(SWGHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
if (worker->error_type == QNetworkReply::NoError) {
msg = QString("Success! %1 bytes").arg(worker->response.length());
}
else {
msg = "Error: " + worker->error_str;
}
QString json(worker->response);
SWGDeviceState* output = static_cast<SWGDeviceState*>(create(json, QString("SWGDeviceState")));
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit featuresetFeatureRunDeleteSignal(output);
} else {
emit featuresetFeatureRunDeleteSignalE(output, error_type, error_str);
emit featuresetFeatureRunDeleteSignalEFull(worker, error_type, error_str);
}
}
void
SWGFeatureSetApi::featuresetFeatureRunGet(qint32 feature_set_index, qint32 feature_index) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/featureset/{featureSetIndex}/feature/{featureIndex}/run");
QString feature_set_indexPathParam("{"); feature_set_indexPathParam.append("featureSetIndex").append("}");
fullPath.replace(feature_set_indexPathParam, stringValue(feature_set_index));
QString feature_indexPathParam("{"); feature_indexPathParam.append("featureIndex").append("}");
fullPath.replace(feature_indexPathParam, stringValue(feature_index));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET");
foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
this,
&SWGFeatureSetApi::featuresetFeatureRunGetCallback);
worker->execute(&input);
}
void
SWGFeatureSetApi::featuresetFeatureRunGetCallback(SWGHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
if (worker->error_type == QNetworkReply::NoError) {
msg = QString("Success! %1 bytes").arg(worker->response.length());
}
else {
msg = "Error: " + worker->error_str;
}
QString json(worker->response);
SWGDeviceState* output = static_cast<SWGDeviceState*>(create(json, QString("SWGDeviceState")));
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit featuresetFeatureRunGetSignal(output);
} else {
emit featuresetFeatureRunGetSignalE(output, error_type, error_str);
emit featuresetFeatureRunGetSignalEFull(worker, error_type, error_str);
}
}
void
SWGFeatureSetApi::featuresetFeatureRunPost(qint32 feature_set_index, qint32 feature_index) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/featureset/{featureSetIndex}/feature/{featureIndex}/run");
QString feature_set_indexPathParam("{"); feature_set_indexPathParam.append("featureSetIndex").append("}");
fullPath.replace(feature_set_indexPathParam, stringValue(feature_set_index));
QString feature_indexPathParam("{"); feature_indexPathParam.append("featureIndex").append("}");
fullPath.replace(feature_indexPathParam, stringValue(feature_index));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "POST");
foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
this,
&SWGFeatureSetApi::featuresetFeatureRunPostCallback);
worker->execute(&input);
}
void
SWGFeatureSetApi::featuresetFeatureRunPostCallback(SWGHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
if (worker->error_type == QNetworkReply::NoError) {
msg = QString("Success! %1 bytes").arg(worker->response.length());
}
else {
msg = "Error: " + worker->error_str;
}
QString json(worker->response);
SWGDeviceState* output = static_cast<SWGDeviceState*>(create(json, QString("SWGDeviceState")));
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit featuresetFeatureRunPostSignal(output);
} else {
emit featuresetFeatureRunPostSignalE(output, error_type, error_str);
emit featuresetFeatureRunPostSignalEFull(worker, error_type, error_str);
}
}
void
SWGFeatureSetApi::featuresetFeatureSettingsGet(qint32 feature_set_index, qint32 feature_index) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/featureset/{featureSetIndex}/feature/{featureIndex}/settings");
QString feature_set_indexPathParam("{"); feature_set_indexPathParam.append("featureSetIndex").append("}");
fullPath.replace(feature_set_indexPathParam, stringValue(feature_set_index));
QString feature_indexPathParam("{"); feature_indexPathParam.append("featureIndex").append("}");
fullPath.replace(feature_indexPathParam, stringValue(feature_index));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET");
foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
this,
&SWGFeatureSetApi::featuresetFeatureSettingsGetCallback);
worker->execute(&input);
}
void
SWGFeatureSetApi::featuresetFeatureSettingsGetCallback(SWGHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
if (worker->error_type == QNetworkReply::NoError) {
msg = QString("Success! %1 bytes").arg(worker->response.length());
}
else {
msg = "Error: " + worker->error_str;
}
QString json(worker->response);
SWGFeatureSettings* output = static_cast<SWGFeatureSettings*>(create(json, QString("SWGFeatureSettings")));
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit featuresetFeatureSettingsGetSignal(output);
} else {
emit featuresetFeatureSettingsGetSignalE(output, error_type, error_str);
emit featuresetFeatureSettingsGetSignalEFull(worker, error_type, error_str);
}
}
void
SWGFeatureSetApi::featuresetFeatureSettingsPatch(qint32 feature_set_index, qint32 feature_index, SWGFeatureSettings& body) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/featureset/{featureSetIndex}/feature/{featureIndex}/settings");
QString feature_set_indexPathParam("{"); feature_set_indexPathParam.append("featureSetIndex").append("}");
fullPath.replace(feature_set_indexPathParam, stringValue(feature_set_index));
QString feature_indexPathParam("{"); feature_indexPathParam.append("featureIndex").append("}");
fullPath.replace(feature_indexPathParam, stringValue(feature_index));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "PATCH");
QString output = body.asJson();
input.request_body.append(output);
foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
this,
&SWGFeatureSetApi::featuresetFeatureSettingsPatchCallback);
worker->execute(&input);
}
void
SWGFeatureSetApi::featuresetFeatureSettingsPatchCallback(SWGHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
if (worker->error_type == QNetworkReply::NoError) {
msg = QString("Success! %1 bytes").arg(worker->response.length());
}
else {
msg = "Error: " + worker->error_str;
}
QString json(worker->response);
SWGFeatureSettings* output = static_cast<SWGFeatureSettings*>(create(json, QString("SWGFeatureSettings")));
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit featuresetFeatureSettingsPatchSignal(output);
} else {
emit featuresetFeatureSettingsPatchSignalE(output, error_type, error_str);
emit featuresetFeatureSettingsPatchSignalEFull(worker, error_type, error_str);
}
}
void
SWGFeatureSetApi::featuresetGet(qint32 feature_set_index) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/featureset/{featureSetIndex}");
QString feature_set_indexPathParam("{"); feature_set_indexPathParam.append("featureSetIndex").append("}");
fullPath.replace(feature_set_indexPathParam, stringValue(feature_set_index));
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET");
foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
this,
&SWGFeatureSetApi::featuresetGetCallback);
worker->execute(&input);
}
void
SWGFeatureSetApi::featuresetGetCallback(SWGHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
if (worker->error_type == QNetworkReply::NoError) {
msg = QString("Success! %1 bytes").arg(worker->response.length());
}
else {
msg = "Error: " + worker->error_str;
}
QString json(worker->response);
SWGFeatureSet* output = static_cast<SWGFeatureSet*>(create(json, QString("SWGFeatureSet")));
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit featuresetGetSignal(output);
} else {
emit featuresetGetSignalE(output, error_type, error_str);
emit featuresetGetSignalEFull(worker, error_type, error_str);
}
}
}

View File

@ -0,0 +1,107 @@
/**
* SDRangel
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
*
* OpenAPI spec version: 4.15.0
* Contact: f4exb06@gmail.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
#ifndef _SWG_SWGFeatureSetApi_H_
#define _SWG_SWGFeatureSetApi_H_
#include "SWGHttpRequest.h"
#include "SWGDeviceState.h"
#include "SWGErrorResponse.h"
#include "SWGFeatureActions.h"
#include "SWGFeatureReport.h"
#include "SWGFeatureSet.h"
#include "SWGFeatureSettings.h"
#include "SWGSuccessResponse.h"
#include <QObject>
namespace SWGSDRangel {
class SWGFeatureSetApi: public QObject {
Q_OBJECT
public:
SWGFeatureSetApi();
SWGFeatureSetApi(QString host, QString basePath);
~SWGFeatureSetApi();
QString host;
QString basePath;
QMap<QString, QString> defaultHeaders;
void featuresetFEatureSettingsPut(qint32 feature_set_index, qint32 feature_index, SWGFeatureSettings& body);
void featuresetFeatureActionsPost(qint32 feature_set_index, qint32 feature_index, SWGFeatureActions& body);
void featuresetFeatureDelete(qint32 feature_set_index, qint32 feature_index);
void featuresetFeaturePost(qint32 feature_set_index, SWGFeatureSettings& body);
void featuresetFeatureReportGet(qint32 feature_set_index, qint32 feature_index);
void featuresetFeatureRunDelete(qint32 feature_set_index, qint32 feature_index);
void featuresetFeatureRunGet(qint32 feature_set_index, qint32 feature_index);
void featuresetFeatureRunPost(qint32 feature_set_index, qint32 feature_index);
void featuresetFeatureSettingsGet(qint32 feature_set_index, qint32 feature_index);
void featuresetFeatureSettingsPatch(qint32 feature_set_index, qint32 feature_index, SWGFeatureSettings& body);
void featuresetGet(qint32 feature_set_index);
private:
void featuresetFEatureSettingsPutCallback (SWGHttpRequestWorker * worker);
void featuresetFeatureActionsPostCallback (SWGHttpRequestWorker * worker);
void featuresetFeatureDeleteCallback (SWGHttpRequestWorker * worker);
void featuresetFeaturePostCallback (SWGHttpRequestWorker * worker);
void featuresetFeatureReportGetCallback (SWGHttpRequestWorker * worker);
void featuresetFeatureRunDeleteCallback (SWGHttpRequestWorker * worker);
void featuresetFeatureRunGetCallback (SWGHttpRequestWorker * worker);
void featuresetFeatureRunPostCallback (SWGHttpRequestWorker * worker);
void featuresetFeatureSettingsGetCallback (SWGHttpRequestWorker * worker);
void featuresetFeatureSettingsPatchCallback (SWGHttpRequestWorker * worker);
void featuresetGetCallback (SWGHttpRequestWorker * worker);
signals:
void featuresetFEatureSettingsPutSignal(SWGFeatureSettings* summary);
void featuresetFeatureActionsPostSignal(SWGSuccessResponse* summary);
void featuresetFeatureDeleteSignal(SWGFeatureSettings* summary);
void featuresetFeaturePostSignal(SWGSuccessResponse* summary);
void featuresetFeatureReportGetSignal(SWGFeatureReport* summary);
void featuresetFeatureRunDeleteSignal(SWGDeviceState* summary);
void featuresetFeatureRunGetSignal(SWGDeviceState* summary);
void featuresetFeatureRunPostSignal(SWGDeviceState* summary);
void featuresetFeatureSettingsGetSignal(SWGFeatureSettings* summary);
void featuresetFeatureSettingsPatchSignal(SWGFeatureSettings* summary);
void featuresetGetSignal(SWGFeatureSet* summary);
void featuresetFEatureSettingsPutSignalE(SWGFeatureSettings* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureActionsPostSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureDeleteSignalE(SWGFeatureSettings* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeaturePostSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureReportGetSignalE(SWGFeatureReport* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureRunDeleteSignalE(SWGDeviceState* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureRunGetSignalE(SWGDeviceState* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureRunPostSignalE(SWGDeviceState* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureSettingsGetSignalE(SWGFeatureSettings* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureSettingsPatchSignalE(SWGFeatureSettings* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetGetSignalE(SWGFeatureSet* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFEatureSettingsPutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureActionsPostSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureDeleteSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeaturePostSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureReportGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureRunDeleteSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureRunGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureRunPostSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureSettingsGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetFeatureSettingsPatchSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void featuresetGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
};
}
#endif

View File

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

View File

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

View File

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

View File

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

View File

@ -1056,6 +1056,58 @@ SWGInstanceApi::instanceDevicesCallback(SWGHttpRequestWorker * worker) {
}
}
void
SWGInstanceApi::instanceFeatureSetsGet() {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/featuresets");
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
SWGHttpRequestInput input(fullPath, "GET");
foreach(QString key, this->defaultHeaders.keys()) {
input.headers.insert(key, this->defaultHeaders.value(key));
}
connect(worker,
&SWGHttpRequestWorker::on_execution_finished,
this,
&SWGInstanceApi::instanceFeatureSetsGetCallback);
worker->execute(&input);
}
void
SWGInstanceApi::instanceFeatureSetsGetCallback(SWGHttpRequestWorker * worker) {
QString msg;
QString error_str = worker->error_str;
QNetworkReply::NetworkError error_type = worker->error_type;
if (worker->error_type == QNetworkReply::NoError) {
msg = QString("Success! %1 bytes").arg(worker->response.length());
}
else {
msg = "Error: " + worker->error_str;
}
QString json(worker->response);
SWGFeatureSetList* output = static_cast<SWGFeatureSetList*>(create(json, QString("SWGFeatureSetList")));
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit instanceFeatureSetsGetSignal(output);
} else {
emit instanceFeatureSetsGetSignalE(output, error_type, error_str);
emit instanceFeatureSetsGetSignalEFull(worker, error_type, error_str);
}
}
void
SWGInstanceApi::instanceLimeRFEConfigGet(QString* serial) {
QString fullPath;

View File

@ -23,6 +23,7 @@
#include "SWGDVSerialDevices.h"
#include "SWGDeviceSetList.h"
#include "SWGErrorResponse.h"
#include "SWGFeatureSetList.h"
#include "SWGInstanceChannelsResponse.h"
#include "SWGInstanceConfigResponse.h"
#include "SWGInstanceDevicesResponse.h"
@ -74,6 +75,7 @@ public:
void instanceDelete();
void instanceDeviceSetsGet();
void instanceDevices(qint32 direction);
void instanceFeatureSetsGet();
void instanceLimeRFEConfigGet(QString* serial);
void instanceLimeRFEConfigPut(SWGLimeRFESettings& body);
void instanceLimeRFEPowerGet(QString* serial);
@ -112,6 +114,7 @@ private:
void instanceDeleteCallback (SWGHttpRequestWorker * worker);
void instanceDeviceSetsGetCallback (SWGHttpRequestWorker * worker);
void instanceDevicesCallback (SWGHttpRequestWorker * worker);
void instanceFeatureSetsGetCallback (SWGHttpRequestWorker * worker);
void instanceLimeRFEConfigGetCallback (SWGHttpRequestWorker * worker);
void instanceLimeRFEConfigPutCallback (SWGHttpRequestWorker * worker);
void instanceLimeRFEPowerGetCallback (SWGHttpRequestWorker * worker);
@ -150,6 +153,7 @@ signals:
void instanceDeleteSignal(SWGInstanceSummaryResponse* summary);
void instanceDeviceSetsGetSignal(SWGDeviceSetList* summary);
void instanceDevicesSignal(SWGInstanceDevicesResponse* summary);
void instanceFeatureSetsGetSignal(SWGFeatureSetList* summary);
void instanceLimeRFEConfigGetSignal(SWGLimeRFESettings* summary);
void instanceLimeRFEConfigPutSignal(SWGSuccessResponse* summary);
void instanceLimeRFEPowerGetSignal(SWGLimeRFEPower* summary);
@ -187,6 +191,7 @@ signals:
void instanceDeleteSignalE(SWGInstanceSummaryResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceDeviceSetsGetSignalE(SWGDeviceSetList* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceDevicesSignalE(SWGInstanceDevicesResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceFeatureSetsGetSignalE(SWGFeatureSetList* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceLimeRFEConfigGetSignalE(SWGLimeRFESettings* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceLimeRFEConfigPutSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceLimeRFEPowerGetSignalE(SWGLimeRFEPower* summary, QNetworkReply::NetworkError error_type, QString& error_str);
@ -224,6 +229,7 @@ signals:
void instanceDeleteSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceDeviceSetsGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceDevicesSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceFeatureSetsGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceLimeRFEConfigGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceLimeRFEConfigPutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceLimeRFEPowerGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);

View File

@ -23,24 +23,18 @@
#include "SWGATVDemodSettings.h"
#include "SWGATVModReport.h"
#include "SWGATVModSettings.h"
#include "SWGAirspyHFReport.h"
#include "SWGAirspyHFSettings.h"
#include "SWGAirspyReport.h"
#include "SWGAirspySettings.h"
#include "SWGArgInfo.h"
#include "SWGArgValue.h"
#include "SWGAudioDevices.h"
#include "SWGAudioInputDevice.h"
#include "SWGAudioOutputDevice.h"
#include "SWGBFMDemodReport.h"
#include "SWGBFMDemodSettings.h"
#include "SWGBandwidth.h"
#include "SWGBladeRF1InputSettings.h"
#include "SWGBladeRF1OutputSettings.h"
#include "SWGBladeRF2InputReport.h"
#include "SWGBladeRF2InputSettings.h"
#include "SWGBladeRF2MIMOSettings.h"
#include "SWGBladeRF2OutputReport.h"
#include "SWGBladeRF2OutputSettings.h"
#include "SWGCWKeyerSettings.h"
#include "SWGChannel.h"
@ -61,7 +55,6 @@
#include "SWGDeviceActions.h"
#include "SWGDeviceConfig.h"
#include "SWGDeviceListItem.h"
#include "SWGDeviceReport.h"
#include "SWGDeviceSet.h"
#include "SWGDeviceSetList.h"
#include "SWGDeviceSettings.h"
@ -69,7 +62,12 @@
#include "SWGErrorResponse.h"
#include "SWGFCDProPlusSettings.h"
#include "SWGFCDProSettings.h"
#include "SWGFileInputReport.h"
#include "SWGFeature.h"
#include "SWGFeatureActions.h"
#include "SWGFeatureReport.h"
#include "SWGFeatureSet.h"
#include "SWGFeatureSetList.h"
#include "SWGFeatureSettings.h"
#include "SWGFileInputSettings.h"
#include "SWGFileSinkActions.h"
#include "SWGFileSinkReport.h"
@ -83,31 +81,22 @@
#include "SWGFreeDVModSettings.h"
#include "SWGFreqTrackerReport.h"
#include "SWGFreqTrackerSettings.h"
#include "SWGFrequency.h"
#include "SWGFrequencyBand.h"
#include "SWGFrequencyRange.h"
#include "SWGGLScope.h"
#include "SWGGLSpectrum.h"
#include "SWGGain.h"
#include "SWGHackRFInputSettings.h"
#include "SWGHackRFOutputSettings.h"
#include "SWGInstanceChannelsResponse.h"
#include "SWGInstanceConfigResponse.h"
#include "SWGInstanceDevicesResponse.h"
#include "SWGInstanceSummaryResponse.h"
#include "SWGKiwiSDRReport.h"
#include "SWGKiwiSDRSettings.h"
#include "SWGLimeRFEDevice.h"
#include "SWGLimeRFEDevices.h"
#include "SWGLimeRFEPower.h"
#include "SWGLimeRFESettings.h"
#include "SWGLimeSdrInputReport.h"
#include "SWGLimeSdrInputSettings.h"
#include "SWGLimeSdrOutputReport.h"
#include "SWGLimeSdrOutputSettings.h"
#include "SWGLocalInputReport.h"
#include "SWGLocalInputSettings.h"
#include "SWGLocalOutputReport.h"
#include "SWGLocalOutputSettings.h"
#include "SWGLocalSinkSettings.h"
#include "SWGLocalSourceSettings.h"
@ -117,16 +106,12 @@
#include "SWGNFMDemodSettings.h"
#include "SWGNFMModReport.h"
#include "SWGNFMModSettings.h"
#include "SWGNamedEnum.h"
#include "SWGPacketModActions.h"
#include "SWGPacketModActions_tx.h"
#include "SWGPacketModReport.h"
#include "SWGPacketModSettings.h"
#include "SWGPerseusReport.h"
#include "SWGPerseusSettings.h"
#include "SWGPlutoSdrInputReport.h"
#include "SWGPlutoSdrInputSettings.h"
#include "SWGPlutoSdrOutputReport.h"
#include "SWGPlutoSdrOutputSettings.h"
#include "SWGPreferences.h"
#include "SWGPreset.h"
@ -139,30 +124,23 @@
#include "SWGPresets.h"
#include "SWGRDSReport.h"
#include "SWGRDSReport_altFrequencies.h"
#include "SWGRange.h"
#include "SWGRangeFloat.h"
#include "SWGRemoteInputReport.h"
#include "SWGRemoteInputSettings.h"
#include "SWGRemoteOutputReport.h"
#include "SWGRemoteOutputSettings.h"
#include "SWGRemoteSinkSettings.h"
#include "SWGRemoteSourceReport.h"
#include "SWGRemoteSourceSettings.h"
#include "SWGRtlSdrReport.h"
#include "SWGRtlSdrSettings.h"
#include "SWGSDRPlayReport.h"
#include "SWGSDRPlaySettings.h"
#include "SWGSSBDemodReport.h"
#include "SWGSSBDemodSettings.h"
#include "SWGSSBModReport.h"
#include "SWGSSBModSettings.h"
#include "SWGSampleRate.h"
#include "SWGSamplingDevice.h"
#include "SWGSoapySDRFrequencySetting.h"
#include "SWGSoapySDRGainSetting.h"
#include "SWGSimplePTTActions.h"
#include "SWGSimplePTTReport.h"
#include "SWGSimplePTTSettings.h"
#include "SWGSoapySDRInputSettings.h"
#include "SWGSoapySDROutputSettings.h"
#include "SWGSoapySDRReport.h"
#include "SWGSuccessResponse.h"
#include "SWGTestSourceSettings.h"
#include "SWGTraceData.h"
@ -175,9 +153,7 @@
#include "SWGWFMDemodSettings.h"
#include "SWGWFMModReport.h"
#include "SWGWFMModSettings.h"
#include "SWGXtrxInputReport.h"
#include "SWGXtrxInputSettings.h"
#include "SWGXtrxOutputReport.h"
#include "SWGXtrxOutputSettings.h"
namespace SWGSDRangel {
@ -210,21 +186,12 @@ namespace SWGSDRangel {
if(QString("SWGATVModSettings").compare(type) == 0) {
return new SWGATVModSettings();
}
if(QString("SWGAirspyHFReport").compare(type) == 0) {
return new SWGAirspyHFReport();
}
if(QString("SWGAirspyHFSettings").compare(type) == 0) {
return new SWGAirspyHFSettings();
}
if(QString("SWGAirspyReport").compare(type) == 0) {
return new SWGAirspyReport();
}
if(QString("SWGAirspySettings").compare(type) == 0) {
return new SWGAirspySettings();
}
if(QString("SWGArgInfo").compare(type) == 0) {
return new SWGArgInfo();
}
if(QString("SWGArgValue").compare(type) == 0) {
return new SWGArgValue();
}
@ -243,27 +210,18 @@ namespace SWGSDRangel {
if(QString("SWGBFMDemodSettings").compare(type) == 0) {
return new SWGBFMDemodSettings();
}
if(QString("SWGBandwidth").compare(type) == 0) {
return new SWGBandwidth();
}
if(QString("SWGBladeRF1InputSettings").compare(type) == 0) {
return new SWGBladeRF1InputSettings();
}
if(QString("SWGBladeRF1OutputSettings").compare(type) == 0) {
return new SWGBladeRF1OutputSettings();
}
if(QString("SWGBladeRF2InputReport").compare(type) == 0) {
return new SWGBladeRF2InputReport();
}
if(QString("SWGBladeRF2InputSettings").compare(type) == 0) {
return new SWGBladeRF2InputSettings();
}
if(QString("SWGBladeRF2MIMOSettings").compare(type) == 0) {
return new SWGBladeRF2MIMOSettings();
}
if(QString("SWGBladeRF2OutputReport").compare(type) == 0) {
return new SWGBladeRF2OutputReport();
}
if(QString("SWGBladeRF2OutputSettings").compare(type) == 0) {
return new SWGBladeRF2OutputSettings();
}
@ -324,9 +282,6 @@ namespace SWGSDRangel {
if(QString("SWGDeviceListItem").compare(type) == 0) {
return new SWGDeviceListItem();
}
if(QString("SWGDeviceReport").compare(type) == 0) {
return new SWGDeviceReport();
}
if(QString("SWGDeviceSet").compare(type) == 0) {
return new SWGDeviceSet();
}
@ -348,8 +303,23 @@ namespace SWGSDRangel {
if(QString("SWGFCDProSettings").compare(type) == 0) {
return new SWGFCDProSettings();
}
if(QString("SWGFileInputReport").compare(type) == 0) {
return new SWGFileInputReport();
if(QString("SWGFeature").compare(type) == 0) {
return new SWGFeature();
}
if(QString("SWGFeatureActions").compare(type) == 0) {
return new SWGFeatureActions();
}
if(QString("SWGFeatureReport").compare(type) == 0) {
return new SWGFeatureReport();
}
if(QString("SWGFeatureSet").compare(type) == 0) {
return new SWGFeatureSet();
}
if(QString("SWGFeatureSetList").compare(type) == 0) {
return new SWGFeatureSetList();
}
if(QString("SWGFeatureSettings").compare(type) == 0) {
return new SWGFeatureSettings();
}
if(QString("SWGFileInputSettings").compare(type) == 0) {
return new SWGFileInputSettings();
@ -390,24 +360,12 @@ namespace SWGSDRangel {
if(QString("SWGFreqTrackerSettings").compare(type) == 0) {
return new SWGFreqTrackerSettings();
}
if(QString("SWGFrequency").compare(type) == 0) {
return new SWGFrequency();
}
if(QString("SWGFrequencyBand").compare(type) == 0) {
return new SWGFrequencyBand();
}
if(QString("SWGFrequencyRange").compare(type) == 0) {
return new SWGFrequencyRange();
}
if(QString("SWGGLScope").compare(type) == 0) {
return new SWGGLScope();
}
if(QString("SWGGLSpectrum").compare(type) == 0) {
return new SWGGLSpectrum();
}
if(QString("SWGGain").compare(type) == 0) {
return new SWGGain();
}
if(QString("SWGHackRFInputSettings").compare(type) == 0) {
return new SWGHackRFInputSettings();
}
@ -426,9 +384,6 @@ namespace SWGSDRangel {
if(QString("SWGInstanceSummaryResponse").compare(type) == 0) {
return new SWGInstanceSummaryResponse();
}
if(QString("SWGKiwiSDRReport").compare(type) == 0) {
return new SWGKiwiSDRReport();
}
if(QString("SWGKiwiSDRSettings").compare(type) == 0) {
return new SWGKiwiSDRSettings();
}
@ -444,27 +399,15 @@ namespace SWGSDRangel {
if(QString("SWGLimeRFESettings").compare(type) == 0) {
return new SWGLimeRFESettings();
}
if(QString("SWGLimeSdrInputReport").compare(type) == 0) {
return new SWGLimeSdrInputReport();
}
if(QString("SWGLimeSdrInputSettings").compare(type) == 0) {
return new SWGLimeSdrInputSettings();
}
if(QString("SWGLimeSdrOutputReport").compare(type) == 0) {
return new SWGLimeSdrOutputReport();
}
if(QString("SWGLimeSdrOutputSettings").compare(type) == 0) {
return new SWGLimeSdrOutputSettings();
}
if(QString("SWGLocalInputReport").compare(type) == 0) {
return new SWGLocalInputReport();
}
if(QString("SWGLocalInputSettings").compare(type) == 0) {
return new SWGLocalInputSettings();
}
if(QString("SWGLocalOutputReport").compare(type) == 0) {
return new SWGLocalOutputReport();
}
if(QString("SWGLocalOutputSettings").compare(type) == 0) {
return new SWGLocalOutputSettings();
}
@ -492,9 +435,6 @@ namespace SWGSDRangel {
if(QString("SWGNFMModSettings").compare(type) == 0) {
return new SWGNFMModSettings();
}
if(QString("SWGNamedEnum").compare(type) == 0) {
return new SWGNamedEnum();
}
if(QString("SWGPacketModActions").compare(type) == 0) {
return new SWGPacketModActions();
}
@ -507,21 +447,12 @@ namespace SWGSDRangel {
if(QString("SWGPacketModSettings").compare(type) == 0) {
return new SWGPacketModSettings();
}
if(QString("SWGPerseusReport").compare(type) == 0) {
return new SWGPerseusReport();
}
if(QString("SWGPerseusSettings").compare(type) == 0) {
return new SWGPerseusSettings();
}
if(QString("SWGPlutoSdrInputReport").compare(type) == 0) {
return new SWGPlutoSdrInputReport();
}
if(QString("SWGPlutoSdrInputSettings").compare(type) == 0) {
return new SWGPlutoSdrInputSettings();
}
if(QString("SWGPlutoSdrOutputReport").compare(type) == 0) {
return new SWGPlutoSdrOutputReport();
}
if(QString("SWGPlutoSdrOutputSettings").compare(type) == 0) {
return new SWGPlutoSdrOutputSettings();
}
@ -558,21 +489,9 @@ namespace SWGSDRangel {
if(QString("SWGRDSReport_altFrequencies").compare(type) == 0) {
return new SWGRDSReport_altFrequencies();
}
if(QString("SWGRange").compare(type) == 0) {
return new SWGRange();
}
if(QString("SWGRangeFloat").compare(type) == 0) {
return new SWGRangeFloat();
}
if(QString("SWGRemoteInputReport").compare(type) == 0) {
return new SWGRemoteInputReport();
}
if(QString("SWGRemoteInputSettings").compare(type) == 0) {
return new SWGRemoteInputSettings();
}
if(QString("SWGRemoteOutputReport").compare(type) == 0) {
return new SWGRemoteOutputReport();
}
if(QString("SWGRemoteOutputSettings").compare(type) == 0) {
return new SWGRemoteOutputSettings();
}
@ -585,15 +504,9 @@ namespace SWGSDRangel {
if(QString("SWGRemoteSourceSettings").compare(type) == 0) {
return new SWGRemoteSourceSettings();
}
if(QString("SWGRtlSdrReport").compare(type) == 0) {
return new SWGRtlSdrReport();
}
if(QString("SWGRtlSdrSettings").compare(type) == 0) {
return new SWGRtlSdrSettings();
}
if(QString("SWGSDRPlayReport").compare(type) == 0) {
return new SWGSDRPlayReport();
}
if(QString("SWGSDRPlaySettings").compare(type) == 0) {
return new SWGSDRPlaySettings();
}
@ -609,17 +522,17 @@ namespace SWGSDRangel {
if(QString("SWGSSBModSettings").compare(type) == 0) {
return new SWGSSBModSettings();
}
if(QString("SWGSampleRate").compare(type) == 0) {
return new SWGSampleRate();
}
if(QString("SWGSamplingDevice").compare(type) == 0) {
return new SWGSamplingDevice();
}
if(QString("SWGSoapySDRFrequencySetting").compare(type) == 0) {
return new SWGSoapySDRFrequencySetting();
if(QString("SWGSimplePTTActions").compare(type) == 0) {
return new SWGSimplePTTActions();
}
if(QString("SWGSoapySDRGainSetting").compare(type) == 0) {
return new SWGSoapySDRGainSetting();
if(QString("SWGSimplePTTReport").compare(type) == 0) {
return new SWGSimplePTTReport();
}
if(QString("SWGSimplePTTSettings").compare(type) == 0) {
return new SWGSimplePTTSettings();
}
if(QString("SWGSoapySDRInputSettings").compare(type) == 0) {
return new SWGSoapySDRInputSettings();
@ -627,9 +540,6 @@ namespace SWGSDRangel {
if(QString("SWGSoapySDROutputSettings").compare(type) == 0) {
return new SWGSoapySDROutputSettings();
}
if(QString("SWGSoapySDRReport").compare(type) == 0) {
return new SWGSoapySDRReport();
}
if(QString("SWGSuccessResponse").compare(type) == 0) {
return new SWGSuccessResponse();
}
@ -666,15 +576,9 @@ namespace SWGSDRangel {
if(QString("SWGWFMModSettings").compare(type) == 0) {
return new SWGWFMModSettings();
}
if(QString("SWGXtrxInputReport").compare(type) == 0) {
return new SWGXtrxInputReport();
}
if(QString("SWGXtrxInputSettings").compare(type) == 0) {
return new SWGXtrxInputSettings();
}
if(QString("SWGXtrxOutputReport").compare(type) == 0) {
return new SWGXtrxOutputReport();
}
if(QString("SWGXtrxOutputSettings").compare(type) == 0) {
return new SWGXtrxOutputSettings();
}

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,342 @@
/**
* SDRangel
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
*
* OpenAPI spec version: 4.15.0
* Contact: f4exb06@gmail.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
#include "SWGSimplePTTSettings.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGSimplePTTSettings::SWGSimplePTTSettings(QString* json) {
init();
this->fromJson(*json);
}
SWGSimplePTTSettings::SWGSimplePTTSettings() {
title = nullptr;
m_title_isSet = false;
rgb_color = 0;
m_rgb_color_isSet = false;
rx_device_set_index = 0;
m_rx_device_set_index_isSet = false;
tx_device_set_index = 0;
m_tx_device_set_index_isSet = false;
rx2_tx_delay_ms = 0;
m_rx2_tx_delay_ms_isSet = false;
tx2_rx_delay_ms = 0;
m_tx2_rx_delay_ms_isSet = false;
use_reverse_api = 0;
m_use_reverse_api_isSet = false;
reverse_api_address = nullptr;
m_reverse_api_address_isSet = false;
reverse_api_port = 0;
m_reverse_api_port_isSet = false;
reverse_api_device_index = 0;
m_reverse_api_device_index_isSet = false;
reverse_api_channel_index = 0;
m_reverse_api_channel_index_isSet = false;
}
SWGSimplePTTSettings::~SWGSimplePTTSettings() {
this->cleanup();
}
void
SWGSimplePTTSettings::init() {
title = new QString("");
m_title_isSet = false;
rgb_color = 0;
m_rgb_color_isSet = false;
rx_device_set_index = 0;
m_rx_device_set_index_isSet = false;
tx_device_set_index = 0;
m_tx_device_set_index_isSet = false;
rx2_tx_delay_ms = 0;
m_rx2_tx_delay_ms_isSet = false;
tx2_rx_delay_ms = 0;
m_tx2_rx_delay_ms_isSet = false;
use_reverse_api = 0;
m_use_reverse_api_isSet = false;
reverse_api_address = new QString("");
m_reverse_api_address_isSet = false;
reverse_api_port = 0;
m_reverse_api_port_isSet = false;
reverse_api_device_index = 0;
m_reverse_api_device_index_isSet = false;
reverse_api_channel_index = 0;
m_reverse_api_channel_index_isSet = false;
}
void
SWGSimplePTTSettings::cleanup() {
if(title != nullptr) {
delete title;
}
if(reverse_api_address != nullptr) {
delete reverse_api_address;
}
}
SWGSimplePTTSettings*
SWGSimplePTTSettings::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGSimplePTTSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString");
::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", "");
::SWGSDRangel::setValue(&rx_device_set_index, pJson["rxDeviceSetIndex"], "qint32", "");
::SWGSDRangel::setValue(&tx_device_set_index, pJson["txDeviceSetIndex"], "qint32", "");
::SWGSDRangel::setValue(&rx2_tx_delay_ms, pJson["rx2TxDelayMs"], "qint32", "");
::SWGSDRangel::setValue(&tx2_rx_delay_ms, pJson["tx2RxDelayMs"], "qint32", "");
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_address, pJson["reverseAPIAddress"], "QString", "QString");
::SWGSDRangel::setValue(&reverse_api_port, pJson["reverseAPIPort"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_device_index, pJson["reverseAPIDeviceIndex"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_channel_index, pJson["reverseAPIChannelIndex"], "qint32", "");
}
QString
SWGSimplePTTSettings::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGSimplePTTSettings::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(title != nullptr && *title != QString("")){
toJsonValue(QString("title"), title, obj, QString("QString"));
}
if(m_rgb_color_isSet){
obj->insert("rgbColor", QJsonValue(rgb_color));
}
if(m_rx_device_set_index_isSet){
obj->insert("rxDeviceSetIndex", QJsonValue(rx_device_set_index));
}
if(m_tx_device_set_index_isSet){
obj->insert("txDeviceSetIndex", QJsonValue(tx_device_set_index));
}
if(m_rx2_tx_delay_ms_isSet){
obj->insert("rx2TxDelayMs", QJsonValue(rx2_tx_delay_ms));
}
if(m_tx2_rx_delay_ms_isSet){
obj->insert("tx2RxDelayMs", QJsonValue(tx2_rx_delay_ms));
}
if(m_use_reverse_api_isSet){
obj->insert("useReverseAPI", QJsonValue(use_reverse_api));
}
if(reverse_api_address != nullptr && *reverse_api_address != QString("")){
toJsonValue(QString("reverseAPIAddress"), reverse_api_address, obj, QString("QString"));
}
if(m_reverse_api_port_isSet){
obj->insert("reverseAPIPort", QJsonValue(reverse_api_port));
}
if(m_reverse_api_device_index_isSet){
obj->insert("reverseAPIDeviceIndex", QJsonValue(reverse_api_device_index));
}
if(m_reverse_api_channel_index_isSet){
obj->insert("reverseAPIChannelIndex", QJsonValue(reverse_api_channel_index));
}
return obj;
}
QString*
SWGSimplePTTSettings::getTitle() {
return title;
}
void
SWGSimplePTTSettings::setTitle(QString* title) {
this->title = title;
this->m_title_isSet = true;
}
qint32
SWGSimplePTTSettings::getRgbColor() {
return rgb_color;
}
void
SWGSimplePTTSettings::setRgbColor(qint32 rgb_color) {
this->rgb_color = rgb_color;
this->m_rgb_color_isSet = true;
}
qint32
SWGSimplePTTSettings::getRxDeviceSetIndex() {
return rx_device_set_index;
}
void
SWGSimplePTTSettings::setRxDeviceSetIndex(qint32 rx_device_set_index) {
this->rx_device_set_index = rx_device_set_index;
this->m_rx_device_set_index_isSet = true;
}
qint32
SWGSimplePTTSettings::getTxDeviceSetIndex() {
return tx_device_set_index;
}
void
SWGSimplePTTSettings::setTxDeviceSetIndex(qint32 tx_device_set_index) {
this->tx_device_set_index = tx_device_set_index;
this->m_tx_device_set_index_isSet = true;
}
qint32
SWGSimplePTTSettings::getRx2TxDelayMs() {
return rx2_tx_delay_ms;
}
void
SWGSimplePTTSettings::setRx2TxDelayMs(qint32 rx2_tx_delay_ms) {
this->rx2_tx_delay_ms = rx2_tx_delay_ms;
this->m_rx2_tx_delay_ms_isSet = true;
}
qint32
SWGSimplePTTSettings::getTx2RxDelayMs() {
return tx2_rx_delay_ms;
}
void
SWGSimplePTTSettings::setTx2RxDelayMs(qint32 tx2_rx_delay_ms) {
this->tx2_rx_delay_ms = tx2_rx_delay_ms;
this->m_tx2_rx_delay_ms_isSet = true;
}
qint32
SWGSimplePTTSettings::getUseReverseApi() {
return use_reverse_api;
}
void
SWGSimplePTTSettings::setUseReverseApi(qint32 use_reverse_api) {
this->use_reverse_api = use_reverse_api;
this->m_use_reverse_api_isSet = true;
}
QString*
SWGSimplePTTSettings::getReverseApiAddress() {
return reverse_api_address;
}
void
SWGSimplePTTSettings::setReverseApiAddress(QString* reverse_api_address) {
this->reverse_api_address = reverse_api_address;
this->m_reverse_api_address_isSet = true;
}
qint32
SWGSimplePTTSettings::getReverseApiPort() {
return reverse_api_port;
}
void
SWGSimplePTTSettings::setReverseApiPort(qint32 reverse_api_port) {
this->reverse_api_port = reverse_api_port;
this->m_reverse_api_port_isSet = true;
}
qint32
SWGSimplePTTSettings::getReverseApiDeviceIndex() {
return reverse_api_device_index;
}
void
SWGSimplePTTSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) {
this->reverse_api_device_index = reverse_api_device_index;
this->m_reverse_api_device_index_isSet = true;
}
qint32
SWGSimplePTTSettings::getReverseApiChannelIndex() {
return reverse_api_channel_index;
}
void
SWGSimplePTTSettings::setReverseApiChannelIndex(qint32 reverse_api_channel_index) {
this->reverse_api_channel_index = reverse_api_channel_index;
this->m_reverse_api_channel_index_isSet = true;
}
bool
SWGSimplePTTSettings::isSet(){
bool isObjectUpdated = false;
do{
if(title && *title != QString("")){
isObjectUpdated = true; break;
}
if(m_rgb_color_isSet){
isObjectUpdated = true; break;
}
if(m_rx_device_set_index_isSet){
isObjectUpdated = true; break;
}
if(m_tx_device_set_index_isSet){
isObjectUpdated = true; break;
}
if(m_rx2_tx_delay_ms_isSet){
isObjectUpdated = true; break;
}
if(m_tx2_rx_delay_ms_isSet){
isObjectUpdated = true; break;
}
if(m_use_reverse_api_isSet){
isObjectUpdated = true; break;
}
if(reverse_api_address && *reverse_api_address != QString("")){
isObjectUpdated = true; break;
}
if(m_reverse_api_port_isSet){
isObjectUpdated = true; break;
}
if(m_reverse_api_device_index_isSet){
isObjectUpdated = true; break;
}
if(m_reverse_api_channel_index_isSet){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,119 @@
/**
* SDRangel
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
*
* OpenAPI spec version: 4.15.0
* Contact: f4exb06@gmail.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
/*
* SWGSimplePTTSettings.h
*
* Simple PTT settings
*/
#ifndef SWGSimplePTTSettings_H_
#define SWGSimplePTTSettings_H_
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGSimplePTTSettings: public SWGObject {
public:
SWGSimplePTTSettings();
SWGSimplePTTSettings(QString* json);
virtual ~SWGSimplePTTSettings();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGSimplePTTSettings* fromJson(QString &jsonString) override;
QString* getTitle();
void setTitle(QString* title);
qint32 getRgbColor();
void setRgbColor(qint32 rgb_color);
qint32 getRxDeviceSetIndex();
void setRxDeviceSetIndex(qint32 rx_device_set_index);
qint32 getTxDeviceSetIndex();
void setTxDeviceSetIndex(qint32 tx_device_set_index);
qint32 getRx2TxDelayMs();
void setRx2TxDelayMs(qint32 rx2_tx_delay_ms);
qint32 getTx2RxDelayMs();
void setTx2RxDelayMs(qint32 tx2_rx_delay_ms);
qint32 getUseReverseApi();
void setUseReverseApi(qint32 use_reverse_api);
QString* getReverseApiAddress();
void setReverseApiAddress(QString* reverse_api_address);
qint32 getReverseApiPort();
void setReverseApiPort(qint32 reverse_api_port);
qint32 getReverseApiDeviceIndex();
void setReverseApiDeviceIndex(qint32 reverse_api_device_index);
qint32 getReverseApiChannelIndex();
void setReverseApiChannelIndex(qint32 reverse_api_channel_index);
virtual bool isSet() override;
private:
QString* title;
bool m_title_isSet;
qint32 rgb_color;
bool m_rgb_color_isSet;
qint32 rx_device_set_index;
bool m_rx_device_set_index_isSet;
qint32 tx_device_set_index;
bool m_tx_device_set_index_isSet;
qint32 rx2_tx_delay_ms;
bool m_rx2_tx_delay_ms_isSet;
qint32 tx2_rx_delay_ms;
bool m_tx2_rx_delay_ms_isSet;
qint32 use_reverse_api;
bool m_use_reverse_api_isSet;
QString* reverse_api_address;
bool m_reverse_api_address_isSet;
qint32 reverse_api_port;
bool m_reverse_api_port_isSet;
qint32 reverse_api_device_index;
bool m_reverse_api_device_index_isSet;
qint32 reverse_api_channel_index;
bool m_reverse_api_channel_index_isSet;
};
}
#endif /* SWGSimplePTTSettings_H_ */