Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: set the default pydm protocol to ca, the most-used protocol #173

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

ZLLentz
Copy link
Member

@ZLLentz ZLLentz commented Feb 14, 2024

Description

PyDM has an environment variable, PYDM_DEFAULT_PROTOCOL, that allows you to set a default protocol to use.
This PR sets the default protocol to ca (channel access (EPICS)), which is the most used protocol, allowing us to omit it when building out our screens. This also makes the conversion from edm to pydm smoother.

Motivation and Context

When setting up a pydm channel, you're expected to provide a protocol in the form of a pseudo-url:

ca://MY:PVNAME

If, instead, you just use:

MY:PVNAME

You'll get the following error:

Channel MY:PVNAME did not specify a valid protocol and no default protocol is defined. This channel will receive no data. To specify a default protocol, set the PYDM_DEFAULT_PROTOCOL environment variable.

How Has This Been Tested?

Setting this environment variable helped @patoppermann 's screen load properly (converted from edm)

Where Has This Been Documented?

n/a

Copy link
Contributor

@tangkong tangkong left a comment

Choose a reason for hiding this comment

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

This seems fine to me, I assumed and verified that this doesn't break other screens (in the off chance that this unintelligently appended ca:// to the channel string)

Do we even use other channel types?...

@ZLLentz
Copy link
Member Author

ZLLentz commented Feb 14, 2024

Do we even use other channel types?...

I have occasionally used loc:// and have considered but decided against using calc://.
pva:// exists and has been used as well, but not by me.

@ZLLentz ZLLentz merged commit 1d2afcf into pcdshub:master Feb 14, 2024
@ZLLentz ZLLentz deleted the enh_default_pydm_proto branch February 14, 2024 21:13
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