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

ENH: autosave field additions #287

Closed klauer closed 2 years ago

klauer commented 2 years ago

Context

Closes #286

Changes

Helpful whatrecord blurb

import whatrecord
dbd = whatrecord.parse("pytmc/tests/ads.dbd")
for rtyp in ("ai", "ao", "bi", "bo", "mbbi", "mbbo", "longin", "longout", "waveform"):
    print(f"\n\n{rtyp}\n{'-' * len(rtyp)}")
    for name, fld in dbd.record_types[rtyp].fields.items():
        if fld.prompt and "sev" in fld.prompt.lower():
            print(f'"{name}",  # {fld.prompt}')
klauer commented 2 years ago

I think there are some people who would want the enum state names to be autosaved but I think it's correct for that not to be a default.

Right - my thought was that should be opt-in as well.