ETHERNET Protocol

Just about everything about Red Pitaya
Post Reply
Promero
Posts: 3
Joined: Wed Jan 13, 2016 3:14 pm

ETHERNET Protocol

Post by Promero » Fri Jun 10, 2016 12:29 pm

Hi,

I need to find where is implement the Ethernet Protocol to tranfer data from Red Pitaya to the GUI (Oscilloscope App) in the PC.

I have searched in all .c and .h files of the oscilloscope app and I came to the conclusion that data are stored in the FPGA memory, so it is possible the implementation of ETH Protocol is done in low level programming like vhdl or something like that.

Please if I am wrong , I will be gratefull if anyone could to explain me. In another case, where do I can find that implementation?

Thank you.
Regards,
Pablo

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

Re: ETHERNET Protocol

Post by Nils Roos » Fri Jun 10, 2016 1:33 pm

Hi Pablo,

the data transfer between the components on the Red Pitaya and the javascript oscilloscope application running in your browser is tunneled through the nginx webserver and in some cases (bulk sample transmission) through websockets.

Data transfer format through nginx is a json encoded payload in a http GET response. The structure is described in the wiki of the old ecosystem (this page also contains information about the overall structure of web apps - it was written for the old ecosystem versions but is mostly still valid).

To achieve better speed, a websocket server was later added to nginx. It serves sample data as float values in binary format - note that these samples have been preprocessed for display purposes.

So, the network protocols for transferring samples to the web apps are based on high-level standards - http and websockets.

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

Re: ETHERNET Protocol

Post by Nils Roos » Fri Jun 10, 2016 1:42 pm

As for the implementation:
The http-based transfer is handled in rp_data_cmd.c in the function rp_data_cmd_handler().

The websocket server is in websocket.c, where the function callback_redpitaya_data() handles data requests.
edit: after looking through the Makefile jungle some more, it may be that the websocket server is now provided by the code in the ws_server folder.

Promero
Posts: 3
Joined: Wed Jan 13, 2016 3:14 pm

Re: ETHERNET Protocol

Post by Promero » Sat Jun 11, 2016 4:46 pm

Thnk you very much Nils!
Nils Roos wrote:As for the implementation:
The http-based transfer is handled in rp_data_cmd.c in the function rp_data_cmd_handler().

The websocket server is in websocket.c, where the function callback_redpitaya_data() handles data requests.
edit: after looking through the Makefile jungle some more, it may be that the websocket server is now provided by the code in the ws_server folder.

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 112 guests