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

Method txack_event

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

Source from the content-addressed store, hash-verified

319 }
320
321 async fn txack_event(
322 &self,
323 _vars: &HashMap<String, String>,
324 pl: &integration::TxAckEvent,
325 ) -> Result<()> {
326 let dev_info = pl
327 .device_info
328 .as_ref()
329 .ok_or_else(|| anyhow!("device_info is None"))?;
330
331 let topic = self.get_event_topic(&dev_info.application_id, &dev_info.dev_eui, "txack")?;
332 let b = match self.json {
333 true => serde_json::to_vec(&pl)?,
334 false => pl.encode_to_vec(),
335 };
336
337 self.publish_event(&topic, b).await
338 }
339
340 async fn log_event(
341 &self,

Callers 2

_txack_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