(ufs: UplinkFrameSet)
| 83 | } |
| 84 | |
| 85 | pub async fn _handle(ufs: UplinkFrameSet) -> Result<()> { |
| 86 | let mut ctx = Data { |
| 87 | phy_payload: ufs.phy_payload.clone(), |
| 88 | uplink_frame_set: ufs, |
| 89 | relay_context: None, |
| 90 | f_cnt_up_full: 0, |
| 91 | reset: false, |
| 92 | retransmission: false, |
| 93 | tenant: None, |
| 94 | device: None, |
| 95 | device_profile: None, |
| 96 | application: None, |
| 97 | device_info: None, |
| 98 | relay_rx_info: None, |
| 99 | uplink_event: None, |
| 100 | must_send_downlink: false, |
| 101 | downlink_mac_commands: Vec::new(), |
| 102 | device_changeset: Default::default(), |
| 103 | region_conf: None, |
| 104 | }; |
| 105 | |
| 106 | ctx.handle_passive_roaming_device().await?; |
| 107 | ctx.get_device_for_phy_payload().await?; |
| 108 | ctx.get_device_data().await?; |
| 109 | ctx.set_region_config()?; |
| 110 | ctx.check_roaming_allowed()?; |
| 111 | |
| 112 | // Add dev_eui to span |
| 113 | let span = tracing::Span::current(); |
| 114 | span.record("dev_eui", ctx.device.as_ref().unwrap().dev_eui.to_string()); |
| 115 | |
| 116 | if !ctx._is_roaming() { |
| 117 | // In case of roaming we do not know the gateways and therefore it must not be |
| 118 | // filtered. |
| 119 | ctx.filter_rx_info_by_tenant().await?; |
| 120 | } |
| 121 | ctx.set_device_info()?; |
| 122 | ctx.set_region_config()?; |
| 123 | if !ctx._is_roaming() { |
| 124 | ctx.set_device_gateway_rx_info()?; |
| 125 | } |
| 126 | ctx.handle_retransmission_reset().await?; |
| 127 | ctx.decrypt_f_opts_mac_commands()?; |
| 128 | ctx.decrypt_frm_payload()?; |
| 129 | ctx.log_uplink_frame_set().await?; |
| 130 | ctx.set_adr()?; |
| 131 | ctx.set_uplink_data_rate().await?; |
| 132 | ctx.handle_class_b_beacon_locked().await?; |
| 133 | ctx.log_uplink_meta().await?; |
| 134 | ctx.reset_channels_on_activation_or_adr_ack_req()?; |
| 135 | ctx.handle_mac_commands().await?; |
| 136 | ctx.append_meta_data_to_uplink_history()?; |
| 137 | ctx.send_uplink_event().await?; |
| 138 | if ctx._is_applayer() { |
| 139 | ctx.handle_applayer().await?; |
| 140 | } |
| 141 | ctx.detect_and_save_measurements().await?; |
| 142 | ctx.sync_uplink_f_cnt()?; |
nothing calls this directly
no test coverage detected