From 036e82874a775df8a80c09f06e6b31804b49612e Mon Sep 17 00:00:00 2001 From: Marko Mecina <marko.mecina@univie.ac.at> Date: Tue, 5 Dec 2023 20:20:40 +0100 Subject: [PATCH] add hex property to rawgettersetter --- Ccs/packet_config_ATHENA.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Ccs/packet_config_ATHENA.py b/Ccs/packet_config_ATHENA.py index ac3ba94..15adda8 100644 --- a/Ccs/packet_config_ATHENA.py +++ b/Ccs/packet_config_ATHENA.py @@ -182,6 +182,10 @@ class RawGetterSetter: def raw(self, rawdata): self.bin[:] = rawdata + @property + def hex(self): + return bytes(self.bin).hex(' ').upper() + class PHeaderBits(ctypes.BigEndianStructure): _pack_ = 1 -- GitLab