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

Method _handle

chirpstack/src/downlink/join.rs:65–96  ·  view source on GitHub ↗
(
        downlink_id: u32,
        ufs: &UplinkFrameSet,
        tenant: &tenant::Tenant,
        device: &mut device::Device,
        join_accept: &PhyPayload,
    )

Source from the content-addressed store, hash-verified

63 }
64
65 async fn _handle(
66 downlink_id: u32,
67 ufs: &UplinkFrameSet,
68 tenant: &tenant::Tenant,
69 device: &mut device::Device,
70 join_accept: &PhyPayload,
71 ) -> Result<()> {
72 let mut ctx = JoinAccept {
73 uplink_frame_set: ufs,
74 relay_context: None,
75 tenant,
76 device,
77 join_accept,
78 network_conf: config::get_region_network(&ufs.region_config_id)?,
79 region_conf: region::get(&ufs.region_config_id)?,
80
81 downlink_frame: chirpstack_api::gw::DownlinkFrame {
82 downlink_id,
83 ..Default::default()
84 },
85 downlink_gateway: None,
86 };
87
88 ctx.set_device_gateway_rx_info()?;
89 ctx.select_downlink_gateway()?;
90 ctx.set_tx_info()?;
91 ctx.set_downlink_frame()?;
92 ctx.save_downlink_frame().await?;
93 ctx.send_join_accept_response().await?;
94
95 Ok(())
96 }
97
98 async fn _handle_relayed(
99 downlink_id: u32,

Callers

nothing calls this directly

Calls 8

get_region_networkFunction · 0.85
getFunction · 0.50
set_tx_infoMethod · 0.45
set_downlink_frameMethod · 0.45
save_downlink_frameMethod · 0.45

Tested by

no test coverage detected