Skip to main content

OSF Writer

Description

The "osfwriter" module consumes channel data and writes this data to OSF Streaming Format V4 files.

Interfaces & protocols used

  • 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)

A sample OSF Writer configuration is shown below:

    {
"module": "OSFWriter",
"factory": "osfwriter",
"config":{
}
}

Example configuration (maximum)

A sample OSF Writer configuration is shown below:

    {
"module": "OSFWriter",
"factory": "osfwriter",
"config":{
"filename":"/sde/<tag>/<date>/<date>_<time>.osf",
"tag": "preview",
"pollingInterval":1000,
"samplesPerConsume":1024,
"newfile": "time",
"time":900000,
"volume":10000000,
"channels":[
"mvb*",
"can*",
"gps*"
],
"ignore":[
"Some.Ignored.Namespace*",
"someIgnoredChannel"
],
"refreshIntervalMs":60000
}
}

Global module parameters

Parameter nameRequiredData typeMeaningful value rangeDefaultDescription
filenameNoSTRINGsee below"/sde/"TAG"/"DATE"/"DATE"_"TIME".osf"File name or structure of the file name (see below)
tagNoSTRING"preview"Tag name
pollingIntervalNoINT1 -1000Polling Interval [ms]
samplesPerConsumeNoINT 1 -1024max. number of consumed samples per polling interval
newfileNoSTRING"time", "volume""time"Reason for splitting the recording into several files
timeNoINT1 -900000 (15 min)approximate maximum time interval [ms] before new OSF file is created
volumeNoINT1 -10 MBapproximate file size [bytes] before new OSF file is created
maximumAncientRangeMsNoINT0 -15000 (15 s)maximum permissible range before the start of the file, in which there are trustworthy samples. If these samples are before this range, they are moved to the beginning of this range. If set to -1, there is NO shift.
channelsNoJSON array[ "*" ]JSON array with channel names as string
ignoreNoJSON array[ ]JSON array with ignored channel names as string
refreshIntervalMsNoINT1 -60000 (60 s)Write the same values again 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.

Specification of the file name 'filename'

The file name is specified via a path, e.g.

/sde/<tag>/<date>/<date>_<time>.osf

Possible variables are:

  • <year> (e.g. 2022)
  • <month> (e.g. 01)
  • <day> (e.g. 01)
  • <hour> (e.g. 01, 23)
  • <minute> (e.g. 01)
  • <second> (e.g. 01)
  • <msecond> (e.g. 001)
  • <date> := "<year><month><day>"
  • <time> := "<hour><minute><second>"
  • <tag> (see parameter 'tag')

Module information

InformationValue
AuthorsoptiMEAS Measurement and Automation Systems GmbH
since smartCORE0
Module typeFast Message Receiver, Producer
DependenciesFast Message Transmitter Module (e.g. fmudp, canbus, smartmvb, ...)