pub(crate) struct OwpSection {Show 20 fields
pub(crate) enabled: bool,
pub(crate) id: String,
pub(crate) bind: String,
pub(crate) server_id: String,
pub(crate) system_label: String,
pub(crate) schema: String,
pub(crate) unwrap_ma_payloads: bool,
pub(crate) xml_baseline: bool,
pub(crate) tls_cert: String,
pub(crate) tls_key: String,
pub(crate) tls_client_ca: String,
pub(crate) max_frame_size: usize,
pub(crate) max_connections: usize,
pub(crate) max_subscriptions: usize,
pub(crate) init_timeout_secs: u64,
pub(crate) idle_timeout_secs: u64,
pub(crate) allowed_origins: Vec<String>,
pub(crate) reconnect: bool,
pub(crate) reconnect_delay_secs: u64,
pub(crate) on_panic: String,
}Expand description
OWP adapter settings.
Off when the section is omitted. A present [owp] table turns it
on unless enabled = false. bind stays a string so
localhost:9000 can be resolved at startup the same way as
127.0.0.1:9000.
Fields§
§enabled: boolWhether to spawn the adapter. true when the section is present.
id: StringEngine adapter id. Defaults to "owp".
bind: StringListen address, host:port. Defaults to 127.0.0.1:9000.
server_id: StringServer identity sent on INIT. Defaults to "oa-gateway-0".
system_label: StringHuman-readable label sent on INIT.
schema: StringProtocol schema string a client INIT must match exactly.
This is not super::UciSection::schema. Empty means no check.
Defaults to "002.5.0".
unwrap_ma_payloads: boolPeel A-GRA Rx/Tx hex wrappers on PUB and fan out wrapper plus inner.
Defaults to true.
xml_baseline: boolConvert OMS JSON ↔ UCI XML at the socket so the engine and ASB see
XML. Requires [uci].schema. Defaults to false.
tls_cert: StringPEM certificate chain served to clients, leaf certificate first.
Empty (the default) leaves the listener plaintext. Requires
tls_key; setting one without the other is a startup error.
tls_key: StringPEM private key for tls_cert, in PKCS#8, PKCS#1, or SEC1 form.
Empty (the default) leaves the listener plaintext. Requires
tls_cert.
tls_client_ca: StringPEM bundle of certificate authorities a client certificate must
chain to. Empty (the default) accepts a client with or without one.
Requires tls_cert/tls_key; once set, a client that cannot
present a certificate from this bundle is refused at the handshake.
max_frame_size: usizeLargest frame accepted from a client, in bytes. Oversized frames end that session. Defaults to the adapter crate’s limit.
max_connections: usizeConnections served at once. Further ones are closed on accept.
max_subscriptions: usizeSubscriptions one connection may hold. A SUB past the limit is refused and the session continues.
init_timeout_secs: u64Seconds from an accepted connection to a successful INIT before it
is closed. 0 disables. Defaults to 30.
idle_timeout_secs: u64Seconds with no frame in either direction on an active session
before it is closed. 0 disables. Defaults to 600.
allowed_origins: Vec<String>Exact Origin header values accepted at the WebSocket handshake.
Empty (the default) accepts any origin; a non-empty list refuses a
handshake whose Origin is not one of these with 403.
reconnect: boolRebind and accept again after the accept loop ends or panics.
Defaults to false: an existing deployment sees no behavior
change until it opts in.
reconnect_delay_secs: u64Seconds to wait between rebind attempts. Defaults to 1.
on_panic: Stringabort or reconnect when the accept loop panics. Defaults to
"abort".
Implementations§
Source§impl OwpSection
impl OwpSection
Sourcepub(crate) fn on_panic_mode(&self) -> Result<OnPanic, String>
pub(crate) fn on_panic_mode(&self) -> Result<OnPanic, String>
Parses Self::on_panic into [oa_gateway_adapter::OnPanic].
§Errors
Returns an error if the string is not abort or reconnect.