From b99155c9ed6c574d1762ae8e6730926d182e9026 Mon Sep 17 00:00:00 2001 From: Nicolas Buffon Date: Thu, 10 Sep 2026 16:08:32 +0200 Subject: [PATCH] rust: CAM GeoTopic creation shorthand function Signed-off-by: Nicolas Buffon --- rust/src/transport/mqtt/geo_topic.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/rust/src/transport/mqtt/geo_topic.rs b/rust/src/transport/mqtt/geo_topic.rs index 4296b8e22..27f227b23 100644 --- a/rust/src/transport/mqtt/geo_topic.rs +++ b/rust/src/transport/mqtt/geo_topic.rs @@ -52,6 +52,21 @@ pub struct GeoTopic { } impl GeoTopic { + pub fn cam( + configuration: &GeoConfiguration, + component_name: &str, + geo_extension: &Quadkey, + ) -> Self { + Self { + prefix: String::from(&configuration.prefix), + queue: Queue::In, + suffix: String::from(&configuration.suffix), + message_type: MessageType::CAM, + uuid: component_name.to_string(), + geo_extension: Quadkey::from(geo_extension), + } + } + pub fn denm( configuration: &GeoConfiguration, component_name: &str,