Stream Configuration File Format
The CAM Stream Configuration (CSC) file contains human readable settings used for the deployment phase of a critical application in the CAM project.
Files should use the extension .csc.yml
.
Header Section
The file format uses Yaml <https://yaml.org/> data serialization language version 1.2.
Configuration files should explicitly indicate the version using the YAML directive before the document contents:
%YAML 1.2
---
The mapping node is used to determine what file format version the file is compatible with. This document is specifies the version “1.0”.
cam_stream_conf_version: "1.0"
Metadata block
The metadata
block collection describes the target stream using two
mappings:
metadata:
uuid: "00000000-0000-0000-0000-000000000000"
name: "Stream name is up to 63 characters long"
The uuid
string is used to uniquely identify the stream and must follow the
exact format (36 characters including 4 hyphens) as the example shown. This file
format does not enforce any UUID variant. UUIDs are used as opaque data values
to ensure streams are uniquely identified.
The name
field is used to give the stream a textual name and might be
present in logs. It is only used for convenience and it is not used to uniquely
identify the stream. The configuration file may use utf-8 encoding for the
stream name and should not be longer than 63 characters.
State control block
The state_control
block collection is used to specify stream state timeouts.
The values must be unsigned integers (32-bit) representing microseconds.
state_control:
timeout_init_to_start: 300000
timeout_start_to_event: 450000
The timeout_init_to_start
mapping specifies the timeout between the
stream init and the stream start messages. Zero indicates no timeout.
The timeout_start_to_event
mapping specifies the timeout between the
stream start and the first stream event message in microseconds. Must not be
zero.
Event alarms block
The event_alarms
is a block sequence containing one or more mappings that
identify each alarm in the stream.
event_alarms:
- event_id: 0
mode: 0
timeout: 3500105
The event_id
mapping is an unsigned integer (16-bit) which specifies the
event within the stream. Must start from 0 and increments by one without any
gaps.
The mode
mapping specifies the alarm mode. There are 3 possible alarm modes,
both the string and the integer values are allowed:
"ondemand_from_arrival"
or0
"ondemand_from_app"
or1
"periodic"
or2
The timeout
mapping is an unsigned integer (32-bit) value which specifies
the timeout.
Example
Here is an example .csc.yml file with three event alarms:
%YAML 1.2
---
cam_stream_conf_version: "1.0"
metadata:
uuid: "00000000-0000-0000-0000-000000000000"
name: "Stream name is up to 63 characters long"
state_control:
timeout_init_to_start: 300000
timeout_start_to_event: 450000
event_alarms:
- event_id: 0
mode: "ondemand_from_arrival"
timeout: 3500105
- event_id: 1
mode: 1
timeout: 3500205
- event_id: 2
mode: "periodic"
timeout: 3500305