pyads
pyads copied to clipboard
Added feature for processing nested structures
Enables processing for nested structures, as mentioned in and fixes #308 and on Stackoverflow. Takes into account nested structures in the following form:
substructure_def = (
("iVar", pyads.PLCTYPE_INT, 1),
("sVar", pyads.PLCTYPE_STRING, 1)
)
structure_def = (
("iVar1", pyads.PLCTYPE_INT, 1),
("structVar", substructure_def, 2)
)
or
structure_def = (
("iVar1", pyads.PLCTYPE_INT, 1),
("structVar",
(
("iVar", pyads.PLCTYPE_INT, 1),
("sVar", pyads.PLCTYPE_STRING, 1)
), 2
)
)
Contains adaptations to size_of_structure()
, dict_from_bytes()
and bytes_from_dict()
and the associated tests.