1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
mod fixed_parameters;

pub use self::fixed_parameters::*;
use super::*;

pub struct AssociationRequestFrame<'a> {
    bytes: &'a [u8],
}

impl<'a> AssociationRequestFrame<'a> {
    pub fn new(bytes: &'a [u8]) -> Self {
        Self { bytes }
    }
}
impl FrameTrait for AssociationRequestFrame<'_> {
    fn bytes(&self) -> &[u8] {
        self.bytes
    }
}
impl FragmentSequenceTrait for AssociationRequestFrame<'_> {}
impl ManagementFrameTrait for AssociationRequestFrame<'_> {}
impl AssociationRequestFixedParametersTrait for AssociationRequestFrame<'_> {}
impl TaggedParametersTrait for AssociationRequestFrame<'_> {
    const TAGGED_PARAMETERS_START: usize = Self::FIXED_PARAMETERS_END;
}

use std::fmt;
impl fmt::Display for AssociationRequestFrame<'_> {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "AssociationRequest")?;

        if let Some(transmitter_address) = self.transmitter_address() {
            write!(f, " tx: {}", transmitter_address)?;
        }

        write!(f, " rx: {}", self.receiver_address())?;

        Ok(())
    }
}