-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web service API #53
Comments
The URL could be constructed like this for the plugins structure: /device/{id | query}/channel/{id | query}
Then the HTTP methods mapping is rather obvious:
Details are specified in the JSON payload |
Sooner or later the user authentication will have to be addressed and the permissions attached to it. This will become more critical for headless operation of distant instances managing transponders or repeaters. In particular one may want to restrict the frequencies that may be tuned via the web interface. |
Hi Eduoard, I think this is definitely a cool idea. One use-case for an API that I can foresee might be to trigger relays / coax switches to switch antennas, enable amplifiers, etc. This might require the web service host/server process to have pretty low latency to be effective though. For example, an external program might run a simple loop that sends a request every 20 ms asking whether T1 is transmitting, and if so, triggers a transmit/receive switch and keys up a QRP amplifier. We obviously don't want too much lag in getting a response (more than a few hundred ms would be noticeable). Of course -- to a large extent performance of such a system will depend on the competence of the third-party script writer (presumably the user/integrator) and no way you can control that. =D (and of course ideally the hardware user -- I'm using LimeSDR -- would pull hardware state directly from hardware or hardware API -- but I'm not terribly clever -- I can write a Python script that queries a REST API, but Lime API is probably beyond my level of competence). =( |
What you suggest is rather messy (as polling is generally). What is acceptable is that the 3rd party software controls both SDRangel via API and the relays or whatsoever. Or if trigger comes from SDRangel this should be done via macro (see issue #49) It is in the plans to support the GPIO board via the LimeSDR plugin. |
Thanks Eduoard, I've looked into some other solutions like the one you suggest and think it is definitely more workable. Good work. =D |
Server with minimal interface working in v3.8.4 Uses swagger for API design see: https://github.com/f4exb/sdrangel/tree/master/swagger/sdrangel |
I'll comment on From a In But most of the swagger-code is generated. So I'm anxious to patch it. |
Technically I "own" the code generator that I have already customized. It is a matter of updating |
Released in v4.0.0 |
Implement a Web service style API to drive and/or request an SDRangel instance.
As a prerequisite the Model-View pattern should be enforced which is not the case today and can be the subject of another ticket. Both are prerequisites to proper macro feature implementation and possibly the creation of a headless version (server)
This API will be REST"ish" style if not fully RESTful compatible. It will use HTTP protocol over a configurable port and use JSON as the data interface. It will try to match as best as possible the HTTP methods usage described here: https://en.wikipedia.org/wiki/Representational_state_transfer
The text was updated successfully, but these errors were encountered: