encapsulated function read import Modelica; extends Modelica.Icons.Function; import Modelica_DeviceDrivers.Communication.UDPSocket; import Modelica_DeviceDrivers.Packaging.SerialPackager; input UDPSocket socket; input SerialPackager pkg; output Integer nReceivedBytes "Number of received bytes"; output Integer nRecvbufOverwrites "Accumulated number of times new data was received and written into the receive buffer without having been read out (retrieved) by Modelica"; end read;