blockUDPReceive

A block for receiving UDP datagrams

Extends from Modelica_DeviceDrivers.Utilities.Icons.BaseIcon (Base icon for blocks providing access to external devices), Modelica_DeviceDrivers.Utilities.Icons.UDPconnection (Base icon for models of network connections), Modelica_DeviceDrivers.Blocks.Communication.Internal.PartialSampleTrigger (Common code for triggering calls to external I/O devices).

Information

Supports receiving of User Datagram Protocol (UDP) datagrams.

Parameters

TypeNameDefaultDescription
Activation
BooleanenableExternalTrigger (from PartialSampleTrigger)falsetrue, enable external trigger input signal, otherwise use sample time settings below
SI.PeriodsampleTime (from PartialSampleTrigger)0.1Sample period of component
SI.TimestartTime (from PartialSampleTrigger)0First sample time instant
Incoming data
BooleanautoBufferSizetruetrue, buffer size is deduced automatically, otherwise set it manually
IntegeruserBufferSize16*1024Buffer size of message data in bytes (if not deduced automatically)
Integerport_recv10001Listening port number of the server. Must be unique on the system
BooleanuseRecvThreadtruetrue, dedicated receiving thread writes datagrams into shared buffer (latest available datagram is used by simulation thread). Otherwise, simulation progress is blocked until a new incoming datagram is available
Advanced
BooleanshowReceivedBytesPortfalse=true, if number of received bytes port is visible

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.BooleanInputtrigger (from PartialSampleTrigger)
Interfaces.PackageOutpkgOut
Modelica.Blocks.Interfaces.IntegerOutputnRecvBytesNumber of received bytes

Components

TypeNameDefaultDescription
IntegernRecvbufOverwritesAccumulated number of times new data was received without having been read out (retrieved) by Modelica