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

Method get_device_data

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

Source from the content-addressed store, hash-verified

342 }
343
344 async fn get_device_data(&mut self) -> Result<()> {
345 trace!("Getting device data");
346
347 let dev_eui = self.device.as_ref().unwrap().dev_eui;
348 let (_, app, t, dp) = get_all_device_data(dev_eui).await?;
349
350 if dp.region != self.uplink_frame_set.region_common_name {
351 return Err(anyhow!("Invalid device-profile region"));
352 }
353
354 self.tenant = Some(t);
355 self.application = Some(app);
356 self.device_profile = Some(dp);
357
358 Ok(())
359 }
360
361 fn set_region_config(&mut self) -> Result<()> {
362 trace!("Setting region_config");

Callers 2

_handleMethod · 0.45
_handle_relayedMethod · 0.45

Calls 3

get_all_device_dataFunction · 0.85
unwrapMethod · 0.80
as_refMethod · 0.80

Tested by

no test coverage detected