Requirements#

Bit Manipulation Requirements
status: draft
security: YES
safety: ASIL_B
tags: requirements, bitmanipulation

Functional Requirements#

Support for Bit Operations
status: valid
security: NO
safety: ASIL_B
tags: inspected, baselibs, bitmanipulation
reqtype: Functional

The bit manipulation component shall provide an API for setting, clearing, toggling, and checking individual bits for any integral type up to 64 bits, returning boolean success status.

Support for Byte and Half-Byte Operations
status: valid
security: NO
safety: ASIL_B
tags: inspected, baselibs, bitmanipulation
reqtype: Functional

The bit manipulation component shall provide an API for extracting and setting bytes and half-bytes for any integral type up to 64 bits, returning boolean success status.

Support for Bitmask Operators for Enum Classes
status: valid
security: NO
safety: ASIL_B
tags: inspected, baselibs, bitmanipulation
reqtype: Functional

The bit manipulation library shall provide type-safe bitmask operations for scoped enumeration types.

Bounds and Safety Checks
status: valid
security: NO
safety: ASIL_B
tags: inspected, baselibs, bitmanipulation
reqtype: Functional

The bit manipulation functions shall validate input parameters against bounds and, on out-of-bounds access, shall leave the target value unmodified and return false.

Non-Functional Requirements#

Header-only API
status: valid
security: NO
safety: ASIL_B
tags: inspected, baselibs, bitmanipulation
reqtype: Non-Functional

The bit manipulation API shall be header-only and not require external dependencies.

Assumptions of Use (AoU)#

Integral Type Constraints
status: valid
security: NO
safety: ASIL_B
tags: inspected, baselibs, bitmanipulation
reqtype: Functional

The user shall use bit manipulation functions only with integral types (integers, enumerations) as specified in the library’s type constraints.

Note: Operations on floating-point or non-integral types are not supported.

Bitmask Enum Value Constraints
status: valid
security: NO
safety: ASIL_B
tags: inspected, baselibs, bitmanipulation
reqtype: Functional

The user shall use scoped enumeration types (enum class) whose enumerators are defined as non-zero power-of-two values.

External Synchronization Required for Concurrent Access
status: valid
security: NO
safety: ASIL_B
tags: inspected, baselibs, bitmanipulation
reqtype: Non-Functional

The user shall implement external synchronization mechanisms (e.g., mutexes, atomic operations, or locks) when accessing or modifying the same integral value from multiple threads concurrently.

Note: The library provides no internal thread safety guarantees.