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 name | Required | Data type | Sensible value range | Default value | Description |
---|---|---|---|---|---|
fmd | No | STRING | Name 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) | |
priority | No | INT | 20 - 80 | 80 | Priority of the thread of the query loop |
port | YES | INT16 | 0 - 65535 | UDP port regarding packet reception | |
keyBitOffset | No | INT | within the length of the UDP packet | 0 | Offset of the identification key if different UDP packets are to be interpreted differently |
keyBitLength | No | INT | so that keyBitOffset + keyBitLength is within the UDP packet | 0 | length of the identification key if different UDP packets are to be interpreted differently |
keyByteOrder | No | STRING | "bigendian", "littleendian" | "bigendian" | Byte order of the identification key |
Module information
Information | Value |
---|---|
Authors | optiMEAS Measurement and Automation Systems GmbH |
since smartCORE | 0.103 |
Module type | Producer (Dispatcher) |
Dependencies | Fast Message Receiver |