From 74f3d5865baa9d20e3e3e7d369a9dd1d9fe90d41 Mon Sep 17 00:00:00 2001
From: Timo Korhonen <timo.korhonen@ess.eu>
Date: Tue, 31 Jan 2023 14:06:31 +0100
Subject: [PATCH] Add info tags to create a NTTable with module names and
 version numbers

---
 require-ess/Db/moduleversion.template | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/require-ess/Db/moduleversion.template b/require-ess/Db/moduleversion.template
index 7907ac81..736c8dda 100644
--- a/require-ess/Db/moduleversion.template
+++ b/require-ess/Db/moduleversion.template
@@ -5,6 +5,9 @@ record(waveform, "$(REQUIRE_IOC):Modules")
     field(NELM, "$(MODULE_COUNT)")
     field(PINI, "YES")
     field(DISP, "1")
+    info(Q:group, {
+        "$(REQUIRE_IOC):LoadedModules":{"value.MODS":{+type:"plain",+channel:"VAL"}}
+    })
 }
 
 record (waveform, "$(REQUIRE_IOC):Versions")
@@ -13,6 +16,9 @@ record (waveform, "$(REQUIRE_IOC):Versions")
     field (FTVL, "STRING")
     field (NELM, "$(MODULE_COUNT)")
     field (PINI, "YES")
+    info(Q:group, {
+        "$(REQUIRE_IOC):LoadedModules":{"value.VERS":{+type:"plain",+channel:"VAL"}}
+    })
 }
 
 record(waveform, "$(REQUIRE_IOC):ModuleVersions")
@@ -40,3 +46,18 @@ record(stringin,"$(REQUIRE_IOC):BaseVersion")
     field(PINI, "YES")
     field(DISP, "1")
 }
+
+# This record contains labels for the created NTTable, named $(REQUIRE_IOC):LoadedModules.
+record(aai, "$(REQUIRE_IOC):Labels") 
+{
+    field(FTVL, "STRING")
+    field(NELM, "2")
+    field(PINI,"YES")
+    field(INP , {const:["Module", "Version"]})
+    info(Q:group, {
+        "$(REQUIRE_IOC):LoadedModules":{
+            +id:"epics:nt/NTTable:1.0",
+            "labels":{+type:"plain", +channel:"VAL"}
+        }
+    })
+}
-- 
GitLab