pub struct XidParams {
pub max_info_tx: u16,
pub max_info_rx: u16,
pub window_tx: u8,
pub window_rx: u8,
}Expand description
XID parameters negotiated during the SNRM/UA exchange (IEC 62056-46 §6.4.4.4.3.2): the maximum information field length and window size each station uses in each direction.
Encoded on the wire as the SNRM/UA information field:
81 80 <group-len> 05 02 <max_info_tx:u16> 06 02 <max_info_rx:u16> 07 04 <window_tx:u32> 08 04 <window_rx:u32> (big-endian values; the
window fields are 4 octets on the wire though only small values, 1..7,
are meaningful).
Fields§
§max_info_tx: u16Maximum information field length this station will transmit.
max_info_rx: u16Maximum information field length this station will receive.
window_tx: u8Window size (1..7) this station uses when transmitting.
window_rx: u8Window size (1..7) this station uses when receiving.
Implementations§
Source§impl XidParams
impl XidParams
Sourcepub fn client_default() -> Self
pub fn client_default() -> Self
The client’s default ceiling: 1280-octet info fields, window 1.
Sourcepub fn server_default() -> Self
pub fn server_default() -> Self
The server’s default ceiling: 512-octet info fields, window 1.
fn encode(self) -> Vec<u8> ⓘ
Sourcefn decode(data: &[u8]) -> XidParams
fn decode(data: &[u8]) -> XidParams
Decodes XID parameters from an SNRM/UA information field. Fields not
present (or a field whose value is 0, meaning “no opinion”) are left
at 0 so Self::negotiate treats them as absent.