1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-17 16:24:08 -04:00

SigMF file input: REST API

This commit is contained in:
f4exb
2020-11-10 00:36:03 +01:00
parent dc40755324
commit 8a06f73efa
27 changed files with 2371 additions and 13 deletions
+175 -1
View File
@@ -2180,6 +2180,39 @@ margin-bottom: 20px;
"description" : "key modifier for dashes keyboard input. See flags Qt::KeyboardModifiers"
}
}
};
defs.Capture = {
"properties" : {
"tsms" : {
"type" : "integer",
"format" : "int64",
"description" : "Timestamp in milliseconds since epoch of capture start"
},
"centerFrequency" : {
"type" : "integer",
"format" : "int64",
"description" : "Track center frequency in Hz"
},
"sampleRate" : {
"type" : "integer",
"description" : "Track sample rate in S/s"
},
"sampleStart" : {
"type" : "integer",
"format" : "int64",
"description" : "Start of track in nymber of samples"
},
"length" : {
"type" : "integer",
"format" : "int64",
"description" : "Track length in number of samples"
},
"cumulativeTime" : {
"type" : "integer",
"format" : "int64",
"description" : "Time in milliseconds of track start since beginning of record"
}
}
};
defs.Channel = {
"required" : [ "deltaFrequency", "id", "index", "title", "uid" ],
@@ -3258,6 +3291,9 @@ margin-bottom: 20px;
"originatorIndex" : {
"type" : "integer",
"description" : "Optional for reverse API. This is the device set index from where the message comes from."
},
"sigMFFileInputActions" : {
"$ref" : "#/definitions/SigMFFileInputActions"
}
},
"description" : "Base device actions. Only the device actions corresponding to the device specified in the deviceHwType field is or should be present."
@@ -3383,6 +3419,9 @@ margin-bottom: 20px;
"sdrPlayReport" : {
"$ref" : "#/definitions/SDRPlayReport"
},
"sigMFFileInputReport" : {
"$ref" : "#/definitions/SigMFFileInputReport"
},
"soapySDRInputReport" : {
"$ref" : "#/definitions/SoapySDRReport"
},
@@ -3535,6 +3574,9 @@ margin-bottom: 20px;
"sdrPlaySettings" : {
"$ref" : "#/definitions/SDRPlaySettings"
},
"sigMFFileInputSettings" : {
"$ref" : "#/definitions/SigMFFileInputSettings"
},
"soapySDRInputSettings" : {
"$ref" : "#/definitions/SoapySDRInputSettings"
},
@@ -7366,6 +7408,138 @@ margin-bottom: 20px;
}
},
"description" : "Information about a logical device available from an attached hardware device that can be used as a sampling device"
};
defs.SigMFFileInputActions = {
"properties" : {
"playTrack" : {
"type" : "integer",
"description" : "Play IQ stream action\n * 0 - stop playing\n * 1 - start playing current track\n"
},
"playRecord" : {
"type" : "integer",
"description" : "Play IQ stream action\n * 0 - stop playing\n * 1 - start playing\n"
},
"seekTrack" : {
"type" : "integer",
"description" : "Move to beginning of track given its number. Must stop first."
},
"seekTrackMillis" : {
"type" : "integer",
"description" : "Move to this number / 1000 raio in track. Must stop first."
},
"seekRecordMillis" : {
"type" : "integer",
"description" : "Move to this number / 1000 raio in full record. Must stop first."
}
},
"description" : "SigMFFileInput"
};
defs.SigMFFileInputReport = {
"properties" : {
"sampleSize" : {
"type" : "integer",
"description" : "Record sample size in number of bits"
},
"sampleBytes" : {
"type" : "integer",
"description" : "Record sample size in number of bytes"
},
"sampleFormat" : {
"type" : "integer",
"description" : "Sample format * 0 - integer * 1 - float\n"
},
"sampleSigned" : {
"type" : "integer",
"description" : "Sample signed status\n * 0 - unsigned\n * 1 - signed\n"
},
"sampleSwapIQ" : {
"type" : "integer",
"description" : "Sample I/Q swap\n * 0 - I/Q\n * 1 - Q/I\n"
},
"crcStatus" : {
"type" : "integer",
"description" : "CRC status\n * 0 - no CRC available\n * 1 - CRC (SHA512) OK\n * 2 - CRC (SHA512) KO\n"
},
"totalBytesStatus" : {
"type" : "integer",
"description" : "Total number of bytes in data file vs meta data\n * 0 - mismatch\n * 1 - match\n"
},
"captures" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/Capture"
}
},
"trackNumber" : {
"type" : "integer",
"description" : "Current track number"
},
"absoluteTimeMs" : {
"type" : "integer",
"format" : "int64",
"description" : "Absolute current time in milliseconds since epoch"
},
"elapsedRecordTimeMs" : {
"type" : "integer",
"format" : "int64",
"description" : "Elapsed record time in milliseconds"
},
"recordSamplesRatio" : {
"type" : "number",
"format" : "float",
"description" : "Elapsed samples ratio to total samples"
},
"elapsedTrackimeMs" : {
"type" : "integer",
"format" : "int64",
"description" : "Elapsed track time in milliseconds"
},
"trackSamplesRatio" : {
"type" : "number",
"format" : "float",
"description" : "Elapsed samples ratio to track samples"
},
"recordDurationMs" : {
"type" : "integer",
"format" : "int64",
"description" : "Record duration time in milliseconds"
}
},
"description" : "SigMFFileInput"
};
defs.SigMFFileInputSettings = {
"properties" : {
"fileName" : {
"type" : "string",
"description" : "The name (path) of the file being read without extension"
},
"accelerationFactor" : {
"type" : "integer",
"description" : "Playback acceleration (1 if normal speed)"
},
"trackLoop" : {
"type" : "integer",
"description" : "1 if playing track in a loop else 0"
},
"fullLoop" : {
"type" : "integer",
"description" : "1 if playing full file in a loop else 0"
},
"useReverseAPI" : {
"type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
},
"reverseAPIAddress" : {
"type" : "string"
},
"reverseAPIPort" : {
"type" : "integer"
},
"reverseAPIDeviceIndex" : {
"type" : "integer"
}
},
"description" : "SigMFFileInput"
};
defs.SimplePTTActions = {
"properties" : {
@@ -40625,7 +40799,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2020-11-09T22:06:31.158+01:00
Generated 2020-11-10T00:25:24.966+01:00
</div>
</div>
</div>
@@ -0,0 +1,32 @@
AudioInputSettings:
description: AudioInput
properties:
device:
description: The name of the audio device
type: string
devSampleRate:
description: Audio sample rate
type: integer
volume:
type: number
format: float
log2Decim:
description: Decimation factor
type: integer
iqMapping:
type: integer
description: >
Audio channel to IQ mapping
* 0 - I=L, Q=0
* 1 - I=R, Q=0
* 2 - I=L, Q=R
* 3 - I=R, Q=L
useReverseAPI:
description: Synchronize with reverse API (1 for yes, 0 for no)
type: integer
reverseAPIAddress:
type: string
reverseAPIPort:
type: integer
reverseAPIDeviceIndex:
type: integer
@@ -14,3 +14,5 @@ DeviceActions:
originatorIndex:
description: Optional for reverse API. This is the device set index from where the message comes from.
type: integer
sigMFFileInputActions:
$ref: "/doc/swagger/include/SigMFFileInput.yaml#/SigMFFileInputActions"
@@ -45,6 +45,8 @@ DeviceReport:
$ref: "/doc/swagger/include/RemoteInput.yaml#/RemoteInputReport"
sdrPlayReport:
$ref: "/doc/swagger/include/SDRPlay.yaml#/SDRPlayReport"
sigMFFileInputReport:
$ref: "/doc/swagger/include/SigMFFileInput.yaml#/SigMFFileInputReport"
soapySDRInputReport:
$ref: "/doc/swagger/include/SoapySDR.yaml#/SoapySDRReport"
soapySDROutputReport:
@@ -18,6 +18,8 @@ DeviceSettings:
$ref: "/doc/swagger/include/Airspy.yaml#/AirspySettings"
airspyHFSettings:
$ref: "/doc/swagger/include/AirspyHF.yaml#/AirspyHFSettings"
audioInputSettings:
$ref: "/doc/swagger/include/AudioInput.yaml#/AudioInputSettings"
bladeRF1InputSettings:
$ref: "/doc/swagger/include/BladeRF1.yaml#/BladeRF1InputSettings"
bladeRF2InputSettings:
@@ -62,6 +64,8 @@ DeviceSettings:
$ref: "/doc/swagger/include/RemoteInput.yaml#/RemoteInputSettings"
sdrPlaySettings:
$ref: "/doc/swagger/include/SDRPlay.yaml#/SDRPlaySettings"
sigMFFileInputSettings:
$ref: "/doc/swagger/include/SigMFFileInput.yaml#/SigMFFileInputSettings"
soapySDRInputSettings:
$ref: "/doc/swagger/include/SoapySDR.yaml#/SoapySDRInputSettings"
soapySDROutputSettings:
@@ -0,0 +1,150 @@
SigMFFileInputSettings:
description: SigMFFileInput
properties:
fileName:
description: The name (path) of the file being read without extension
type: string
accelerationFactor:
description: Playback acceleration (1 if normal speed)
type: integer
trackLoop:
description: 1 if playing track in a loop else 0
type: integer
fullLoop:
description: 1 if playing full file in a loop else 0
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
SigMFFileInputReport:
description: SigMFFileInput
properties:
sampleSize:
description: Record sample size in number of bits
type: integer
sampleBytes:
description: Record sample size in number of bytes
type: integer
sampleFormat:
type: integer
description: >
Sample format
* 0 - integer
* 1 - float
sampleSigned:
type: integer
description: >
Sample signed status
* 0 - unsigned
* 1 - signed
sampleSwapIQ:
type: integer
description: >
Sample I/Q swap
* 0 - I/Q
* 1 - Q/I
crcStatus:
type: integer
description: >
CRC status
* 0 - no CRC available
* 1 - CRC (SHA512) OK
* 2 - CRC (SHA512) KO
totalBytesStatus:
type: integer
description: >
Total number of bytes in data file vs meta data
* 0 - mismatch
* 1 - match
captures:
type: array
items:
$ref: "#/definitions/Capture"
trackNumber:
description: Current track number
type: integer
absoluteTimeMs:
description: Absolute current time in milliseconds since epoch
type: integer
format: int64
elapsedRecordTimeMs:
description: Elapsed record time in milliseconds
type: integer
format: int64
recordSamplesRatio:
description: Elapsed samples ratio to total samples
type: number
format: float
elapsedTrackimeMs:
description: Elapsed track time in milliseconds
type: integer
format: int64
trackSamplesRatio:
description: Elapsed samples ratio to track samples
type: number
format: float
recordDurationMs:
description: Record duration time in milliseconds
type: integer
format: int64
SigMFFileInputActions:
description: SigMFFileInput
properties:
playTrack:
type: integer
description: >
Play IQ stream action
* 0 - stop playing
* 1 - start playing current track
playRecord:
type: integer
description: >
Play IQ stream action
* 0 - stop playing
* 1 - start playing
seekTrack:
type: integer
description: Move to beginning of track given its number. Must stop first.
seekTrackMillis:
type: integer
description: Move to this number / 1000 raio in track. Must stop first.
seekRecordMillis:
type: integer
description: Move to this number / 1000 raio in full record. Must stop first.
definitions:
Capture:
descripion: Capture (track) information
properties:
tsms:
description: Timestamp in milliseconds since epoch of capture start
type: integer
format: int64
centerFrequency:
description: Track center frequency in Hz
type: integer
format: int64
sampleRate:
description: Track sample rate in S/s
type: integer
sampleStart:
description: Start of track in nymber of samples
type: integer
format: int64
length:
description: Track length in number of samples
type: integer
format: int64
cumulativeTime:
description: Time in milliseconds of track start since beginning of record
type: integer
format: int64