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

Method handle_class_b_beacon_locked

chirpstack/src/uplink/data.rs:684–707  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

682 }
683
684 async fn handle_class_b_beacon_locked(&mut self) -> Result<()> {
685 trace!("Handle Class-B beacon locked");
686 let dev = self.device.as_mut().unwrap();
687 let dp = self.device_profile.as_ref().unwrap();
688
689 let mut enabled_class = dev.enabled_class;
690
691 if dp.supports_class_b
692 && let lrwn::Payload::MACPayload(pl) = &self.phy_payload.payload
693 {
694 let locked = pl.fhdr.f_ctrl.class_b;
695 enabled_class = match locked {
696 true => DeviceClass::B,
697 false => DeviceClass::A,
698 };
699 }
700
701 // Update if the enabled class has changed.
702 if dev.enabled_class != enabled_class {
703 self.device_changeset.enabled_class = Some(enabled_class);
704 }
705
706 Ok(())
707 }
708
709 async fn log_uplink_meta(&self) -> Result<()> {
710 trace!("Logging uplink meta");

Callers 2

_handleMethod · 0.80
_handle_relayedMethod · 0.80

Calls 2

unwrapMethod · 0.80
as_refMethod · 0.80

Tested by

no test coverage detected