Skip to main content

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 NameRequiredData TypeMeaningful Value RangeDefaultDescription
portYESUINT16N/AUDP port for OSF transmission
maxPacketSizeNoUINT16<=64000<= 6400064000Maximum size of resulting UDP packets
pollingIntervalNoINT1 -1000Polling Interval [ms]
samplesPerConsumeNoINT1 -1024max. number of consumed samples per polling interval
senderAddressNoSTRINGALL interfacesIP address assigned to the interface used for sending
receiverAddressesNoARRAY [ STRING ]BroadcastList of receiver addresses
channelsNoARRAY [ STRING ][ "*" ]JSON array of the transmitted channel names as a string
timeNoINT1 -300000 (5 min)approximate maximum time interval [ms] before OSF header is retransmitted
streamLastSampleOnlyNoBOOLtrue, falsetrueTransmit only last consumed sample (e.g. for live view)
refreshIntervalMsNoINT1 -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 identifierpacket typeidentification/timestampdata lengthdata
4 bytes1 byte8 bytes16 bytes unsignedDATA_SZ bytes unsigned
"OSF4""0"Start of measurement modeDATA_SZNumber of subsequent OSF41 packets
UDP OSF header section (OSF41)
OSF 4 identifierpacket typeidentification/timestampdata lengthdatadata
4 bytes1 byte8 bytes16 bytes unsigned4 bytes unsigned(DATA_SZ - 4) bytes
"OSF4""1"Start of measurement modeDATA_SZIndex OSF header sectionContent OSF header section
UDP OSF data section (OSF42)
OSF 4 identifierpacket typeidentification/timestampdata lengthdata
4 bytes1 byte8 bytes16 bytes unsignedDATA_SZ bytes
"OSF4""2"Start of measurement modeDATA_SZContents of OSF data section

Module information

InformationValue
AuthorsoptiMEAS Measurement and Automation Systems GmbH
since smartCORE0.88
Module typeConsumer
DependenciesNONE