Skip to content

Add Toroid device support and update WireMetadata for charge toroids#33

Open
kabanaty wants to merge 2 commits into
slaclab:mainfrom
kabanaty:charge-toroids
Open

Add Toroid device support and update WireMetadata for charge toroids#33
kabanaty wants to merge 2 commits into
slaclab:mainfrom
kabanaty:charge-toroids

Conversation

@kabanaty

Copy link
Copy Markdown
Collaborator

This pull request adds support for Toroid devices to the codebase, enabling their creation, management, and integration with existing device handling infrastructure. The main changes include the implementation of the Toroid class and its supporting classes, updates to the device reader logic, and minor enhancements to related metadata structures.

Toroid device support:

  • Added a new Toroid class in slac_devices/toroid.py, along with supporting classes ToroidPVSet, ToroidControlInformation, and ToroidMetadata. These handle Toroid-specific process variables, control information, and metadata, and provide methods for accessing current and buffered TMIT values.
  • Updated slac_devices/reader.py to import the new Toroid class and include "toroids" in the list of recognized device types and the device constructor map.

Device creation enhancements:

  • Added a new create_toroid function to slac_devices/reader.py for instantiating Toroid devices by area and name, with error handling for invalid or missing data.

Metadata improvements:

  • Extended the WireMetadata class in slac_devices/wire.py to include an optional charge_toroids field, allowing wire devices to reference associated Toroids.

@kabanaty
kabanaty requested review from eloise-nebula and nneveu July 24, 2026 19:40

@eloise-nebula eloise-nebula left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. Just one comment. I'm approving. Thank you!

Comment thread slac_devices/reader.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants