#[non_exhaustive]pub struct ReinitializeContext {
pub state: ReinitializedState,
pub source_mac: MacAddr,
pub source_network: Option<NpduAddress>,
pub provenance: TransportProvenance,
pub invoke_id: u8,
}Expand description
The ReinitializeDevice request a ReinitializeHandler is asked to carry
out, and who sent it.
The addresses are claims, not an authenticated operator. For routed
traffic source_mac is the last router, so restrict routed requesters by
source_network; only direct_sc_identity is
verified. Neither the mutation policy nor the mutation authorizer sees
this service, so a handler that serves only some peers checks them here.
The server builds the context; new lets a test build one
to call a handler directly.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.state: ReinitializedStateThe requested state, one of those Clause 16.4 defines.
source_mac: MacAddrImmediate data-link peer (or router) address.
source_network: Option<NpduAddress>Originating NPDU source when the request was routed.
provenance: TransportProvenanceImmutable ingress snapshot, retained after the admitting connection closes.
invoke_id: u8Confirmed-request invoke identifier.
Implementations§
Source§impl ReinitializeContext
impl ReinitializeContext
Sourcepub fn new(
state: ReinitializedState,
source_mac: MacAddr,
source_network: Option<NpduAddress>,
provenance: TransportProvenance,
invoke_id: u8,
) -> Self
pub fn new( state: ReinitializedState, source_mac: MacAddr, source_network: Option<NpduAddress>, provenance: TransportProvenance, invoke_id: u8, ) -> Self
A context with these fields, for calling a handler outside the server,
such as in its unit tests. Outside bacnet-transport only
TransportProvenance::unverified can be built.
Sourcepub fn direct_sc_identity(&self) -> Option<DirectScIdentity>
pub fn direct_sc_identity(&self) -> Option<DirectScIdentity>
Original verified direct-SC leaf and incarnation, separate from claims.