Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions devsupApp/src/devsup/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ def _init(iocMain=False):
device(waveform, INST_IO, pydevsupComIn, "Python Device")
device(aai, INST_IO, pydevsupComIn, "Python Device")
device(aao, INST_IO, pydevsupComOut, "Python Device")

device(calcout, INST_IO, pydevsupComOut, "Python Device")

device(int64in, INST_IO, pydevsupComIn, "Python Device")
device(int64out, INST_IO, pydevsupComOut, "Python Device")

device(lsi, INST_IO, pydevsupComIn, "Python Device")
device(lso, INST_IO, pydevsupComOut, "Python Device")
Comment on lines +81 to +85
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use of these record types needs needs to be conditional on epics-base version.

  • lsi & lso: >= 3.15.0.2
  • int64in && int64out: >= 3.16.1

EPICS_VERSION and friends are already imported into this file.

Also, if you are willing. @pheest has pointed out that my usage of NamedTemporaryFile() does not work on Windows. He suggested replacing usage of NamedTemporaryFile() with one or more static .dbd files installed alongside this __init__.py and loaded using a path computed from __file__. This could be combined, or a separate change.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be precise, what didn't work on Windows was opening the file for both write and read.
I resolved the issue by opening the file for write, closing it, re-opening it for read, then deleted it.

But since the file doesn't appear to have any variable content, I don't think there is a reason to use a temporary file.


""".encode('ascii'))
F.flush()
_dbapi.dbReadDatabase(F.name)
Expand Down