.AixLib.Utilities.Communication.SocketCommunication.Examples.ExampleClientLoop

Information

This is a very simple example to show the TCP communication functionality. A feedback control is modeled where a gain controller controls a first order system. The signal is send to a server which returns the send message unaltered back to the client.

TCP/IP-server for testing

A server to test ExampleClientLoop is provided both as a source code *.cpp-file and as an executable *.exe-file. The server simply echoes the received character message and sends it back to the sender (i.e. client). The code may be compiled and executed from the console. This code is taken from Microsoft's Winsock documentation pages: Link to MSDN

The server performs the following tasks:

Usage

Open a console in Windows (Start -> Run -> insert: "cmd"), change folder to .../AixLib/Resources/SocketCommunicationServer, run ExampleServer.exe. The Server is now ready to operate. Now simulate ExampleClientLoop.

Verification of IP address

Note: Depending on your network settings it may be required to change the IP address in ExampleClientLoop.tCPCommunicatorExample. Set the IP address to the IP address of your local machine. (You may retrieve your local IP address in Windows from the console (Start -> Run -> insert: "cmd" -> ipconfig)).

Requirements

This example and the executable have been tested on Windows 7 64-bit using Dymola 2015 32-bit.

Revisions


Generated at 2024-05-18T18:16:21Z by OpenModelicaOpenModelica 1.22.4 using GenerateDoc.mos