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

Method status_event

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

Source from the content-addressed store, hash-verified

357 }
358
359 async fn status_event(
360 &self,
361 _vars: &HashMap<String, String>,
362 pl: &integration::StatusEvent,
363 ) -> Result<()> {
364 let dev_info = pl
365 .device_info
366 .as_ref()
367 .ok_or_else(|| anyhow!("device_info is None"))?;
368
369 let topic = self.get_event_topic(&dev_info.application_id, &dev_info.dev_eui, "status")?;
370 let b = match self.json {
371 true => serde_json::to_vec(&pl)?,
372 false => pl.encode_to_vec(),
373 };
374
375 self.publish_event(&topic, b).await
376 }
377
378 async fn location_event(
379 &self,

Callers 2

_status_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