pcdshub / pytmc

Generate EPICS IOCs and records from TwinCAT projects - along with many TwinCAT project tools
https://pcdshub.github.io/pytmc/
Other
10 stars 11 forks source link

Investigate type alias bugs and figure out desired behavior for basic types #314

Open ZLLentz opened 1 year ago

ZLLentz commented 1 year ago

See discussion in https://github.com/pcdshub/pytmc/pull/311

After that PR, pytmc picks up on and happily tries to make records out of aliased types. That is, if you have a type definition that is just a thin alias on e.g. a user defined and pytmc'd struct, it will create the relevant records now.

Here's the twincat docs page on type aliases: https://infosys.beckhoff.com/english.php?content=../content/1033/tc3_plc_intro/3928317323.html&id=

Pytmc here still doesn't quite work for built-in and basic types. For example, pytmc will now know to make records out of pragma'd AMSNETID instances (ARRAY[0..5] OF BOOL) but will fail to figure out which record should be built.

There's some discussion in the linked thread about what record to build and how to accomplish this.