pub struct ClientConfig {
pub interface: Ipv4Addr,
pub port: u16,
pub broadcast_address: Ipv4Addr,
pub share_port_by_address: bool,
pub apdu_timeout_ms: u64,
pub apdu_retries: u8,
pub max_apdu_length: u16,
pub max_segments: Option<u8>,
pub segmented_response_accepted: bool,
pub proposed_window_size: u8,
pub min_request_interval_ms: u64,
}Expand description
Client configuration.
Fields§
§interface: Ipv4AddrLocal interface to bind.
port: u16UDP port (0 for ephemeral).
broadcast_address: Ipv4AddrDirected broadcast address.
B/IP only: bind the interface address itself, so transports on other
addresses of this host can share the port (#1538). Off by default.
Needs an explicit interface and a nonzero port; see
BipTransport::set_share_port_by_address for what changes. Only the
B/IP builder reads it; a transport passed to start has its own.
apdu_timeout_ms: u64APDU timeout in milliseconds.
apdu_retries: u8Number of APDU retries.
max_apdu_length: u16Maximum APDU length this client accepts. Each confirmed request advertises the largest valid bucket at or below both this and the transport’s limit at that moment, so it follows a limit that changes after start (#2086).
max_segments: Option<u8>Maximum segments this client accepts (None = unspecified).
Values 0 and 1 are invalid. Finite values between the BACnet wire encodings are conservatively rounded down (for example, 5 advertises 4).
segmented_response_accepted: boolWhether this client accepts segmented responses.
proposed_window_size: u8Proposed window size for segmented transfers (1-127, default 1).
min_request_interval_ms: u64Least time, in milliseconds, from the latest confirmed request sent
to a destination finishing (reply, error or cancellation) to the next
being sent; while it is still outstanding, the next waits that long
after it was sent. A waiting request checks again when it wakes;
requests waiting together go one at a time, in no promised order. A
request given up before it went leaves no trace. 0 (the default)
sends at once. A slow
device then serves its other clients between this client’s requests,
paging a log or polling alike (#1535). Behind a router, whose path
lease every device on that network shares, the pause after a reply
holds for requests made one after another only. At most
MAX_MIN_REQUEST_INTERVAL_MS, an hour; more fails the build. The
endpoint client takes the same setting from its session (#1542).