Requirements#

KVS Requirements
status: valid
security: NO
safety: ASIL_B
tags: kvs
version: 1

Component Requirements#

Key Naming
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall accept keys that consist solely of alphanumeric characters, underscores, or dashes.

Key Uniqueness
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall guarantee that each key is unique.

Key Length
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall limit the maximum length of a key to 32 bytes.

Value Data Types
status: valid
security: NO
safety: ASIL_B

The component shall accept only values of the following data types: Number, String, Null, Array[Value], or Dictionary{Key:Value}.

Value Serialization
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall serialize and deserialize all values to and from JSON.

Value Length
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall limit the maximum length of a value to 1024 bytes.

Value Default
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
testlink: TestDefaultValues__test_valid[optional-cpp] (passed); TestDefaultValues__test_valid[required-cpp] (passed); TestDefaultValues__test_valid[without-cpp] (passed); TestRemoveKey__test_valid[optional-cpp] (passed); TestRemoveKey__test_valid[required-cpp] (passed); TestRemoveKey__test_valid[without-cpp] (passed); TestMalformedDefaultsFile__test_invalid[optional-cpp] (passed); TestMalformedDefaultsFile__test_invalid[required-cpp] (passed); TestMissingDefaultsFile__test_invalid[required-cpp] (passed); TestResetAllKeys__test_valid[optional-cpp] (passed); TestResetAllKeys__test_valid[required-cpp] (passed); TestResetSingleKey__test_valid[optional-cpp] (passed); TestResetSingleKey__test_valid[required-cpp] (passed); TestChecksumOnProvidedDefaults__test_valid[optional-cpp] (passed); TestChecksumOnProvidedDefaults__test_valid[required-cpp] (passed); TestDefaultValues__test_valid[optional-rust] (passed); TestDefaultValues__test_valid[required-rust] (passed); TestDefaultValues__test_valid[without-rust] (passed); TestRemoveKey__test_valid[optional-rust] (passed); TestRemoveKey__test_valid[required-rust] (passed); TestRemoveKey__test_valid[without-rust] (passed); TestMalformedDefaultsFile__test_invalid[optional-rust] (passed); TestMalformedDefaultsFile__test_invalid[required-rust] (passed); TestMissingDefaultsFile__test_invalid[required-rust] (passed); TestResetAllKeys__test_valid[optional-rust] (passed); TestResetAllKeys__test_valid[required-rust] (passed); TestResetSingleKey__test_valid[optional-rust] (passed); TestResetSingleKey__test_valid[required-rust] (passed); TestChecksumOnProvidedDefaults__test_valid[optional-rust] (passed); TestChecksumOnProvidedDefaults__test_valid[required-rust] (passed)
version: 1

The component shall support unset values and shall provide a default value when a value is unset.

Value Reset
status: valid
security: NO
safety: ASIL_B

The component shall allow resetting a value to its default if a default is defined.

Default Value Datatypes
status: valid
security: NO
safety: ASIL_B

The component shall accept default values of only permitted value data types.

Default Value Config
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
testlink: TestDefaultValues__test_valid[optional-cpp] (passed); TestDefaultValues__test_valid[required-cpp] (passed); TestDefaultValues__test_valid[without-cpp] (passed); TestRemoveKey__test_valid[optional-cpp] (passed); TestRemoveKey__test_valid[required-cpp] (passed); TestRemoveKey__test_valid[without-cpp] (passed); TestMalformedDefaultsFile__test_invalid[optional-cpp] (passed); TestMalformedDefaultsFile__test_invalid[required-cpp] (passed); TestMissingDefaultsFile__test_invalid[required-cpp] (passed); TestResetAllKeys__test_valid[optional-cpp] (passed); TestResetAllKeys__test_valid[required-cpp] (passed); TestResetSingleKey__test_valid[optional-cpp] (passed); TestResetSingleKey__test_valid[required-cpp] (passed); TestChecksumOnProvidedDefaults__test_valid[optional-cpp] (passed); TestChecksumOnProvidedDefaults__test_valid[required-cpp] (passed); TestDefaultValues__test_valid[optional-rust] (passed); TestDefaultValues__test_valid[required-rust] (passed); TestDefaultValues__test_valid[without-rust] (passed); TestRemoveKey__test_valid[optional-rust] (passed); TestRemoveKey__test_valid[required-rust] (passed); TestRemoveKey__test_valid[without-rust] (passed); TestMalformedDefaultsFile__test_invalid[optional-rust] (passed); TestMalformedDefaultsFile__test_invalid[required-rust] (passed); TestMissingDefaultsFile__test_invalid[required-rust] (passed); TestResetAllKeys__test_valid[optional-rust] (passed); TestResetAllKeys__test_valid[required-rust] (passed); TestResetSingleKey__test_valid[optional-rust] (passed); TestResetSingleKey__test_valid[required-rust] (passed); TestChecksumOnProvidedDefaults__test_valid[optional-rust] (passed); TestChecksumOnProvidedDefaults__test_valid[required-rust] (passed)
version: 1

The component shall allow configuration of default values in code or in a separate configuration file.

Default Value Checksum
status: valid
security: NO
safety: ASIL_B

The component shall secure the configuration file for default values with an associated checksum file when default values are stored in a file.

Constraint Configuration
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall allow configuration of KVS constraints at compile-time using source code constants or at runtime using a configuration file.

Concurrency
status: valid
security: NO
safety: ASIL_B

The component shall implement thread-safe mechanisms to enable concurrent access to data without data races.

