====== Control System Talking to Other System ====== 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 $ sudo ./examples/socket/eerosServer/socketServerExample Open a second terminal and run $ sudo ./examples/socket/standaloneClient/standaloneSocketClientExample 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>'' [{{ :getting_started:tutorials:socketconnectionexample.png?450 |//Control system with socket data block and external standalone client//}}] \\ ====== 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 $ sudo ./examples/socket/eerosServer/socketServerExample Open a second terminal and run $ sudo ./examples/socket/eerosClient/socketClientExample 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.