Lines Matching refs:AddressingMode
37 pub enum AddressingMode(u8) {
44 impl AddressingMode { impl
48 AddressingMode::Absent => 0, in size()
49 AddressingMode::Short => 2, in size()
50 AddressingMode::Extended => 8, in size()
51 AddressingMode::Unknown(_) => 0, // TODO(thvdveld): what do we need to here? in size()
56 impl fmt::Display for AddressingMode { implementation
59 AddressingMode::Absent => write!(f, "Absent"), in fmt()
60 AddressingMode::Short => write!(f, "Short"), in fmt()
61 AddressingMode::Extended => write!(f, "Extended"), in fmt()
62 AddressingMode::Unknown(id) => write!(f, "0b{id:04b}"), in fmt()
246 if matches!(packet.dst_addressing_mode(), AddressingMode::Unknown(_)) { in new_checked()
250 if matches!(packet.src_addressing_mode(), AddressingMode::Unknown(_)) { in new_checked()
306 pub fn dst_addressing_mode(&self) -> AddressingMode { in dst_addressing_mode() argument
310 AddressingMode::from(am) in dst_addressing_mode()
324 pub fn src_addressing_mode(&self) -> AddressingMode { in src_addressing_mode() argument
328 AddressingMode::from(am) in src_addressing_mode()
381 AddressingMode::Absent => None, in dst_pan_id()
382 AddressingMode::Short | AddressingMode::Extended => { in dst_pan_id()
385 AddressingMode::Unknown(_) => None, in dst_pan_id()
394 AddressingMode::Absent => Some(Address::Absent), in dst_addr()
395 AddressingMode::Short => { in dst_addr()
401 AddressingMode::Extended => { in dst_addr()
407 AddressingMode::Unknown(_) => None, in dst_addr()
422 AddressingMode::Absent => None, in src_pan_id()
423 AddressingMode::Short | AddressingMode::Extended => Some(Pan(LittleEndian::read_u16( in src_pan_id()
426 AddressingMode::Unknown(_) => None, in src_pan_id()
435 AddressingMode::Absent => 0, in src_addr()
436 AddressingMode::Short => 2, in src_addr()
437 AddressingMode::Extended => 8, in src_addr()
446 AddressingMode::Absent => Some(Address::Absent), in src_addr()
447 AddressingMode::Short => { in src_addr()
453 AddressingMode::Extended => { in src_addr()
459 AddressingMode::Unknown(_) => None, in src_addr()
632 self.set_dst_addressing_mode(AddressingMode::Extended); in set_dst_pan_id()
642 Address::Absent => self.set_dst_addressing_mode(AddressingMode::Absent), in set_dst_addr()
645 self.set_dst_addressing_mode(AddressingMode::Short); in set_dst_addr()
652 self.set_dst_addressing_mode(AddressingMode::Extended); in set_dst_addr()
662 fn set_dst_addressing_mode(&mut self, value: AddressingMode) { in set_dst_addressing_mode() argument
674 AddressingMode::Absent => 0, in set_src_pan_id()
675 AddressingMode::Short => 2, in set_src_pan_id()
676 AddressingMode::Extended => 8, in set_src_pan_id()
688 AddressingMode::Absent => 0, in set_src_addr()
689 AddressingMode::Short => 2, in set_src_addr()
690 AddressingMode::Extended => 8, in set_src_addr()
697 Address::Absent => self.set_src_addressing_mode(AddressingMode::Absent), in set_src_addr()
700 self.set_src_addressing_mode(AddressingMode::Short); in set_src_addr()
707 self.set_src_addressing_mode(AddressingMode::Extended); in set_src_addr()
717 fn set_src_addressing_mode(&mut self, value: AddressingMode) { in set_src_addressing_mode() argument
940 dst_addressing_mode -> AddressingMode::Short,
942 src_addressing_mode -> AddressingMode::Short,
964 dst_addressing_mode -> AddressingMode::Short,
966 src_addressing_mode -> AddressingMode::Extended,
988 dst_addressing_mode -> AddressingMode::Extended,
990 src_addressing_mode -> AddressingMode::Extended,