ADTF  3.18.2
ADTFDAT File Recorder Plugin

ADTFDAT File Recorder

Introduction

The ADTFDAT File Recorder is a delivered Streaming Service plugin to store the measurement data in an .adtfdat file on hard disk.

Plugin Information
Plugin Filenameadtf_recorder.adtfplugin
Plugin Descriptionadtf_recorder.plugindescription
Plugin NameRecording Output Streaming Service
LicenseADTF
Support Mailsupport@digitalwerk.net
Homepage URLhttps://support.digitalwerk.net/
Plugin Versions
Plugin Version3.18.2
Plugin File Version1.0
adtf3.18.2
adtf::ucom3.1.0
Component Information
NameADTFDAT File Recorder
CIDadtfdat_file_recorder.streaming_sink.adtf.cid
DescriptionUse this Streaming Sink to store the measurement data on the hard disk in .adtfdat files.
TypeFilter
Properties
NameValueTypeDescriptionSubproperties
attachment_configuration_filecFilenameA configuration file that defines which files should be attached to the recordings. Please see the documentation for further information.
attachment_resolve_macrosfalsetBoolWhether or not to resolve macros in the attached file configuration file (specified in attachment_configuration_file). Default is not to.
automatic_split_interval_seconds0tUInt32When not equal to zero, split recordings after the given amount of seconds after a recording has been started.
cache_attachment_archivetruetBoolWhether or not to cache the archive of attached file or recreate it each time a recording is closed. Default is to cache the archive.
default_descriptioncStringThis description is stored in the file header.
diskspace_check_size0tUInt64If less than the specified value of disk space [MB] remains, then the recording is stopped and the file is closed correctly.
file_format4tInt32

Choose the ADTF DAT File format version:

  • 'adtf3ns' stores timestamps with nanoseconds precision and is supported from ADTF 3.7 onwards.
  • 'adtf3' stores timestamps with microseconds precision

Mind that you need to choose appropriate serializations for each stream if you select 'adtf3'.

Value List:
adtf3ns = 4
adtf3 = 3
filename$(ADTF_SESSION_DIR)/record_$(DATE)_$(TIME).adtfdatcFilenameFilename of the measurement adtfdat file to be saved. If the file extension is not .adtfdat, the recorder will append this extension.Filename Extension Filter:
ADTF DAT file (*.adtfdat)
filename_suffix_on_collision_%03dcStringThe format of the suffix used when there is a filename collision with an existing file. Default is '_%03d'.
filename_suffix_on_split_split_%03dcStringThe format of the suffix used for filename generation when a recording is split. Default is '_split_%03d'.
follow_seconds0tUInt32Recording time [sec] after the start trigger (posttrigger).
history_seconds0tUInt32Recording time [sec] before the start trigger (pretrigger).
keep_base_name_on_splittruetBoolUse the name of the first file with the applied suffix when splitting files, without re-evaluating any macros.
memory_check_ratio90tUInt32The percentage limit of physical memory used by the whole system which will be checked by ADTF. If the ratio will be exceeded, ADTFDAT File Recorder will not initialize or decrease the queues while running.
recording_mode0tInt32The mode of operation, please have a look at the entire ADTFDAT File Recorder documentation page for an in depth explanation of the different recording modes.Value List:
Continuous Mode with File Based History = 0
Queue Mode with File Based Queue = 1
Queue Mode with Memory Based Queue = 2
request_substreamstruetBoolIf activated, the recorder will request all substreams from all inputs. This will ensure, that all available data will be recorded. Mind that this can be millions of signals! To record only a subset of the available substreams use the "Substream Reducer" filter. If you want to selectively request substreams of a single input sample stream, deactivate this property and connect a "Substream Requestor" filter to the sample streams in parallel to the 'ADTFDAT File Recorder'. Please also keep in mind, that each parallel consumer which requests substreams will take effect and this content will be recorded as well.
start_recording_on_startupfalsetBoolStarts the recording when Runlevel Running is reached.
trace_clocksfalsetBoolWhen true, clock offsets will be recorded in file extensions.
Runner
NameActivation TypeData TriggeredData InputThread TriggeredThread CyclicTimer TriggeredTimer IntervalDescription
process_recording_data601100Connect a Thread Runner that will provide the context for writing all recording data to disk. If this is not connected, the recorder will create a thread on its own.
Input Binding Objects
NameIIDProxy OIDDescription
controlrecorder.ant.services.adtf.iidInterface server for recording access
Dynamic Pins
Dynamic Input Pinstrue
Dynamic Output Pinsfalse
Dynamic Input Binding Pinsfalse
Dynamic Output Binding Pinsfalse
Required Interfaces
IID
kernel.penguin.services.adtf.iid
reference_clock.riddler.streaming.adtf.iid
adtf_file_objects.devil.services.adtf.iid

ADTFDAT File Recorder Basics

For recording all required data sources the related sample streams have to be connected to the ADTFDAT File Recorder. The ADTFDAT File Recorder works with dynamic data binding which means that it generates a new Pin when it is requested and uses it exclusively for one connection. This information is stored as streaming information in the resulting file (filename).

Modes of Operation

The ADTFDAT File Recorder has the following operation modes that can be activated via the recording_mode property:

Continuous Mode with File Based History [0]:
Recording is started with adtf::services::IRecorder::Start and stopped with a adtf::services::IRecorder::Stop. An optional amount of data before the start of the recording is kept in a file based ring buffer (history_seconds). All data is written directly to disk. This mode supports splitting of the recording (adtf::services::IRecorder::Split).
Queue Mode with File Based Queue [1]:
A configurable amount of history data is kept in a file based ring buffer (history_seconds). Recording is then triggered with adtf::services::IRecorder::Start and continues for an optional Follow Time (follow_seconds). All data is written directly to a file, no data is kept in memory. Splitting is not supported.
Queue Mode with Memory Based Queue [2]:
A configurable amount of history data is kept in a memory based queue (history_seconds). Recording is then triggered with a adtf::services::IRecorder::Start and continues an optional Follow Time (follow_seconds). All data is kept in memory and flushed to disk after all data has been aquired. Splitting is not supported.
Note
When using a Memory Based Queue/History or during splitting of files it may occur that the memory usage for queuing data exceeds the virtual memory limit.
You can also use the RPC implementation for the ADTFDAT File Recorder (adtf::remote::IRecorder::Start, adtf::remote::IRecorder::Stop, adtf::remote::IRecorder::Split). This is the way our Tools and Applications control the Recording (ADTF Control, ADTF GUI Control). For an example please refer to Demo Qt5 Recorder Control View Plugin.