C++ Send IQ Data to the RTSA Suite
Quote from DevSF on 08/04/2021, 14:31The HTTP Server block now has a data Stream output.
It accepts data send via a HTTP post to the sample HTTP endpoint in the same format the sample endpoint provides data with a HTTP get request.
The first implementation of this new feature supports values in JSON Format (values as ASCII String). Surely there is room for speed optimizations.
So, if you need higher data rates, let us know.
Attached is a C++ example based on the QT Framework, which sends IQ data to the RTSA Suite containing a sinus sweep.
The HTTP Server block now has a data Stream output.
It accepts data send via a HTTP post to the sample HTTP endpoint in the same format the sample endpoint provides data with a HTTP get request.
The first implementation of this new feature supports values in JSON Format (values as ASCII String). Surely there is room for speed optimizations.
So, if you need higher data rates, let us know.
Attached is a C++ example based on the QT Framework, which sends IQ data to the RTSA Suite containing a sinus sweep.
Uploaded files:Quote from f4exb on 11/04/2023, 13:51Hello,
I think that in the constructor of SinusSweepToRTSA you have to add:
mNetworkReply = nullptr;else the process will never actually start.
Hello,
I think that in the constructor of SinusSweepToRTSA you have to add:
Quote from DevSF on 18/04/2023, 10:15Hi,
thank you for your feedback.
I updated the C++ example in my first post.
You can also add a Script block to your Mission and run following code to check if the received data stream is continous:
import { DSPStream } from "dspstream.js"
var lastPacketEndTime;
DSPStream.receivePackets(0, function (flags, msg) {
//console.log(JSON.stringify(msg));
if(msg.startTime && msg.endTime){if(lastPacketEndTime == undefined)
;//console.log("Start");
else if ( Math.abs(lastPacketEndTime - msg.startTime) > 1e-6 ){
console.log( "Time Lost" , lastPacketEndTime - msg.startTime );
}lastPacketEndTime = msg.endTime;
}
});
Hi,
thank you for your feedback.
I updated the C++ example in my first post.
You can also add a Script block to your Mission and run following code to check if the received data stream is continous:
import { DSPStream } from "dspstream.js"
var lastPacketEndTime;
DSPStream.receivePackets(0, function (flags, msg) {
//console.log(JSON.stringify(msg));
if(msg.startTime && msg.endTime){if(lastPacketEndTime == undefined)
;//console.log("Start");
else if ( Math.abs(lastPacketEndTime - msg.startTime) > 1e-6 ){
console.log( "Time Lost" , lastPacketEndTime - msg.startTime );
}lastPacketEndTime = msg.endTime;
}
});
Quote from fw_dev on 18/04/2024, 23:07Notable external real-world examples, integrating with the HTTP Server block:
- https://github.com/f4exb/sdrangel/tree/master/plugins/samplesource/aaroniartsainput#readme / https://github.com/f4exb/sdrangel/blob/master/plugins/samplesource/aaroniartsainput/aaroniartsainputworker.cpp
- https://github.com/AlexandreRouma/SDRPlusPlus/blob/master/source_modules/spectran_http_source/src/spectran_http_client.cpp
Notable external real-world examples, integrating with the HTTP Server block:
- https://github.com/f4exb/sdrangel/tree/master/plugins/samplesource/aaroniartsainput#readme / https://github.com/f4exb/sdrangel/blob/master/plugins/samplesource/aaroniartsainput/aaroniartsainputworker.cpp
- https://github.com/AlexandreRouma/SDRPlusPlus/blob/master/source_modules/spectran_http_source/src/spectran_http_client.cpp