Skip to main content

UDP receiver module "fmudp"

Description

The 'fmudp' module provides a UDP socket. It is generally used with the fmproducer module, which suitably extracts the "raw" UDP packet data appropriately and produces it into channels. (However, it is also possible in principle to use a "dbc" receiver module, for example, i.e. to specify the channels as CAN bus DBC files, ...)

Interfaces & protocols used

  • Network communication UDP

JSON configuration

The following section describes the entire JSON configuration of the module and explains the individual parameters.

Example configuration (configuration for a single UDP packet format)

If a single UDP packet format is to be received, it is only necessary to define the registration of the Fast Message Receiver functions or modules independently of identification. This is usually done differently for each Fast Message Receiver module. However, if, as in the example, an fmproducer module is used, this definition can be made using the "messageKey": 0 parameter).

    {
"module": "UDP",
"factory": "fmudp",
"config":{
"port":12345
}
},
{
"module": "Producer",
"factory": "fmproducer",
"config":{
"fmd": "UDP",
"channelPrefix": "UDP",
"channels":[
{
"name": "Some Channel Name",
"dataType": "int8",
"scale":1,
"offset":0,
"physicalUnit":"",
"messageKey":0,
"bitOffset":0,
"bitLength":8,
"imageType": "signed"
},

[...]

]
},

Example configuration (configuration for several different UDP packet formats)

However, if differently formatted UDP packets are to be received, it is necessary for these to contain a common area for transmitting an identification key (key). This area must be configured in the fmudp module. In addition, all receiver functions/modules (possibly channel-related) must be configured with corresponding values of the identification key (defined in the following example under messageKey in each case).

    {
"module": "UDP",
"factory": "fmudp",
"config":{
"port":12345,
"keyBitOffset":0,
"keyBitLength":32,
"keyByteOrder": "bigendian"
}
},
{
"module": "Producer",
"factory": "fmproducer",
"config":{
"fmd": "UDP",
"channelPrefix": "UDP",
"channels":[
{
"name": "Some Channel from Message Format 1 (42) Name",
"dataType": "int8",
"scale":1,
"offset":0,
"physicalUnit":"",
"messageKey":42,
"bitOffset":32,
"bitLength":8,
"imageType": "signed"
},
{
"name": "Some Channel from Message Format 2 (43) Name",
"dataType": "double",
"scale":1,
"offset":0,
"physicalUnit":"",
"messageKey":43,
"bitOffset":32,
"bitLength":64,
"imageType": "float"
},

[...]

]
},

Global module parameters

Parameter nameRequiredData typeSensible value rangeDefault valueDescription
fmdNoSTRINGName of the module instance (specified in the configuration section under module)Name of the provided Fast Message Dispatcher for the purpose of connecting a Fast Message Receiver (such as an fmproducer module)
priorityNoINT20 - 8080Priority of the thread of the query loop
portYESINT160 - 65535UDP port regarding packet reception
keyBitOffsetNoINTwithin the length of the UDP packet0Offset of the identification key if different UDP packets are to be interpreted differently
keyBitLengthNoINTso that keyBitOffset + keyBitLength is within the UDP packet0length of the identification key if different UDP packets are to be interpreted differently
keyByteOrderNoSTRING"bigendian", "littleendian""bigendian"Byte order of the identification key

Module information

InformationValue
AuthorsoptiMEAS Measurement and Automation Systems GmbH
since smartCORE0.103
Module typeProducer (Dispatcher)
DependenciesFast Message Receiver