Merge branch 'neodoc' into exp

This commit is contained in:
Martino Ferrari
2026-04-21 18:01:11 +02:00
+7 -2
View File
@@ -37,9 +37,11 @@ def signal_byte_size(parent_id, sig_id, sig):
noe = noe if noe > 0 else 1
nos = 1 if "Samples" not in sig else int(sig["Samples"])
if "Type" not in sig:
logging.fatal(f"no type defined for signal {parent_id}.{sig_id}")
sys.exit(1)
logging.warning(f"no type defined for signal {parent_id}.{sig_id}")
if "Type" in sig:
bytes = type_bytes_count(sig["Type"])
else:
bytes = type_bytes_count(signal_type(sig)[0])
tot = noe * nod * nos
if "Ranges" in sig:
@@ -51,7 +53,10 @@ def signal_byte_size(parent_id, sig_id, sig):
def signal_type(sig):
if "Type" in sig:
type_name = sig["Type"]
else:
type_name = "uint32"
noe = int(sig["NumberOfElements"]) if "NumberOfElements" in sig else 1
nod = int(sig["NumberOfDimensions"]) if "NumberOfDimensions" in sig else 1
nod = nod if nod > 0 else 1