User Tools

Site Tools


getting_started:tutorials:systemeeros1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
getting_started:tutorials:systemeeros1 [2020/12/03 11:16] – created ursgrafgetting_started:tutorials:systemeeros1 [2021/03/30 09:39] (current) – [Talking to an External Application] ursgraf
Line 1: Line 1:
-====== Control System Talking to Second EEROS Control System ====== +====== Control System Talking to Other System ====== 
-In the EEROS library you will find a directory with examples. Open a shell in the build directory of your EEROS library and run ''examples/socket/eerosServer/socketServerExample''Open a second terminal and run ''examples/socket/standaloneClient/standaloneClient''.  As soon as the connection is established the socket data block periodically sends its input signal of type ''Vector4''. The transmission speed is given by the period of the time domain the socket data block is assigned to. The stand alone client prints these values ten times per second.\\+The situation can arise that you want to send data from an external application to the control system of an EEROS application. You also might want to send data from the EEROS application to an external application. Further, two separate EEROS applications might want to exchange data. For this purpose, EEROS offers a block which opens a socket connection.  
 + 
 + 
 + 
 +====== Talking to an External Application ====== 
 + 
 +In the EEROS library you will find a directory with examples. For this example see [[https://github.com/eeros-project/eeros-framework/blob/master/examples/socket/|Socket]].  
 + 
 +Open a shell in the build directory of your EEROS library and run  
 +<code> 
 +$ sudo ./examples/socket/eerosServer/socketServerExample 
 +</code> 
 +Open a second terminal and run  
 +<code> 
 +$ sudo ./examples/socket/standaloneClient/standaloneSocketClientExample 
 +</code> 
 +As soon as the connection is established the socket data block periodically sends its input signal of type ''Vector4''. The transmission speed is given by the period of the time domain the socket data block is assigned to. The stand alone client prints these values ten times per second.\\
 At the same time the standalone block periodically transmit six double values, whose values increase over time. The socket data block receives these values and bundles them into its output signal of type ''Matrix<6,1,double>'' At the same time the standalone block periodically transmit six double values, whose values increase over time. The socket data block receives these values and bundles them into its output signal of type ''Matrix<6,1,double>''
-[{{ :getting_started:tutorials:socketconnectionexample.png?500 |//Control system with socket data block and external standalone client//}}] +[{{ :getting_started:tutorials:socketconnectionexample.png?450 |//Control system with socket data block and external standalone client//}}]
- ---- +
-Another example shows how two independent EEROS applications can pass data among each other by using a socket data block each. Open a shell in the build directory of your EEROS library and run ''examples/socket/eerosServer/socketServerExample''. Open a second terminal and run ''examples/socket/eerosClientExample''. While the socket data block of the former creates a socket server the latter creates a socket client which connects to the server.+
 \\ \\
-You can alter the data types passed among them by commenting / uncommenting the corresponding lines directly in the source code.+ 
 + 
 + 
 +====== Talking Between two EEROS Applications ====== 
 +Another example shows how two independent EEROS applications can pass data among each other by using a socket data block each. Open a shell in the build directory of your EEROS library and run  
 +<code> 
 +$ sudo ./examples/socket/eerosServer/socketServerExample 
 +</code> 
 +Open a second terminal and run 
 +<code> 
 +$ sudo ./examples/socket/eerosClient/socketClientExample 
 +</code> 
 +While the socket data block of the former creates a socket server the latter creates a socket client which connects to the server. 
 +[{{ :getting_started:tutorials:socketconnectionexample2.png?800 |//Two control systems exchanging data//}}] 
 +You can alter the data types passed among them by commenting / uncommenting the corresponding lines directly in the source code. After changing the code you must recompile and rerun the examples.
getting_started/tutorials/systemeeros1.1606990580.txt.gz · Last modified: 2020/12/03 11:16 by ursgraf