API Reference - Version 10 25 11th July 2025
the SlewToAltAz() method. These "can" properties exist only for methods which can't be
directly tested without changing the state of the device.
For example, a client can tell that the mount provides its positional azimuth by trying to read
the Azimuth property; it will either get an answer or a "not implemented" error. However, a
client cannot tell whether a mount can slew to alt/az coordinates without calling the method
and possibly changing the mount’s position. This is why a CanSlewAltAz property is provided
for the SlewToAltAz() method.
7.1.3 Behavioural Rules
Heterogeneous distributed systems require both common standardized APIs and a set of
behavioural rules that must be obeyed by all modules in the system. The implementation of a module
is where these rules are effected, they do not appear in the abstract API definitions themselves.
These behavioural rules are already implemented by ASCOM COM drivers.
ASCOM's modular rules are:
• Do it right or report an error: Fetching or changing a property, or calling a method, must
always result in one of two outcomes: The request must complete successfully, or an error
must be signalled, preferably with some (human readable) indication of why the request
could not be satisfied. An example of violating this rule would be a method call to move a
rotator to a given mechanical angle, but the rotator ends up at some other angle and no
error is reported to the caller.
• Retries prohibited: No module must ever depend on another to provide timeouts or retry
logic. If a device needs check-and-retry logic in its routine operation, that logic must be
contained within the module itself. If there's a problem and your module’s own retry logic
can’t resolve the issue report the error as required above.
• Independence of operations: To the extent possible with the device, each API operation
should be independent of the others. For example, don’t impose a specific call order such as
needing to fetch the positional right ascension of a mount immediately before fetching the
declination.
• Timing Independence: To the extent possible with the device, modules must not place
timing constraints on properties and methods. Implement asynchronous calls wherever
possible in order not to lock up clients unnecessarily.
• Self-Protection – Over Use: Drivers must protect themselves and the instrument from
excessive rates of incoming requests from clients. Of course, clients should minimize the
need for calling across the internet to avoid flooding, but responsibility for protecting a
device from excessive request rates rests with the device and its driver.
• Self-Protection – Illegal/hazardous operations: Drivers and instruments should protect
themselves from illegal or hazardous operations. E.g. a dome may be opening but receives a
request to close the shutter. If the shutter can be safely reversed while opening, the driver
could simply close the shutter and report success. Alternatively, the driver may permit the
shutter to fully open and return an illegal operation error response to the close command.
• No Status Inconsistencies: In the example above, the driver ShutterStatus property must
accurately reflect the physical shutter condition at all times. If it reports ShutterOpen, even
for an instant, before the shutter starts to open, the client will assume that the shutter is
properly open and move on to its next task, even though the shutter is still opening.