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

Method save_downlink_frame

chirpstack/src/downlink/join.rs:568–585  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

566 }
567
568 async fn save_downlink_frame(&self) -> Result<()> {
569 trace!("Saving downlink frame");
570 let ds = self.device.get_device_session()?;
571
572 let df = chirpstack_api::internal::DownlinkFrame {
573 dev_eui: self.device.dev_eui.to_be_bytes().to_vec(),
574 downlink_id: self.downlink_frame.downlink_id,
575 downlink_frame: Some(self.downlink_frame.clone()),
576 nwk_s_enc_key: ds.nwk_s_enc_key.clone(),
577 ..Default::default()
578 };
579
580 downlink_frame::save(&df)
581 .await
582 .context("Saving downlink-frame error")?;
583
584 Ok(())
585 }
586
587 async fn save_downlink_frame_relayed(&self) -> Result<()> {
588 trace!("Saving ForwardDownlinkReq frame");

Callers 1

_handleMethod · 0.45

Calls 4

get_device_sessionMethod · 0.80
saveFunction · 0.50
to_vecMethod · 0.45
to_be_bytesMethod · 0.45

Tested by

no test coverage detected