Probado con bits y otros tipos de datos.
This commit is contained in:
parent
a4bc042b2c
commit
4ef4fa2657
|
@ -160,7 +160,7 @@ def calculate_offsets(db_struct, current_offset=0):
|
||||||
|
|
||||||
value["offset"] = current_offset
|
value["offset"] = current_offset
|
||||||
value["plc_address"] = plc_address # Store the calculated PLC address
|
value["plc_address"] = plc_address # Store the calculated PLC address
|
||||||
print(f"Offset '{current_offset}' at field '{key}' ")
|
# print(f"Offset '{current_offset}' at field '{key}' ")
|
||||||
current_offset += size
|
current_offset += size
|
||||||
|
|
||||||
# Recursively handle nested dictionaries and lists
|
# Recursively handle nested dictionaries and lists
|
||||||
|
@ -183,5 +183,4 @@ def expand_dbs(udts, dbs):
|
||||||
expand_udt_references(db_content, udts)
|
expand_udt_references(db_content, udts)
|
||||||
handle_array_types(db_content)
|
handle_array_types(db_content)
|
||||||
calculate_offsets(db_content)
|
calculate_offsets(db_content)
|
||||||
debug_print_db_struct(db_content)
|
|
||||||
print(f"Completed expansion for DB: {db_name}")
|
print(f"Completed expansion for DB: {db_name}")
|
||||||
|
|
Loading…
Reference in New Issue