From 19bb8652803a2ae3dbc78def2fecf89bad2e0e22 Mon Sep 17 00:00:00 2001 From: Simone Morettini Date: Mon, 5 Feb 2024 16:28:35 +0000 Subject: [PATCH] Fix name to support multiple array per struct --- src/fprime_gds/common/loaders/xml_loader.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/fprime_gds/common/loaders/xml_loader.py b/src/fprime_gds/common/loaders/xml_loader.py index 8a2d612e..397c48e4 100644 --- a/src/fprime_gds/common/loaders/xml_loader.py +++ b/src/fprime_gds/common/loaders/xml_loader.py @@ -261,7 +261,11 @@ def get_serializable_type(self, type_name, xml_obj): type_obj = self.parse_type(memb_type_name, memb, xml_obj) # memb_size is not None for member array if(memb_size is not None): - type_obj = ArrayType.construct_type("Array_"+type_name, type_obj, int(memb_size), fmt_str) + type_obj = ArrayType.construct_type( + f"Array_{type_obj.__name__}_{memb_size}", + type_obj, + int(memb_size), + fmt_str) members.append((name, type_obj, fmt_str, desc))