dpp_calc/repairability/parameters.rs
1//! Input parameters for the simplified, non-regulatory repairability heuristic
2//! (see the module-level note in `repairability/mod.rs` — this is **not** the
3//! enacted EU 2023/1669 Annex IV index).
4
5use serde::{Deserialize, Serialize};
6
7/// Six-parameter repairability inputs for one product.
8///
9/// Each parameter uses a three-level ordinal scale (in the style of EN 45554's
10/// per-criterion scoring, but not a faithful implementation of that standard):
11/// `0` = criterion not met, `1` = criterion partially met, `2` = criterion
12/// fully met. Values outside `[0, 2]` are rejected at calculation time.
13#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14pub struct RepairabilityInputs {
15 /// Ease of product disassembly (fastener types, tools required, destructive entry).
16 /// 0 = non-destructive entry not possible; 1 = possible with non-standard tools;
17 /// 2 = easy with common tools, no irreversible steps.
18 pub disassembly: u8,
19
20 /// Availability of spare parts through OEM and independent aftermarket channels.
21 /// 0 = not available; 1 = available through IAM only or limited SKUs;
22 /// 2 = full OEM + IAM availability for the supported lifetime.
23 pub spare_parts: u8,
24
25 /// Availability of repair and maintenance documentation for professional repairers.
26 /// 0 = none; 1 = limited/partial; 2 = full service manual + schematics publicly available.
27 pub repair_info: u8,
28
29 /// Availability of software diagnostic tools and processes for fault isolation.
30 /// 0 = none; 1 = basic fault codes only; 2 = full diagnostic suite available to repairers.
31 pub diagnostic_tools: u8,
32
33 /// Software and firmware updatability for the duration of the support period.
34 /// 0 = no updates provided; 1 = security patches only; 2 = full OS/firmware + long-term commitment.
35 pub software_updatability: u8,
36
37 /// Customer-related aspects: warranty terms, authorised repair network, support channels.
38 /// 0 = poor (< 1 year warranty, no repair network); 1 = standard; 2 = extended warranty + wide repair network.
39 pub customer_support: u8,
40}