(dev_eui: &EUI64)
| 8 | use lrwn::EUI64; |
| 9 | |
| 10 | pub async fn get_rx_info(dev_eui: &EUI64) -> Result<internal::DeviceGatewayRxInfo, Error> { |
| 11 | let key = redis_key(format!("device:{{{}}}:gwrx", dev_eui)); |
| 12 | |
| 13 | let b: Vec<u8> = redis::cmd("GET") |
| 14 | .arg(key) |
| 15 | .query_async(&mut get_async_redis_conn().await?) |
| 16 | .await |
| 17 | .context("Get rx-info")?; |
| 18 | if b.is_empty() { |
| 19 | return Err(Error::NotFound(dev_eui.to_string())); |
| 20 | } |
| 21 | |
| 22 | Ok(internal::DeviceGatewayRxInfo::decode(&mut Cursor::new(b)).context("Decode rx-info")?) |
| 23 | } |
| 24 | |
| 25 | pub async fn get_rx_info_for_dev_euis( |
| 26 | dev_euis: &[EUI64], |
no test coverage detected