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