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

Method join_event

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

Source from the content-addressed store, hash-verified

281 }
282
283 async fn join_event(
284 &self,
285 _vars: &HashMap<String, String>,
286 pl: &integration::JoinEvent,
287 ) -> Result<()> {
288 let dev_info = pl
289 .device_info
290 .as_ref()
291 .ok_or_else(|| anyhow!("device_info is None"))?;
292
293 let topic = self.get_event_topic(&dev_info.application_id, &dev_info.dev_eui, "join")?;
294 let b = match self.json {
295 true => serde_json::to_vec(&pl)?,
296 false => pl.encode_to_vec(),
297 };
298
299 self.publish_event(&topic, b).await
300 }
301
302 async fn ack_event(
303 &self,

Callers 2

_join_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