pub enum TuneOutcome {
Completed,
Aborted,
TimedOut,
PoorQuality,
ActuationFailed,
WriteBackFailed,
RestoreIncomplete,
}Expand description
The final disposition of a tune/simulate run – drives the printed summary (see
[print_summary]) and, via crate::tune_outcome_exit_code in lib.rs, the process’s
exit code.
Variants§
Completed
The test completed. Either no write-back was requested/possible/attempted, or a requested write-back succeeded.
Aborted
The user pressed Ctrl+C; the loop was restored to its original mode/setpoint before returning.
TimedOut
[tuning].timeout_secs elapsed before the engine reported completion; the loop was
restored to its original mode/setpoint before returning, exactly like
TuneOutcome::Aborted
but distinguished so a scheduler’s alerting can tell “this run had to be killed for
running too long” apart from “an operator stopped it on purpose”.
PoorQuality
A driver reported a non-Good OPC quality for a tuning-critical reading – an
initial reading (including the setpoint capture, when the loop starts in Auto) or an
in-flight PV poll sample when the global Config > OPC quality policy rejects
Uncertain (or with the policy enabled, but the quality was
Bad rather than merely Uncertain) – and the run was aborted and the
loop restored before returning, exactly like
TuneOutcome::Aborted/TuneOutcome::TimedOut but distinguished so a scheduler’s
alerting can tell “the plant data itself couldn’t be trusted” apart from either of
those. See safety-quality in AGENTS.md.
ActuationFailed
An accepted OPC DA MV command could not be confirmed before its deadline or before
the engine requested a replacement relay command. The loop was restored before
returning unless TuneOutcome::RestoreIncomplete took precedence.
WriteBackFailed
The test itself completed, but writing the chosen PID parameters back to the DCS
failed (rejected write, failed confirmation readback, or – defensively – a
--write-pid level with no matching calculated result).
RestoreIncomplete
The run ended (via normal completion, Ctrl+C, or a timeout) without being able to
confirm the loop was fully restored to its pre-test mode/MV/setpoint – a second
Ctrl+C arrived while the restore was in flight, or
[tuning].restore_timeout_secs elapsed first. The loop may still be sitting at a
relay-test MV/mode; an operator must check it by hand using the tag/value named in the
warning printed to stderr. See
safety-cancellation in AGENTS.md.
Implementations§
Trait Implementations§
Source§impl Clone for TuneOutcome
impl Clone for TuneOutcome
Source§fn clone(&self) -> TuneOutcome
fn clone(&self) -> TuneOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TuneOutcome
Source§impl Debug for TuneOutcome
impl Debug for TuneOutcome
impl Eq for TuneOutcome
Source§impl PartialEq for TuneOutcome
impl PartialEq for TuneOutcome
Source§fn eq(&self, other: &TuneOutcome) -> bool
fn eq(&self, other: &TuneOutcome) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TuneOutcome
Auto Trait Implementations§
impl Freeze for TuneOutcome
impl RefUnwindSafe for TuneOutcome
impl Send for TuneOutcome
impl Sync for TuneOutcome
impl Unpin for TuneOutcome
impl UnsafeUnpin for TuneOutcome
impl UnwindSafe for TuneOutcome
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].