pub struct TuneArgs {Show 28 fields
pub tagname: String,
pub template: String,
pub process_type: ProcessTypeArg,
pub controller_type: ControllerTypeArg,
pub relay_amp: f32,
pub cycles_skip: Option<u32>,
pub cycles_count: Option<u32>,
pub noise_protection_secs: Option<u32>,
pub driver: DriverKindArg,
pub bridge_host: Option<String>,
pub server: Option<String>,
pub sim_gain: f32,
pub sim_tau: f32,
pub sim_dead_time: f32,
pub sim_noise: f32,
pub sim_seed: u64,
pub sim_initial_pv: f32,
pub sim_initial_mv: f32,
pub pv_range_high: Option<f32>,
pub pv_range_low: Option<f32>,
pub mv_range_high: Option<f32>,
pub mv_range_low: Option<f32>,
pub direction: Option<DirectionArg>,
pub tag_overrides: Option<TagOverrides>,
pub notes: Option<String>,
pub yes: bool,
pub write_pid: Option<ResponseLevelArg>,
pub output: OutputFormat,
}Expand description
Flags shared by tune and (a defaulted subset of) simulate.
Fields§
§tagname: StringPV tag prefix; the rest of the tag set is derived from it using --template’s
suffix convention. Ignored for --driver simulator, which uses two fixed internal
tag names instead.
template: StringDCS/PLC template name (see bhtune template list).
process_type: ProcessTypeArg§controller_type: ControllerTypeArg§relay_amp: f32Relay amplitude, as a percentage of the MV range.
cycles_skip: Option<u32>Relay cycles to skip before counting begins (default: looked up per --process-type).
cycles_count: Option<u32>Relay cycles to count once the skip period ends (default: looked up per
--process-type).
noise_protection_secs: Option<u32>Seconds a switch must persist before it’s accepted (default: looked up per
--process-type).
driver: DriverKindArgWhich driver drives this tune.
bridge_host: Option<String>opcda-bridge gateway address. bhtune connects to the bridge gateway rather than a
DCOM host directly — see AGENTS.md’s OPC DA integration notes. Only meaningful with
--driver opcda (default: crate::config::DEFAULT_BRIDGE_HOST, overridable via the
BHTUNE_BRIDGE_HOST env var or the config file’s bridge_host key).
server: Option<String>OPC DA server ProgID (legacy: -s/--opcServerID). Required with --driver opcda.
sim_gain: f32Simulator process gain (--driver simulator only).
sim_tau: f32Simulator process time constant, in seconds (--driver simulator only).
sim_dead_time: f32Simulator dead time, in seconds (--driver simulator only).
sim_noise: f32Simulator measurement noise amplitude (--driver simulator only).
sim_seed: u64Simulator RNG seed, for reproducible noise (--driver simulator only).
sim_initial_pv: f32Simulator initial PV (--driver simulator only).
sim_initial_mv: f32Simulator initial MV (--driver simulator only).
pv_range_high: Option<f32>Fixed PV range high, overriding a live tag read (legacy: the PV range “toggle
tag/value” button). Required (defaults to 100.0) for --driver simulator, which has
no range tags at all.
pv_range_low: Option<f32>Fixed PV range low, overriding a live tag read.
mv_range_high: Option<f32>Fixed MV range high, overriding a live tag read.
mv_range_low: Option<f32>Fixed MV range low, overriding a live tag read.
direction: Option<DirectionArg>Fixed controller direction, overriding a live tag read.
tag_overrides: Option<TagOverrides>Per-tune replacements for template-derived tag names. This is populated by the HTTP API/UI; the CLI has no separate flags for the nested object.
notes: Option<String>Operator notes to attach to this run. Notes can be edited or cleared from the web GUI while the run is active or after it finishes.
yes: boolConfirm an unattended PID write-back. Required alongside --write-pid – the command
refuses to start otherwise – since writing to a live loop with no human present must
be an explicit, deliberate choice. Has no effect without --write-pid.
write_pid: Option<ResponseLevelArg>Non-interactively write this response level’s calculated PID parameters back to the
DCS instead of prompting on stdin – the flag that makes a scheduled/scripted tune
able to actually update a loop with no one watching. Requires --yes.
output: OutputFormatHow to print this run’s final outcome line.
Trait Implementations§
Source§impl Args for TuneArgs
impl Args for TuneArgs
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl FromArgMatches for TuneArgs
impl FromArgMatches for TuneArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for TuneArgs
impl Parser for TuneArgs
§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for TuneArgs
impl RefUnwindSafe for TuneArgs
impl Send for TuneArgs
impl Sync for TuneArgs
impl Unpin for TuneArgs
impl UnsafeUnpin for TuneArgs
impl UnwindSafe for TuneArgs
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<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].