Merge branch 'neodoc' into exp
This commit is contained in:
+7
-2
@@ -37,9 +37,11 @@ def signal_byte_size(parent_id, sig_id, sig):
|
|||||||
noe = noe if noe > 0 else 1
|
noe = noe if noe > 0 else 1
|
||||||
nos = 1 if "Samples" not in sig else int(sig["Samples"])
|
nos = 1 if "Samples" not in sig else int(sig["Samples"])
|
||||||
if "Type" not in sig:
|
if "Type" not in sig:
|
||||||
logging.fatal(f"no type defined for signal {parent_id}.{sig_id}")
|
logging.warning(f"no type defined for signal {parent_id}.{sig_id}")
|
||||||
sys.exit(1)
|
if "Type" in sig:
|
||||||
bytes = type_bytes_count(sig["Type"])
|
bytes = type_bytes_count(sig["Type"])
|
||||||
|
else:
|
||||||
|
bytes = type_bytes_count(signal_type(sig)[0])
|
||||||
tot = noe * nod * nos
|
tot = noe * nod * nos
|
||||||
|
|
||||||
if "Ranges" in sig:
|
if "Ranges" in sig:
|
||||||
@@ -51,7 +53,10 @@ def signal_byte_size(parent_id, sig_id, sig):
|
|||||||
|
|
||||||
|
|
||||||
def signal_type(sig):
|
def signal_type(sig):
|
||||||
|
if "Type" in sig:
|
||||||
type_name = sig["Type"]
|
type_name = sig["Type"]
|
||||||
|
else:
|
||||||
|
type_name = "uint32"
|
||||||
noe = int(sig["NumberOfElements"]) if "NumberOfElements" in sig else 1
|
noe = int(sig["NumberOfElements"]) if "NumberOfElements" in sig else 1
|
||||||
nod = int(sig["NumberOfDimensions"]) if "NumberOfDimensions" in sig else 1
|
nod = int(sig["NumberOfDimensions"]) if "NumberOfDimensions" in sig else 1
|
||||||
nod = nod if nod > 0 else 1
|
nod = nod if nod > 0 else 1
|
||||||
|
|||||||
Reference in New Issue
Block a user