From b35562761fb5ef4870e20fab7d46d3d1fb1c639f Mon Sep 17 00:00:00 2001
From: Christian Koernig <ckoernig@mail.desy.de>
Date: Mon, 12 Jul 2021 13:26:16 +0200
Subject: [PATCH] Add access to GP Counter and Hardware Buffer Index

---
 python/amptek_hardware_interface/AmptekPX5 | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/python/amptek_hardware_interface/AmptekPX5 b/python/amptek_hardware_interface/AmptekPX5
index 314048c..9d9f913 100644
--- a/python/amptek_hardware_interface/AmptekPX5
+++ b/python/amptek_hardware_interface/AmptekPX5
@@ -612,6 +612,14 @@ class AmptekPX5(Device):
     def IsHardwareBufferingRunning(self, max_age_ms):
         return self.get_status_attribute(max_age_ms, "SequentialBufferRunning")
 
+    @command(dtype_in = float, dtype_out = float)
+    def HardwareBufferingIndex(self, max_age_ms):
+        return self.get_status_attribute(max_age_ms, "SequentialBufferIndex")
+    
+    @command(dtype_in = float, dtype_out = float)
+    def GpCounter(self, max_age_ms):
+        return self.get_status_attribute(max_age_ms, "GpCount")
+        
     @command 
     def ClearAlarm(self):
         self.set_state(DevState.ON)
-- 
GitLab