OSF UDP Streamer
Description
The "osfudpstreamer" module consumes channel data and sends it in the form of UDP packets over the network. over the network.
Interfaces & protocols used
- OSF UDP stream format
- OSF 4 file format
JSON configuration
The following section describes the entire JSON configuration of the module and explains the individual parameters.
Example configuration (minimum)
An OSF UDP streamer example configuration is shown below:
{
"module": "OSFUDPStreamer",
"factory": "osfudpstreamer",
"config":{
"port":12345,
"time":300000,
"streamLastSampleOnly":true
}
}
Example configuration (maximum)
An OSF UDP streamer example configuration is shown below:
{
"module": "OSFUDPStreamer",
"factory": "osfudpstreamer",
"config":{
"port":12345,
"maxPacketSize":64000,
"pollingInterval":1000,
"samplesPerConsume":1024,
"senderAddress":"192.168.0.1",
"receiverAddresses":[
"192.168.0.2",
"192.168.0.3"
],
"channels":[
"SomeChannel",
"SomeChannelPrefix*"
],
"time":300000,
"streamLastSampleOnly":true,
"refreshIntervalMs":60000
}
}
Global module parameters
Parameter Name | Required | Data Type | Meaningful Value Range | Default | Description |
---|---|---|---|---|---|
port | YES | UINT16 | N/A | UDP port for OSF transmission | |
maxPacketSize | No | UINT16 | 64000 | Maximum size of resulting UDP packets | |
pollingInterval | No | INT | 1 - | 1000 | Polling Interval [ms] |
samplesPerConsume | No | INT | 1 - | 1024 | max. number of consumed samples per polling interval |
senderAddress | No | STRING | ALL interfaces | IP address assigned to the interface used for sending | |
receiverAddresses | No | ARRAY [ STRING ] | Broadcast | List of receiver addresses | |
channels | No | ARRAY [ STRING ] | [ "*" ] | JSON array of the transmitted channel names as a string | |
time | No | INT | 1 - | 300000 (5 min) | approximate maximum time interval [ms] before OSF header is retransmitted |
streamLastSampleOnly | No | BOOL | true, false | true | Transmit only last consumed sample (e.g. for live view) |
refreshIntervalMs | No | INT | 1 - | 60000 (60 s) | Resend the same values after an interval has expired if their associated trusted timestamp has been updated |
For the specified channel names, regular expressions can be used in the simplified notation, i.e. '?' (replace a single character) or '*' (replace a character string of any length) can be used for the specified channel names.
Description OSF Stream
We differentiate here between the following types of UDP packets
- UDP OSF header length (hereinafter "OSF40")
- UDP OSF header section (hereinafter "OSF41")
- UDP OSF data section (hereinafter "OSF42")
As part of the periodic transmission of the OSF header, a single OSF40 packet is initially transmitted followed by several OSF41 packets in most cases. OSF42 packets are transmitted as part of the transmission of OSF data blocks.
Remarks:
- All multi-byte values are coded in OSF Stream format Big Endian.
- Within the contained OSF format, however, multi-byte values are coded Little Endian as usual.
Header and data packets are matched/identified on the basis of the time stamp at the time of measurement operation.
The individual header sections are numbered in ascending order from 0, ..., (number of packets)-1, so that a complete transmission can be ensured.
Description OSF Stream UDP packets
These UDP packets are defined as follows:
UDP OSF header length (OSF40)
OSF 4 identifier | packet type | identification/timestamp | data length | data |
---|---|---|---|---|
4 bytes | 1 byte | 8 bytes | 16 bytes unsigned | DATA_SZ bytes unsigned |
"OSF4" | "0" | Start of measurement mode | DATA_SZ | Number of subsequent OSF41 packets |
UDP OSF header section (OSF41)
OSF 4 identifier | packet type | identification/timestamp | data length | data | data |
---|---|---|---|---|---|
4 bytes | 1 byte | 8 bytes | 16 bytes unsigned | 4 bytes unsigned | (DATA_SZ - 4) bytes |
"OSF4" | "1" | Start of measurement mode | DATA_SZ | Index OSF header section | Content OSF header section |
UDP OSF data section (OSF42)
OSF 4 identifier | packet type | identification/timestamp | data length | data |
---|---|---|---|---|
4 bytes | 1 byte | 8 bytes | 16 bytes unsigned | DATA_SZ bytes |
"OSF4" | "2" | Start of measurement mode | DATA_SZ | Contents of OSF data section |
Module information
Information | Value |
---|---|
Authors | optiMEAS Measurement and Automation Systems GmbH |
since smartCORE | 0.88 |
Module type | Consumer |
Dependencies | NONE |