SampleLogger

The sample logger component subscribes to a single DDS topic and writes all recieved samples to netCDF log files. The main sections of the input file are:

  • LogSetup: The signal-independent configuration of the logger.
    • Maxsamples: The number of samples before further samples are written to a new NetCDF File.
    • CompressionLevel: The NetCDF compression level, an integer between 0 and 9.
    • Directory: A string specifying the directory where the log files should be written.
    • FilePrefix: The prefix for the files.
    • Title: Title of the log file series.
    • Origin: Typically name of the ship.
    • OriginType: Typically 'ship'.
    • OriginId: Typically the IMO number or another ID.
    • Summary: A short description of the data series.
    • DdsBufferLength: [50] How many of the last arrived samples should the DataReader keep in the read buffer? Might be adjusted to avoid any loss of samples if many samples are expected to be received very rapidly.
  • Signals: Signal dependent configuration options.
    • Type: The data type of the signal, e.g. DoubleVal, PosInfo, Float3. Available types can be found here. NB! Only types with a fixed number of fields/elements can be used.
    • Topic: The topic name
    • Unit: The unit of the signal. This should be an array comprised of the unit for each field in Type. Certain types have hard coded values.
    • Description: Information about the signal that should be included in variable headers in the output file.
    • Partition: The DDS partition to subscribe to (in which Topic is published).
    • Coordinate: OPTIONAL Name of field in Type that should be used as a coordinate variable. This should only be set if the received value is expected to be monotonically increasing. If unset, the output file will not hav a coordinate variable.
    • AddTimestamp: [False] Include an additional variable time to which the time of reception of the samples are written.

An example input file is shown below, as well as here.

LogSetup:
Maxsamples: 6
CompressionLevel: 2
Directory: ./testout
FilePrefix: Samples_
Title: Test sample logger
Origin: Dev computer
OriginType: lab
OriginId: XXY
Summary: Dummy data
Signals:
Type: TypeTest
Topic: TestTypeTopic
Coordinate: int16Val
Unit: ["a","b","c","d","e","f","g","h","i","j","k"]
AddTimestamp: True
Partition: