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

Function get_rx_info

chirpstack/src/storage/device_gateway.rs:10–23  ·  view source on GitHub ↗
(dev_eui: &EUI64)

Source from the content-addressed store, hash-verified

8use lrwn::EUI64;
9
10pub 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
25pub async fn get_rx_info_for_dev_euis(
26 dev_euis: &[EUI64],

Callers 1

runFunction · 0.85

Calls 4

redis_keyFunction · 0.85
get_async_redis_connFunction · 0.85
to_stringMethod · 0.80
decodeFunction · 0.50

Tested by

no test coverage detected