From 16151f207ecd8226ab032dff050f06a75fe3d703 Mon Sep 17 00:00:00 2001
From: Mads Jakobsen <mads.jakobsen@xfel.eu>
Date: Tue, 11 Mar 2025 15:16:59 +0100
Subject: [PATCH] adding sample output with logging for debugging purposes

---
 .../src/onlinemid_karabo/processor.py          | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/karabo_devices/shared_mem_processor/src/onlinemid_karabo/processor.py b/karabo_devices/shared_mem_processor/src/onlinemid_karabo/processor.py
index 240ce95..61c28d7 100644
--- a/karabo_devices/shared_mem_processor/src/onlinemid_karabo/processor.py
+++ b/karabo_devices/shared_mem_processor/src/onlinemid_karabo/processor.py
@@ -111,11 +111,25 @@ class OnlineMIDProcessor(TrainMatcher.TrainMatcher):
             .defaultValue(True)
             .commit(),
 
+            NODE_ELEMENT(expected)
+            .key("debug")
+            .displayname("Debug")
+            .commit(),
+
+            SLOT_ELEMENT(expected)
+            .key("triggerSampleOutput")
+            .displayedName("send test data over pipeline")
+            .description("send test data")
+            .commit(),
+
+
             OUTPUT_CHANNEL(expected)
             .key("plots")
             .dataSchema(preview_schema())
             .commit(),
 
+
+
         )
         
     def __init__(self, config):
@@ -130,7 +144,7 @@ class OnlineMIDProcessor(TrainMatcher.TrainMatcher):
         # expose the get xpcs settings function
         self.KARABO_SLOT(self.get_OnlineMIDSettings)
         self.KARABO_SLOT(self.triggerSampleOutput)
-
+        self.registerSlot(self.triggerSampleOutput)
 
         ### XPCS specific variables
         self.online_processing_memory = None
@@ -296,6 +310,8 @@ class OnlineMIDProcessor(TrainMatcher.TrainMatcher):
 
     my_generated_train_id = 21249888900
     def triggerSampleOutput(self):
+
+        self.log.INFO("generating sample output")
         print("generating sample output")
         myGroupName = self.get('deviceId')[-2:]
         
-- 
GitLab