| 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, |