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

Method ack_event

chirpstack/src/integration/mqtt.rs:302–319  ·  view source on GitHub ↗
(
        &self,
        _vars: &HashMap<String, String>,
        pl: &integration::AckEvent,
    )

Source from the content-addressed store, hash-verified

300 }
301
302 async fn ack_event(
303 &self,
304 _vars: &HashMap<String, String>,
305 pl: &integration::AckEvent,
306 ) -> Result<()> {
307 let dev_info = pl
308 .device_info
309 .as_ref()
310 .ok_or_else(|| anyhow!("device_info is None"))?;
311
312 let topic = self.get_event_topic(&dev_info.application_id, &dev_info.dev_eui, "ack")?;
313 let b = match self.json {
314 true => serde_json::to_vec(&pl)?,
315 false => pl.encode_to_vec(),
316 };
317
318 self.publish_event(&topic, b).await
319 }
320
321 async fn txack_event(
322 &self,

Callers 2

_ack_eventFunction · 0.45
test_mqttFunction · 0.45

Calls 3

as_refMethod · 0.80
get_event_topicMethod · 0.80
publish_eventMethod · 0.45

Tested by 1

test_mqttFunction · 0.36