MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / dev_addr_prefix

Method dev_addr_prefix

lrwn/src/netid.rs:82–94  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

80 }
81
82 pub fn dev_addr_prefix(&self) -> DevAddrPrefix {
83 match self.netid_type() {
84 0 => self.get_dev_addr_prefix(1, 6),
85 1 => self.get_dev_addr_prefix(2, 6),
86 2 => self.get_dev_addr_prefix(3, 9),
87 3 => self.get_dev_addr_prefix(4, 11),
88 4 => self.get_dev_addr_prefix(5, 12),
89 5 => self.get_dev_addr_prefix(6, 13),
90 6 => self.get_dev_addr_prefix(7, 15),
91 7 => self.get_dev_addr_prefix(8, 17),
92 _ => panic!("netid_type bug"),
93 }
94 }
95
96 fn get_dev_addr_prefix(&self, prefix_length: u32, nwkid_bits: u32) -> DevAddrPrefix {
97 // type prefix

Callers 7

test_fns_uplinkFunction · 0.80
test_sns_uplinkFunction · 0.80
test_sns_dev_not_foundFunction · 0.80
test_deviceFunction · 0.80
is_net_idMethod · 0.80

Calls 2

get_dev_addr_prefixMethod · 0.80
netid_typeMethod · 0.45

Tested by 6

test_fns_uplinkFunction · 0.64
test_sns_uplinkFunction · 0.64
test_sns_dev_not_foundFunction · 0.64
test_deviceFunction · 0.64