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

REST API: removed invert field from GLSpectrumSettings and added /sdrangel/deviceset/{deviceSetIndex}/spectrum/settings and /sdrangel/deviceset/{deviceSetIndex}/spectrum/server end points

This commit is contained in:
f4exb 2020-05-05 11:35:36 +02:00
parent 0ef75bee82
commit de995b1dd8
4 changed files with 376 additions and 6 deletions

View File

@ -31,9 +31,6 @@ GLSpectrum:
displayGrid:
description: boolean
type: integer
invert:
description: boolean
type: integer
displayGridIntensity:
type: integer
decayDivisor:

View File

@ -999,6 +999,178 @@ paths:
"501":
$ref: "#/responses/Response_501"
/sdrangel/deviceset/{deviceSetIndex}/spectrum/settings:
x-swagger-router-controller: deviceset
get:
description: Get main spectrum settings
operationId: devicesetSpectrumSettingsGet
tags:
- DeviceSet
parameters:
- in: path
name: deviceSetIndex
type: integer
required: true
description: Index of device set in the device set list
responses:
"200":
description: On success return details on the main spectrum
schema:
$ref: "http://localhost:8081/api/swagger/include/GLSpectrum.yaml#/GLSpectrum"
"404":
description: Invalid index
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
put:
description: Apply main spectrun settings unconditionnaly (force)
operationId: devicesetSpectrumSettingsPut
tags:
- DeviceSet
parameters:
- in: path
name: deviceSetIndex
type: integer
required: true
description: Index of device set in the device set list
- name: body
in: body
description: Spectrum settings to apply
required: true
schema:
$ref: "http://localhost:8081/api/swagger/include/GLSpectrum.yaml#/GLSpectrum"
responses:
"200":
description: On success returns new settings values
schema:
$ref: "http://localhost:8081/api/swagger/include/GLSpectrum.yaml#/GLSpectrum"
"404":
description: Invalid device set index or device not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
patch:
description: Apply main spectrun settings differentially (no force)
operationId: devicesetSpectrumSettingsPatch
tags:
- DeviceSet
parameters:
- in: path
name: deviceSetIndex
type: integer
required: true
description: Index of device set in the device set list
- name: body
in: body
description: Spectrum settings to apply
required: true
schema:
$ref: "http://localhost:8081/api/swagger/include/GLSpectrum.yaml#/GLSpectrum"
responses:
"200":
description: On success returns new settings values
schema:
$ref: "http://localhost:8081/api/swagger/include/GLSpectrum.yaml#/GLSpectrum"
"404":
description: Invalid device set index or device not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/deviceset/{deviceSetIndex}/spectrum/server:
x-swagger-router-controller: deviceset
get:
description: Get main spectrum websocket server status
operationId: devicesetSpectrumServerGet
tags:
- DeviceSet
parameters:
- in: path
name: deviceSetIndex
type: integer
required: true
description: Index of device set in the device set list
responses:
"200":
description: On success return main spectrum server status
schema:
$ref: "#/definitions/SpectrumServer"
"404":
description: Invalid index
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
post:
description: Start main spectrum websocket server
operationId: devicesetSpectrumServerPost
tags:
- DeviceSet
parameters:
- in: path
name: deviceSetIndex
type: integer
required: true
description: Index of device set in the device set list
responses:
"200":
description: Server successfully started
schema:
$ref: "#/definitions/SuccessResponse"
"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"
delete:
description: Stop main spectrum websocket server
operationId: devicesetSpectrumServerDelete
tags:
- DeviceSet
parameters:
- in: path
name: deviceSetIndex
type: integer
required: true
description: Index of device set in the device set list
responses:
"200":
description: Server successfully stopped
schema:
$ref: "#/definitions/SuccessResponse"
"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/deviceset/{deviceSetIndex}/device:
x-swagger-router-controller: deviceset
put:
@ -2355,6 +2527,22 @@ definitions:
type: array
items:
$ref: "#/definitions/FeatureSet"
SpectrumServer:
description: "Spectrum server state"
properties:
run:
description: "Boolean: 1: websocket spectrum server running 0: not running"
type: integer
clients:
description: "List of clients"
type: array
items:
type: object
properties:
address:
type: string
port:
type: integer
DeviceState:
description: "Device running state"

