(&mut self)
| 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"); |
no test coverage detected