modelUDPReceive
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.Utilities.Icons.PartialClockedDeviceDriverIcon.
Information
Supports receiving of User Datagram Protocol (UDP) datagrams.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Incoming data | |||
| Boolean | autoBufferSize | true | true, buffer size is deduced automatically, otherwise set it manually |
| Integer | userBufferSize | 16*1024 | Buffer size of message data in bytes (if not deduced automatically) |
| Integer | port_recv | 10001 | Listening port number of the server. Must be unique on the system |
| Boolean | useRecvThread | true | true, 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 |
| Boolean | skipFirstTick | false | true, skip call to readUDP(...) at first clock tick, e.g., to avoid infinite blocking if 'useRecvThread=false' and the 'UDPSend' block is within the same model |
| Advanced | |||
| Boolean | showReceivedBytesPort | false | =true, if number of received bytes port is visible |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Interfaces.PackageOut | pkgOut | ||
| Modelica.Blocks.Interfaces.IntegerOutput | nRecvBytes | Number of received bytes |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nRecvbufOverwrites | Accumulated number of times new data was received without having been read out (retrieved) by Modelica |