-
Notifications
You must be signed in to change notification settings - Fork 5
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
connectPv exception on IOC start up #1
Comments
It sounds like perhaps autosave is restoring a blank string. Do you have the PvName is your auto_settings.req file? Mark |
I don't think @GDYendell is using autosave. There looks like no sign of autosave calls in the startup script. Cheers, Alan |
In |
That stops it @brunoseivam . No error message and the PvName is correct and reports up. Is this the fix to make, or is it just to diagnose the issue? I guess it would make more sense to just remove the PINI entry. I have this fix on a branch, it would be good if it could be merged into master unless there is a better solution. I am happy to make a PR. |
That's what I think, too. Since the PV name is passed in the constructor, there's no need to have it set again on record loading. A PR would be welcome! |
PR here #2 |
If removing the PINI field will break autosave restoring, then perhaps a better solution would be to stop it overriding the *Config value unless it is explicitly set in autosave. Is this possible? |
It seems to me that the problem is really that the are 2 ways to configure the value at iocInit. The first is by an argument to the costructor and the second is via a record which the user could configure in the database. Why have both? |
@MarkRivers We could in principle get rid of the configuration by passing a PV name to the constructor. But that is an API breakage... This driver is the way it is right now because at first it didn't support changing the PV name at runtime. This functionality was added later. I took a deeper look into it. I think the correct fix is what @GDYendell suggested at first: refusing blank PV names. The monitor creation code already does that check for us and throws an exception when it gets an invalid PV name. The way it is right now, I am preparing a pull request that will check if the monitor creation succeeds first before setting the internal parameters. So having |
That sounds like a good solution. |
See #3 |
I am currently trying to update DLS to ADCore 2-6, plus the other dependencies that come with that.
I have two IOCs, one with a SimDetector and pvaPlugin, the other with a pvaDriver, PosPlugin and HDF5Plugin. It works OK with our most recent internal ADCore 2-4 release. (We imported pvaDriver at this commit DiamondLightSource/ADCore@834944c). The PvName is set, reports up and I am able to get frames and capture an image.
When testing the pvaDriver in its new repository I got the following error:
and on start up, the PvName is empty and reports as Down and I can't get any frames through. Here is the console output where I have added some debug statements; PvName and 4 numbers throughout the connectPv function and the value asked to set in the writeOctet function.
I tried playing with the pvaDriver source to find the problem and it seems like, between pvaDriverConfig() and connectPv() being called a second time, something is calling writeOctet to set PvName to a blank string. I added a check to refuse to set PvName if the value is blank and that seems to fix the issue. The PvName is blank, but reports up and I can get frames and capture an image.
I tried checking out the ADCore 2-6 and pvaDriver 1-1 releases, alongside the DLS configure/ folder and I get the same issue.
and with my check
Any idea what the problem is?
The text was updated successfully, but these errors were encountered: