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

Method get_device_data

chirpstack/src/uplink/join.rs:223–239  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

221 }
222
223 async fn get_device_data(&mut self) -> Result<()> {
224 trace!("Getting device data");
225 let jr = self.join_request.as_ref().unwrap();
226
227 let (dev, app, t, dp) = get_all_device_data(jr.dev_eui).await?;
228
229 if dp.region != self.uplink_frame_set.region_common_name {
230 return Err(anyhow!("Invalid device-profile region"));
231 }
232
233 self.tenant = Some(t);
234 self.application = Some(app);
235 self.device_profile = Some(dp);
236 self.device = Some(dev);
237
238 Ok(())
239 }
240
241 // We need to get either the device-keys or a JS client. In any other case, this must return an error.
242 async fn get_device_keys_or_js_client(&mut self) -> Result<()> {

Callers 1

_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