1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-09-27 15:26:33 -04:00

LimeRFE USB support: Swagger files

This commit is contained in:
f4exb 2020-01-12 01:12:30 +01:00
parent 411aca5d35
commit 95f01c8f10
2 changed files with 174 additions and 0 deletions

View File

@ -0,0 +1,48 @@
LimeRFESettings:
description: LimeRFE
properties:
devicePath:
description: Path to the device serial interface (ex /dev/ttyUSB2)
type: string
rxChannels:
description: Rx channels group (see LimeRFEController.ChannelGroups enumeration)
type: integer
rxWidebandChannel:
descrition: Rx wideband channel selection (see LimeRFEController.WidebandChannel enumeration)
type: integer
rxHAMChannel:
description: Rx HAM channel selection (see LimeRFEController.HAMChannel enumeration)
type: integer
rxCellularChannel:
description: Rx cellular channel selection (see LimeRFEController.HAMChannel enumeration)
type: integer
rxPort:
description: Rx port selected (see LimeRFEController.RxPort enumeration)
type: integer
attenuationFactor:
description: Rx attenuation factor. Attenuation is 2 times this factor in dB (0..7 => 0..14dB)
type: integer
amfmNotch:
desciption: Rx AM/FM notch filter (boolean)
type: integer
txChannels:
description: Tx channels group (see LimeRFEController.ChannelGroups enumeration)
type: integer
txWidebandChannel:
descrition: Tx wideband channel selection (see LimeRFEController.WidebandChannel enumeration)
type: integer
txHAMChannel:
description: Tx HAM channel selection (see LimeRFEController.HAMChannel enumeration)
type: integer
txCellularChannel:
description: Tx cellular channel selection (see LimeRFEController.HAMChannel enumeration)
type: integer
txPort:
description: Tx port selected (see LimeRFEController.TxPort enumeration)
type: integer
rxOn:
description: Boolean 1 if Rx is active else 0
type: integer
txOn:
description: Boolean 1 if Tx is active else 0
type: integer

View File

@ -531,6 +531,111 @@ paths:
"501":
$ref: "#/responses/Response_501"
/sdrangel/limerfe/serial:
x-swagger-router-controller: instance
get:
description: get a list of available serial interfaces to LimeRFE device
operationId: instanceLimeRFESerialGet
tags:
- Instance
responses:
"200":
description: On success return list of device paths possibly empty
schema:
$ref: "#/definitions/LimeRFEDevices"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/limerfe/config:
x-swagger-router-controller: instance
get:
description: get LimeRFE configuration
operationId: instanceLimeRFEConfigGet
tags:
- Instance
consumes:
- application/json
parameters:
- name: serial
in: query
description: device serial path
required: true
type: string
responses:
"200":
description: On success return configuration information for the given device in input
schema:
$ref: "http://localhost:8081/api/swagger/include/LimeRFE.yaml#/LimeRFESettings"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
put:
description: replace LimeRFE configuration
operationId: instanceLimeRFEConfigPut
tags:
- Instance
consumes:
- application/json
parameters:
- name: body
in: body
description: Give device serial path in devicePath field. To switch Rx and/or Tx on or off use the run API.
required: true
schema:
$ref: "http://localhost:8081/api/swagger/include/LimeRFE.yaml#/LimeRFESettings"
responses:
"200":
description: Success
schema:
$ref: "#/definitions/SuccessResponse"
"400":
description: Error
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: LimeRFE device not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/limerfe/run:
x-swagger-router-controller: instance
put:
description: set Rx and Tx on or off
operationId: instanceLimeRFERunPut
tags:
- Instance
parameters:
- name: body
in: body
description: Give device serial path in devicePath field and run status in rxOn and txOn
required: true
schema:
$ref: "http://localhost:8081/api/swagger/include/LimeRFE.yaml#/LimeRFESettings"
responses:
"200":
description: Success
schema:
$ref: "#/definitions/SuccessResponse"
"400":
description: Error
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: LimeRFE device not found
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
"501":
$ref: "#/responses/Response_501"
/sdrangel/presets:
x-swagger-router-controller: instance
get:
@ -1939,6 +2044,27 @@ definitions:
description: "1 if device is to be removed from active list"
type: integer
LimeRFEDevices:
description: "List of LimeRFE devices (serial or server address)"
required:
- nbDevices
properties:
nbDevices:
description: "Number of LimeRFE serial interfaces"
type: integer
limeRFEDevices:
description: "List of LimeRFE devices"
type: array
items:
$ref: "#/definitions/LimeRFEDevice"
LimeRFEDevice:
description: "LimeRFE device active in the system"
properties:
deviceRef:
description: "Serial device name or server address"
type: string
Presets:
description: "Settings presets"
required: