Detailed Design#
HealthMonitor Detailed Design
|
status: draft
security: NO
safety: ASIL_B
|
||||
Attention
The above directive must be updated according to your Component.
Modify
Your Component Nameto be your Component NameModify
idto be your Component Name in upper snake case preceded bydoc__and followed by_detailed_designAdjust
statusto bevalidAdjust
safetyandtagsaccording to your needs
Detailed Design for Component: HealthMonitor#
Description#
HealthMonitor component consists of these units:
deadline_monitor
heartbeat_monitor
logic_monitor
health_monitor
Implementation structure#
src
├── cpp # C++ implementation, public headers included as score/health_monitor/<file>.h
│ ├── deadline_monitor
│ ├── heartbeat_monitor
│ ├── logic_monitor
│ ├── internal # Worker thread, monitoring logic and thread setup
│ └── supervisor_client # Launch manager alive client and stub backend
└── rust # Rust implementation and its C-compatible FFI
├── deadline
├── heartbeat
├── logic
└── supervisor_api_client
Implementation approach for multi language#
The Health Monitor has two independent implementations with the same monitoring behaviour: Rust in src/rust and C++ in src/cpp.
An application uses the implementation of its own language and links no code of the other.
The Rust implementation also provides a C-compatible Foreign Function Interface (FFI); no C++ code uses it.
Rationale Behind Decomposition into Units#
Note
Reason for split into multiple units could be- - Based on design principles like SOLID, DRY, etc. - Based on design patterns, etc.
Static Diagrams for Unit Interactions#
Dynamic Diagrams for Unit Interactions#
.. dd_dyn:: <Title>
:id: dd_dyn__<Feature>__<Title>
:security: <YES|NO>
:safety: <QM|ASIL_B>
:status: <valid|invalid>
:version: 1
:implements: <link to component requirement id>
:satisfies: <link to component architecture id>
.. image:: <link to drawio image> or .. uml:: assets/<link to plantuml>