Multi-Instance
status: valid
security: NO
safety: ASIL_B

The component shall manage all runtime variables within an instance to enable creation and use of multiple KVS instances concurrently within a single software architecture element.

Persistent Data Storage Components
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall use the file API and the JSON data format to persist data.

Persistent Data Storage Checksum Write
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall generate a checksum for each data file and shall store it alongside the data.

Persistent Data Storage Checksum Verify
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall verify the checksum when loading data.

Persistent Data Storage Backend
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall use the file API to persist data.

Persistent Data Storage Format
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall use the JSON data format to persist data.

Persistent Data Versioning
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall not provide built-in versioning.

Persistent Data Schema
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall use a JSON file storage format that enables the application to implement versioning, including upgrade and downgrade paths, as needed.

Maximum Number of Snapshots
status: valid
security: NO
safety: ASIL_B
tags: valid, kvs
reqtype: Functional
version: 1

The component shall maintain a configurable maximum number of snapshots. The maximum number shall be in the range <0..3>. A value of zero shall disable snapshot operations. A non-zero value shall specify the maximum number of snapshots. Default value shall be: 3.

Snapshot Create API
status: valid
security: NO
safety: ASIL_B
tags: valid, kvs
reqtype: Functional
version: 1

The component shall provide an API for creating snapshots. The API shall accept an argument that selects a snapshot slot by index. The API should return an error when provided slot index is out of range. See Snapshot Maximum Number (comp_req__kvs__snapshot_max_num).

Note

A snapshot is a point-in-time, frozen view of all values in a key-value storage.

Snapshot Create
status: valid
security: NO
safety: ASIL_B
tags: valid, kvs
reqtype: Functional
version: 1

The component shall create a new snapshot in the selected snapshot slot when the slot is empty.

Snapshot Overwrite
status: valid
security: NO
safety: ASIL_B
tags: valid, kvs
reqtype: Functional
version: 1

The component shall overwrite the selected snapshot slot when the slot is occupied.

Snapshot Restore API
status: valid
security: NO
safety: ASIL_B
tags: valid, kvs
reqtype: Functional
version: 1

The component shall provide an API for restoring snapshots. The API shall accept an argument that selects a snapshot slot by index. The function shall return an error when the referenced snapshot slot is free. The API should return an error when provided slot index is out of range. See Snapshot Maximum Number (comp_req__kvs__snapshot_max_num).

Snapshot Remove API
status: valid
security: NO
safety: ASIL_B
tags: valid, kvs
reqtype: Functional
version: 1

The component shall provide an API for removing snapshots. The API shall accept an argument that selects a snapshot slot by index. The function shall return an error when the referenced slot is free. The API should return an error when provided slot index is out of range. See Snapshot Maximum Number (comp_req__kvs__snapshot_max_num).

Explicit Snapshot Operations
status: valid
security: NO
safety: ASIL_B

The component shall perform snapshot creation, restoration, and deletion only when explicitly triggered by the user through the corresponding APIs.

Snapshot Slot Indexing
status: valid
security: NO
safety: ASIL_B
tags: valid, kvs
reqtype: Functional
version: 1

The component shall identify snapshot slots by a zero-based index, where the first slot has index 0, the second slot has index 1, and so on.

Snapshot Data Source
status: valid
security: NO
safety: ASIL_B
tags: valid, kvs
reqtype: Functional
version: 1

The component shall use the live values set by the user, regardless of whether the values have been flushed to disk.

Snapshot Slot Free Query API
status: valid
security: NO
safety: ASIL_B
tags: valid, kvs
reqtype: Functional
version: 1

The component shall provide an API to check whether a slot identified by a snapshot index is free or occupied. The API should return an error when provided slot index is out of range. See Snapshot Maximum Number (comp_req__kvs__snapshot_max_num).

Snapshot Creation
status: invalid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall create a snapshot each time data is stored.

Note

This requirement is invalid after change of snapshot handling (see #436)

Snapshot Maximum Number
status: invalid
security: NO
safety: ASIL_B

The component shall maintain a configurable maximum number of snapshots.

Note

This requirement is invalid after change of snapshot handling (see #436)

Snapshot IDs
status: invalid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall assign the ID 1 to the newest snapshot and shall increment the IDs of older snapshots accordingly.

Note

This requirement is invalid after change of snapshot handling (see #436)

Snapshot Rotation
status: invalid
security: NO
safety: ASIL_B

The component shall rotate and delete the oldest snapshot when the maximum number is reached.

Note

This requirement is invalid after change of snapshot handling (see #436)

Snapshot Restore
status: invalid
security: NO
safety: ASIL_B

The component shall allow restoration of a snapshot by its ID.

Note

This requirement is invalid after change of snapshot handling (see #436)

Snapshot Deletion
status: invalid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall allow deletion of individual snapshots.

Note

This requirement is invalid after change of snapshot handling (see #436)

Engineering Mode
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall provide an engineering mode that can be enabled during build time to display debugging and internal information.

Field Mode
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall provide a field mode that can be enabled during build time to restrict access as much as possible.

Async API
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall provide an asynchronous API in addition to the standard API.

Permission Control
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall rely on the underlying filesystem for access and permission management and shall not implement its own access or permission controls.

Permission Error Handling
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall report any access or permission errors encountered at the filesystem level to the application.

Callback Support
status: valid
security: NO
safety: ASIL_B
tags: inspected, kvs
reqtype: Functional
version: 1

The component shall provide an API for registering callbacks that are triggered by data change events.

Assumption of Use Requirements#

none

Environmental Requirements#

none