(dev_eui: &EUI64)
| 292 | } |
| 293 | |
| 294 | pub async fn get(dev_eui: &EUI64) -> Result<Device, Error> { |
| 295 | let d = device::dsl::device |
| 296 | .find(&dev_eui) |
| 297 | .first(&mut get_async_db_conn().await?) |
| 298 | .await |
| 299 | .map_err(|e| Error::from_diesel(e, dev_eui.to_string()))?; |
| 300 | Ok(d) |
| 301 | } |
| 302 | |
| 303 | // Return the device-session matching the given PhyPayload. This will fetch all device-session |
| 304 | // associated with the used DevAddr and based on f_cont and mic, decides which one to use. |