iml130 / pfdl

A Production Flow Description Language for an Order-Centric Production
https://iml130.github.io/pfdl/
MIT License
9 stars 2 forks source link

Missing type_of_elements field in Arrays with values #59

Open FlorianDue opened 1 month ago

FlorianDue commented 1 month ago

When starting a new PFDL with the scheduler, I initially transform the PFDL Structures to OPC UA Data Types.

In this context, I use the list with the custom Structures from Scheduler(...).process.structs generate OPC UA data types out of it. in this context, Array fields of Structures do not provide values (since they are only type definitions and no instances), however, the data type of the array elements can be extracted from the type_of_elements field of the PFDL Struct class:

grafik

However, this information is missing, as soon as i receive input and output parameters from the Service/Task started callbacks. here i use e.g., the task_api.input_parameters provided by the scheduler callback to create OPC UA instances of the required data types. In this context, the type_of_elements field of the PFDL Array type is empty.

grafik

Currently, I use a workaround where i access the first array element (at least in case of Structs, the name field of the Structs inside the array are currently providing the type. i did not check with numeric, string or bool arrays)

Is there a solution on how to provide this information?