PeriodicSummary

The PeriodicSummary runtime component continuously updates a csv file with statistics on selected signals. It appends to the csv file one row per period, where each columns represent one kind of statistics on a scalar signal. E.g. it could be the average value of main engine power for each hour.

Its function is otherwise governed by the input file. The various options are as follows:

  • Options:
    • PeriodMs: The period of running an iteration of the component, specified in ms.
    • File: The filename to write to
    • TimeFormat: A string specifying the time format to use, according to the format strftime uses.
    • SummaryPeriod: The period for which to do statistics. The case insensitive possible values with associated recommended values for <timeformat> is:
      • MINUTE: "%Y-%m-%d %H:%M"
      • HOUR: "%Y-%m-%d %H"
      • DAY: "%Y-%m-%d"
      • WEEK: "%Y-W%W"
      • MONTH: "%Y-M%m"
      • YEAR: "%Y"
      • UNLIMITED: "Sum:"
  • Signals: A list of input signals and what kinds of statistics to perform on each. Each element of this list has the following fields:
    • Type: The DDS data type of the signal.
    • Topic: The DDS topic.
    • Partition: The DDS partition.
    • Fields: A yaml array of the fields of this topic to perform statistics on.
    • Operations: A yaml array of the operations to perform. Each element defines the operation to perform on the corresponding field defined above. Possible (case independent) values are:
      • AVERAGE: Average value in the period.
      • SUM: Aggregated value in the period.
      • MIN: Minimum value in the period.
      • MAX: Maximum value in the period.

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

Options:
PeriodMs: 1000
File: summary.csv
TimeFormat: ""
SummaryPeriod: Minute
Signals:
- { Type: CommonVesselInfo, Topic: CommonVesselInfo, Partition: "", Fields: ["Machinery.auxElProd", "Propulsion.rpm"], Operations: [Average, Sum]}
- { Type: FloatVal, Topic: float, Partition: "", Fields: ["val"], Operations: [Average]}