modelTestSerialPackager_UDPWithoutReceiveThread

Example for UDP communication without dedicated receive thread
Diagram of TestSerialPackager_UDPWithoutReceiveThread

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

The uDPSend block sends to the local port 10002. The uDPReceive block starts a background process that listens at port 10002. Consequently, the uDPReceive block receives what the uDPSend block sends.

Note: There is no causality between the uDPSend block and the uDPReceive block. Therefore the execution order of the blocks is not determined. Additionally, the uDPReceive block starts an own receiving thread, so that the time the data was received is not equal to the time the external function within the uDPReceive block was called. This indeterminism may also show up in the plots.

Components

TypeNameDefaultDescription
Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.Packagerpackager
Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.AddRealaddReal
Modelica.Blocks.Sources.RealExpression[3]realExpression
Modelica_DeviceDrivers.ClockedBlocks.Communication.UDPSenduDPSend
Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.AddIntegeraddInteger
Modelica.Blocks.Sources.IntegerExpressionintegerExpression
Modelica.Clocked.IntegerSignals.Sampler.SampleClockedsample1
Modelica.Clocked.RealSignals.Sampler.SampleVectorizedAndClockedsample2
Modelica_DeviceDrivers.ClockedBlocks.Communication.UDPReceiveuDPReceive
Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.GetRealgetReal
Modelica_DeviceDrivers.ClockedBlocks.Packaging.SerialPackager.GetIntegergetInteger
Modelica.Clocked.RealSignals.Sampler.AssignClockVectorizedassignClock1
Modelica.Clocked.IntegerSignals.Sampler.AssignClockassignClock2
Packaging.SerialPackager.AddFloataddFloat
Modelica.Blocks.Sources.RealExpression[2]realExpression1
Modelica.Clocked.RealSignals.Sampler.SampleVectorizedAndClockedsample3
Packaging.SerialPackager.GetFloatgetFloat
Modelica.Clocked.RealSignals.Sampler.AssignClockVectorizedassignClock3
Modelica.Clocked.ClockSignals.Clocks.EventClockeventClock1
Modelica.Clocked.ClockSignals.Clocks.EventClockeventClock2
Modelica.Blocks.Sources.BooleanExpressiontrigger
Modelica.Blocks.Sources.BooleanExpressionpre_trigger