From 145b1101c972af118f02b650bb7c4d47fefb352f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Povi=C5=A1er?= Date: Sat, 16 Oct 2021 22:33:32 +0200 Subject: [PATCH] m1n1.utils: Add Register32.fields property MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin PoviĊĦer --- proxyclient/m1n1/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proxyclient/m1n1/utils.py b/proxyclient/m1n1/utils.py index 65403db4..555abe73 100644 --- a/proxyclient/m1n1/utils.py +++ b/proxyclient/m1n1/utils.py @@ -234,6 +234,10 @@ class Register(Reloadable, metaclass=RegisterMeta): return val + @property + def fields(self): + return {k: getattr(self, k) for k in self._fields_list} + def str_fields(self): return f"{', '.join(f'{k}={self._field_val(k)}' for k in self._fields_list)}"