modelTCPCommunicatorExample
Example model to show TCP communication with simple server
Extends from BaseClasses.PartialTCPCommunicator.
Information
Simple TCP Communicator Example
This is a small example block which allows to establish a TCP
connection between a client (i.e., Dymola or SimulationX by ESI) and
an external server. It sends the value of input u[1] as
a floating-point number to the server and receives a floating-point
number. Check
SocketCommunication.Examples.ExampleClientLoop for an
executable example.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Time | samplePeriodExample | 1 | Sample period how often a telegram is send |
| Modelica.Units.SI.Time | startTimeExample | 0 | Start time when sampling starts |
| String | IP_AddressExample | "127.0.0.1" | IP address or name of Server |
| Integer | portExample | 27015 | Port on server |
| Integer | nSend | 1 | Number of data points to be written |
| Integer | nRecv | 1 | Number of data points to be read |
| Modelica_DeviceDrivers.Utilities.Types.ByteOrder | byteOrder | Modelica_DeviceDrivers.Utilities.Types.ByteOrder.LE | Byte order |
Revisions
-
August 25, 2018 by Thomas Beutlich:
Utilize TCPIPSocketClient_ functions from Modelica_DeviceDrivers library. This is for:#277 -
June 01, 2013 by Georg Ferdinand Schneider:
Implemented -
September 03, 2013 by Georg Ferdinand Schneider:
Revised and updated