Hello all,
I am looking for the data transfer protocol through Ethernet for making acquisition software on computer side. I think it must be somewhere but unable to find it for the moment.
The applications interesting me are oscilloscope+signal generator and spectrum analyzer. I try to make applications with Delphi XE7 with my own data processing functions.
Thank you in advance for your help.
Patrick
Looking for the data transfer protocol to the PC
-
- Posts: 12
- Joined: Sun Feb 01, 2015 1:28 pm
-
- Posts: 1441
- Joined: Sat Jun 07, 2014 12:49 pm
- Location: Königswinter
Re: Looking for the data transfer protocol to the PC
Hi,
The wiki has a brief overview of the JSON structures that are used to exchange data.
If I understood you correctly, you want to use the web-interface without the Bazaar front end. In that case you need to call some extra management functions to initialize the application before you can exchange data. I'll prepare a short summary later.
The wiki has a brief overview of the JSON structures that are used to exchange data.
If I understood you correctly, you want to use the web-interface without the Bazaar front end. In that case you need to call some extra management functions to initialize the application before you can exchange data. I'll prepare a short summary later.
-
- Posts: 12
- Joined: Sun Feb 01, 2015 1:28 pm
Re: Looking for the data transfer protocol to the PC
Thank you Nils.
That is what I want: because I already have a graphical user's interface program written in Delphi with many existing functions, I intend to interface the Redpitaya with my program through a Ethernet link in order to have another associated data acquisition device.
Patrick
That is what I want: because I already have a graphical user's interface program written in Delphi with many existing functions, I intend to interface the Redpitaya with my program through a Ethernet link in order to have another associated data acquisition device.
Patrick
-
- Posts: 1441
- Joined: Sat Jun 07, 2014 12:49 pm
- Location: Königswinter
Re: Looking for the data transfer protocol to the PC
Ok, here's a short rundown of what you can do via the web. The host for all this is your Red Pitaya, of course. Most of the operations are pretty self-explanatory.
Application management
Application management
Code: Select all
method location+parameter content (GET: answer, POST: request)
------ ------------------ ------------------------------------
GET /bazaar?apps= {"scope":{"name":"Oscilloscope","version":"...","revision":"...","description":"..."},
"spectrum":{"name":"Spectrum Analyzer","version":"...","revision":"...","description":"..."}}
POST /bazaar?install=<app_name>
POST /bazaar?remove=<app_name>
- Use "/bazaar?apps=" to lists all installed apps.
- Remove or install apps as needed.
Code: Select all
method location+parameter content (GET: answer, POST: request)
------ ------------------ ------------------------------------
GET /bazaar?start=<app_name> {"status":"OK"}
GET /bazaar?stop= {"status":"OK"}
POST /data {"datasets":{"params":{"xmin":0,"xmax":131,"trig_mode":0,"trig_source":0,...}}}
GET /data {"app":{"id":"scope"},
"datasets":{"g1":[{"data":[[0.0000,2.6074e-04],[0.1280,7.8223e-04],...]},
{"data":[[0.0000,-6.5186e-03],[0.1280,-5.3453e-03],...]}],
"params":{"xmin":0,"xmax":131,"trig_mode":0,"trig_source":0,...}},
"status":"OK"}
- Begin with "/bazaar?stop=" to stop any currently running app, then start the app you need.
- Set the operating parameters of the app with a POST to "/data". The names and functions of the parameters in the json content vary from app to app.
- Read results with a GET from "/data".
- When you are done, stop the app.
Code: Select all
method location+parameter content (GET: answer, POST: request)
------ ------------------ ------------------------------------
GET /bazaar?help= {"command":["help","","Returns the command descriptions."], ...
"status":"OK"}
POST /upload_gen_ch1 <plaintext> (goes to /tmp/gen_ch1.csv)
POST /upload_gen_ch2 <plaintext> (goes to /tmp/gen_ch2.csv)
- Some modules take preloaded data from local files, notably the generate module. POST to "/upload_gen_ch1" to fill the file.
-
- Posts: 12
- Joined: Sun Feb 01, 2015 1:28 pm
Re: Looking for the data transfer protocol to the PC
Thank you Nils. It seems very clear. I wil try with Delphi to do it.
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie
Who is online
Users browsing this forum: No registered users and 84 guests