Method
location_event
(
&self,
_vars: &HashMap<String, String>,
pl: &integration::LocationEvent,
)
Source from the content-addressed store, hash-verified
| 99 | } |
| 100 | |
| 101 | async fn location_event( |
| 102 | &self, |
| 103 | _vars: &HashMap<String, String>, |
| 104 | pl: &integration::LocationEvent, |
| 105 | ) -> Result<()> { |
| 106 | let dev_info = pl |
| 107 | .device_info |
| 108 | .as_ref() |
| 109 | .ok_or_else(|| anyhow!("device_info is None"))?; |
| 110 | let b = pl.encode_to_vec(); |
| 111 | stream::event::log_event_for_device("location", &dev_info.dev_eui, &b).await |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | #[cfg(test)] |