-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Daniel
This ASCOM Developer thread provides background to the issue.
The attached files provide my implementation of a fix that always requires connected to be true before a device will execute an Alpaca request for an operation or a property. I have followed the BadRequestAlpacaProtocol approach and added the DeviceCannotAcceptOperation() function.
In BaseController.cs I have refactored the ActionResult<> calls to use a common calling thread to BadRequestAlpacaProtocol() and DeviceCannotAcceptOperation()
In DeviceManager.cs I have added an "all devices" dictionary keyed by DeviceType and DeviceID which holds a reference to the device instance as with base type of IAscomDeviceV2 - this enables access to the connected property for all driver types through inheritance.
I've attached my modified files. I've commented out a profile based if statement which could be used with the addition of the profile setting in the usual way.
I've built OmniSim on Windows with these changes and it passes ConformU tests.
Andy