Looking for the data transfer protocol to the PC

Applications, development tools, FPGA, C, WEB
Post Reply
PatrickLafont
Posts: 12
Joined: Sun Feb 01, 2015 1:28 pm

Looking for the data transfer protocol to the PC

Post by PatrickLafont » Wed Feb 11, 2015 10:53 am

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

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Looking for the data transfer protocol to the PC

Post by Nils Roos » Thu Feb 12, 2015 4:31 pm

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.

PatrickLafont
Posts: 12
Joined: Sun Feb 01, 2015 1:28 pm

Re: Looking for the data transfer protocol to the PC

Post by PatrickLafont » Fri Feb 13, 2015 1:06 am

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

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Looking for the data transfer protocol to the PC

Post by Nils Roos » Fri Feb 13, 2015 3:37 am

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

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.
Application usage

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.
Other

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.
There are also some test functions under "/redpitaya", which do not require a running app. See nginx.conf for more info.

PatrickLafont
Posts: 12
Joined: Sun Feb 01, 2015 1:28 pm

Re: Looking for the data transfer protocol to the PC

Post by PatrickLafont » Sat Feb 14, 2015 12:48 pm

Thank you Nils. It seems very clear. I wil try with Delphi to do it.

Post Reply
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