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

Method set_device_info

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

Source from the content-addressed store, hash-verified

295 }
296
297 fn set_device_info(&mut self) -> Result<()> {
298 let tenant = self.tenant.as_ref().unwrap();
299 let app = self.application.as_ref().unwrap();
300 let dp = self.device_profile.as_ref().unwrap();
301 let dev = self.device.as_ref().unwrap();
302
303 let mut tags = (*app.tags).clone();
304 tags.extend((*dp.tags).clone());
305 tags.extend((*dev.tags).clone());
306
307 self.device_info = Some(integration_pb::DeviceInfo {
308 tenant_id: tenant.id.to_string(),
309 tenant_name: tenant.name.clone(),
310 application_id: app.id.to_string(),
311 application_name: app.name.to_string(),
312 device_profile_id: dp.id.to_string(),
313 device_profile_name: dp.name.clone(),
314 device_name: dev.name.clone(),
315 device_class_enabled: dev.enabled_class.to_proto().into(),
316 dev_eui: dev.dev_eui.to_string(),
317 tags,
318 });
319 Ok(())
320 }
321
322 fn set_relay_rx_info(&mut self) -> Result<()> {
323 let relay_ctx = self.relay_context.as_ref().unwrap();

Callers 2

_handleMethod · 0.45
_handle_relayedMethod · 0.45

Calls 5

unwrapMethod · 0.80
as_refMethod · 0.80
to_stringMethod · 0.80
to_protoMethod · 0.80
intoMethod · 0.45

Tested by

no test coverage detected