pub struct Bip6ClientBuilder { /* private fields */ }ipv6 only.Expand description
BIP6-specific builder that constructs Bip6Transport from IPv6 interface/port/device-instance.
Implementations§
Source§impl Bip6ClientBuilder
impl Bip6ClientBuilder
Sourcepub fn device_instance(self, instance: u32) -> Self
pub fn device_instance(self, instance: u32) -> Self
Set the device instance for VMAC derivation (Annex U.5).
Sourcepub fn apdu_timeout_ms(self, ms: u64) -> Self
pub fn apdu_timeout_ms(self, ms: u64) -> Self
Set APDU timeout in milliseconds.
Sourcepub fn max_apdu_length(self, len: u16) -> Self
pub fn max_apdu_length(self, len: u16) -> Self
Set the maximum APDU length this client accepts.
Sourcepub fn cov_channel_capacity(self, capacity: usize) -> Self
pub fn cov_channel_capacity(self, capacity: usize) -> Self
Set the COV notification broadcast channel capacity.
Source§impl Bip6ClientBuilder
impl Bip6ClientBuilder
Sourcepub async fn build(self) -> Result<BACnetClient<Bip6Transport>, Error>
pub async fn build(self) -> Result<BACnetClient<Bip6Transport>, Error>
Build and start the client, constructing a Bip6Transport from the config.
Sourcepub async fn build_any(self) -> Result<BACnetClient<AnyTransport>, Error>
pub async fn build_any(self) -> Result<BACnetClient<AnyTransport>, Error>
Build and start a configured B/IPv6 client with a transport-erased type.
Uses the same interface, device identity and client options as
Self::build, over the default transport type, AnyTransport.
use bacnet_client::client::BACnetClient;
let mut client: BACnetClient = BACnetClient::bip6_builder()
.device_instance(123)
.build_any().await?;
client.stop().await?;Sourcepub async fn build_into<T>(self) -> Result<BACnetClient<T>, Error>
pub async fn build_into<T>(self) -> Result<BACnetClient<T>, Error>
Build and start a configured B/IPv6 client over any transport type a
Bip6Transport converts into (#2071). Self::build_any is this
with AnyTransport.
Source§impl Bip6ClientBuilder
impl Bip6ClientBuilder
Sourcepub fn foreign_device(self, config: Bip6ForeignDeviceConfig) -> Self
pub fn foreign_device(self, config: Bip6ForeignDeviceConfig) -> Self
Make the client a foreign device of a B/IPv6 BBMD (Annex U.4.5),
which then carries its broadcasts. Needs
Self::device_instance; the build fails without one, or when the
registration fails Bip6ForeignDeviceConfig::check.
Sourcepub fn event_channel_capacity(self, capacity: usize) -> Self
pub fn event_channel_capacity(self, capacity: usize) -> Self
Set the independent event notification broadcast channel capacity.
Sourcepub fn apdu_retries(self, retries: u8) -> Self
pub fn apdu_retries(self, retries: u8) -> Self
Set the number of APDU retries before a confirmed request times out.
Sourcepub fn min_request_interval_ms(self, ms: u64) -> Self
pub fn min_request_interval_ms(self, ms: u64) -> Self
Set the least time, in milliseconds, from the latest confirmed
request to a destination finishing to the next being sent (default
0: no pacing; at most an hour). See
ClientConfig::min_request_interval_ms.
Sourcepub fn max_segments(self, max_segments: Option<u8>) -> Self
pub fn max_segments(self, max_segments: Option<u8>) -> Self
Set the maximum number of APDU segments this client accepts.
Values 0 and 1 fail at build time. Other finite non-rung values are conservatively rounded down in Confirmed-Request headers.
Sourcepub fn segmented_response_accepted(self, accepted: bool) -> Self
pub fn segmented_response_accepted(self, accepted: bool) -> Self
Set whether this client accepts segmented responses.
Sourcepub fn proposed_window_size(self, window_size: u8) -> Self
pub fn proposed_window_size(self, window_size: u8) -> Self
Set the proposed segmented-transfer window size.
Sourcepub fn confirmed_cov_notification_ack_policy<F>(self, policy: F) -> Self
pub fn confirmed_cov_notification_ack_policy<F>(self, policy: F) -> Self
Set the response policy for decoded ConfirmedCOVNotifications.