LocalServer & Helper.Profile
- Dear all,
I am currently developing an ASCOM driver in C#, based on the LocalServer Template. It contains projects for Telescope and Focuser control.
The driver works as it should but I have troubles to store my data (like COM port) using the Helper.Profile methods.
Using the LocalServer Template, all ID's and ASCOM registration have been removed from the sub-projects, so I don't know how I could use these methods.
Are there any running examples, beside from simulators, which are already using the new V5 templates? This would be very helpful.
> Using the LocalServer Template, all ID's and ASCOM registration have beenOnly the ASCOM registration code should be removed. The ID is still the same,
> removed from the sub-projects, so I don't know how I could use these methods.
ASCOM.Gerald.Telescope and ASCOM.Gerald.Focuser (or whatever). Each
subproject/driver should manage its own SetupDialog() *and* persistent settings.
In other words, the drivers are exactly like they would be if they were
DLL/assembly drivers, except their class *also* derives from
ReferenceCountedObject and their ASCOM registration code is removed. Unless you
want to do something unusual, you don't have to add any code to the LocalServer
itself, only to the (static) shared data class.
And be very careful to lock and serilaize access to that shared data to avoid
- Hi Bob,
thank you for your response. I'll try to implement the Profile methods
with the proper ID's as stated. Or maybe wait until the Platform 5.5
will be released with the re-written utilities :-)
Regarding the SetupDialog I had an eye to the ASCOM standards and
implemented it as you wrote. (eg. no GUI in the LocalServer). The shared
serial port is hard to handle, but with tight timing, locking and
caching it runs quite stable.