pub struct PidInput {
pub e_body: f32,
pub e_sift: f32,
pub e_mem: f32,
pub e_kernel: f32,
pub trend: f64,
pub classifier_prob: f32,
pub has_bias: bool,
pub detection_flags: u8,
pub pressure: u8,
}Expand description
Aggregate input to the PID composition loop.
Carries normalised error signals from all 4 tiers plus detection sidechain flags for gain modulation.
§Tier provenance
| Field | Tier | Source |
|---|---|---|
e_body | 0 | BodyOutput.error_body |
e_sift | 3 | SifterOutput.error_sift |
e_mem | 2 | MemoryOutput.error_mem |
e_kernel | 1 | KernelOutput.error_kernel |
trend | 2 | WorkingMemory::trend() |
classifier_prob | 3 | SifterOutput.classifier_prob |
has_bias | 3 | SifterOutput.has_bias |
detection_flags | DET | Packed from 6 detectors |
pressure | 0 | BodyOutput.pressure |
§DAL A
All fields must be finite and in expected ranges. PidConfig::validate() is called at construction. Signal normalisation uses saturating casts.
§MC/DC
Each error signal independently affects its corresponding PID term. has_bias independently forces Halt via apply_safety_overrides.
Fields§
§e_body: f32Normalised body pressure error [0.0, 1.0], from BodyOutput.error_body.
e_sift: f32Normalised sifter error [0.0, 1.0], from SifterOutput.error_sift.
e_mem: f32Normalised memory error [0.0, 1.0], from MemoryOutput.error_mem.
e_kernel: f32Normalised kernel error [0.0, 1.0], from KernelOutput.error_kernel.
trend: f64Raw entropy trend from WorkingMemory::trend().
classifier_prob: f32Classifier probability [0.0, 1.0], from SifterOutput.classifier_prob.
has_bias: boolBias flag from SifterOutput.has_bias.
detection_flags: u8Packed detection flags for gain sidechain modulation.
pressure: u8Resource pressure percentage [0, 100], from BodyOutput.pressure.
Implementations§
Source§impl PidInput
impl PidInput
Sourcepub fn new(
e_body: f32,
e_sift: f32,
e_mem: f32,
e_kernel: f32,
trend: f64,
classifier_prob: f32,
has_bias: bool,
detection_flags: u8,
pressure: u8,
) -> Self
pub fn new( e_body: f32, e_sift: f32, e_mem: f32, e_kernel: f32, trend: f64, classifier_prob: f32, has_bias: bool, detection_flags: u8, pressure: u8, ) -> Self
Constructor taking 9 parameters and storing them directly into corresponding struct fields. No validation or transformation performed — raw field assignment. Uses #[allow(clippy::too_many_arguments)] because a builder pattern would require allocation, inappropriate for no_std Tier-2.