View File

@ -31,9 +31,6 @@ GLSpectrum:
displayGrid:
description: boolean
type: integer
invert:
description: boolean
type: integer
displayGridIntensity:
type: integer
decayDivisor:

View File

@ -999,6 +999,178 @@ paths:
"501":
$ref: "#/responses/Response_501"
/sdrangel/deviceset/{deviceSetIndex}/spectrum/settings:
x-swagger-router-controller: deviceset
get:
description: Get main spectrum settings
operationId: devicesetSpectrumSettingsGet
tags:
- DeviceSet
parameters:
- in: path
name: deviceSetIndex
type: integer
required: true
description: Index of device set in the device set list
responses:
"200":
description: On success return details on the main spectrum
schema:
$ref: "http://localhost:8081/api/swagger/include/GLSpectrum.yaml#/GLSpectrum"
"404":
description: Invalid index
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
put:
description: Apply main spectrun settings unconditionnaly (force)
operationId: devicesetSpectrumSettingsPut
tags:
- DeviceSet
parameters:
- in: path
name: deviceSetIndex
type: integer
required: true
description: Index of device set in the device set list
- name: body
in: body
description: Spectrum settings to apply
required: true
schema:
$ref: "http://localhost:8081/api/swagger/include/GLSpectrum.yaml#/GLSpectrum"
responses:
"200":
description: On success returns new settings values
schema:
$ref: "http://localhost:8081/api/swagger/include/GLSpectrum.yaml#/GLSpectrum"
"404":
description: Invalid device set index or device not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
patch:
description: Apply main spectrun settings differentially (no force)
operationId: devicesetSpectrumSettingsPatch
tags:
- DeviceSet
parameters:
- in: path
name: deviceSetIndex
type: integer
required: true
description: Index of device set in the device set list
- name: body
in: body
description: Spectrum settings to apply
required: true
schema:
$ref: "http://localhost:8081/api/swagger/include/GLSpectrum.yaml#/GLSpectrum"
responses:
"200":
description: On success returns new settings values
schema:
$ref: "http://localhost:8081/api/swagger/include/GLSpectrum.yaml#/GLSpectrum"
"404":
description: Invalid device set index or device not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/deviceset/{deviceSetIndex}/spectrum/server:
x-swagger-router-controller: deviceset
get:
description: Get main spectrum websocket server status
operationId: devicesetSpectrumServerGet
tags:
- DeviceSet
parameters:
- in: path
name: deviceSetIndex
type: integer
required: true
description: Index of device set in the device set list
responses:
"200":
description: On success return main spectrum server status
schema:
$ref: "#/definitions/SpectrumServer"
"404":
description: Invalid index
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
post:
description: Start main spectrum websocket server
operationId: devicesetSpectrumServerPost
tags:
- DeviceSet
parameters:
- in: path
name: deviceSetIndex
type: integer
required: true
description: Index of device set in the device set list
responses:
"200":
description: Server successfully started
schema:
$ref: "#/definitions/SuccessResponse"
"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"
delete:
description: Stop main spectrum websocket server
operationId: devicesetSpectrumServerDelete
tags:
- DeviceSet
parameters:
- in: path
name: deviceSetIndex
type: integer
required: true
description: Index of device set in the device set list
responses:
"200":
description: Server successfully stopped
schema:
$ref: "#/definitions/SuccessResponse"
"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/deviceset/{deviceSetIndex}/device:
x-swagger-router-controller: deviceset
put:
@ -2355,6 +2527,22 @@ definitions:
type: array
items:
$ref: "#/definitions/FeatureSet"
SpectrumServer:
description: "Spectrum server state"
properties:
run:
description: "Boolean: 1: websocket spectrum server running 0: not running"
type: integer
clients:
description: "List of clients"
type: array
items:
type: object
properties:
address:
type: string
port:
type: integer
DeviceState:
description: "Device running state"