Click or drag to resize
ASCOM Namespace

ASCOM

Summary

This namespace contains all ASCOM components and applications

Classes
  Class Description
Public class ActionNotImplementedException
Exception thrown by a driver when it receives an unknown command through the Action method.
Public class DeviceIdAttribute
An attribute for declaratively associating an assembly, class or property with an ASCOM device ID (and optionally, a display name).
Public class DriverAccessCOMException
Exception thrown by DriverAccess to return a driver COM error to the client. This exception appears as a COMException to the client having the original exception's description and error number as well as the original exception as the inner exception.
Public class DriverException
This is the generic driver exception. Drivers are permitted to directly throw this exception as well as any derived exceptions. Note that the Message property is a member of Exception, the base class of DriverException. The HResult property of Exception is simply renamed to Number.

This exception should only be thrown if there is no other more appropriate exception already defined, e.g. PropertyNotImplemented, InvalidOperationException, InvalidValueException, NotConnectedException etc. These specific exceptions should be thrown where appropriate rather than using the more generic DriverException. Conform will not accept DriverExceptions where more appropriate exceptions are already defined.

As good programming practice, the Message property should not be empty, so that users understand why the exception was thrown.

Public class ErrorCodes
Error numbers for use by drivers.
Public class InvalidOperationException
This exception should be raised by the driver to reject a command from the client. It is intended to be used for "logical" errors e.g. trying to use a command when the current configuration of the device does not allow it rather than for device errors such as a communications error.

Its the error to use when the client attempts something, which at another time would be sensible, but which is not sensible right now. If you expect the condition causing the issue to be short lived, you may choose to stall the request until the condition is cleared rather than throwing this exception. Clearly, that is a judgement that you can only make given a specific scenario.

Public class InvalidValueException
Exception to report an invalid value supplied to a driver.
Public class MethodNotImplementedException
All methods defined by the relevant ASCOM standard interface must exist in each driver. However, those methods do not all have to be implemented. The minimum requirement for each defined method is to throw the ASCOM.MethodNotImplementedException. Note that no default constructor is supplied. Throwing this requires the the method name.
Public class NotConnectedException
This exception should be raised when an operation is attempted that requires communication with the device, but the device is disconnected.
Public class NotImplementedException
All properties and methods defined by the relevant ASCOM standard interface must exist in each driver. However, those properties and methods do not all have to be implemented. This exception is a base class for PropertyNotImplementedException and MethodNotImplementedException, which drivers should use for throwing the relevant exception(s). This class is intended to be used by clients who wish to catch either of the two specific exceptions in a single catch() clause.
Public class ParkedException
This exception should be used to indicate that movement (or other invalid operation) was attempted while the device was in a parked state.
Public class PropertyNotImplementedException
All properties defined by the relevant ASCOM standard interface must exist in each driver. However, those properties do not all have to be implemented. The minimum requirement for each defined property is to throw the ASCOM.PropertyNotImplementedException for each of its accessors. Note that no default constructor is supplied. Throwing this requires both the property name and unimplemented accessor type to be supplied.
Public class ServedClassNameAttribute
An attribute that confers a 'friendly name' on a class and marks it as loadable by LocalServer. The 'friendly name' is used by the ASCOM LocalServer to register the class with the ASCOM Chooser. The 'friendly name' is what gets displayed to the user in the driver selection combo box. This attribute is also used by the LocalServer to filter the assemblies that it will attempt to load at runtime. LocalServer will only load classes bearing this attribute.
Public class SettingsProvider
Provides settings storage for ASCOM device drivers. Settings are persisted in the ASCOM Device Profile store.
Public class SlavedException
This exception should be used to indicate that movement (or other invalid operation) was attempted while the device was in slaved mode. This applies primarily to domes drivers.
Public class ValueNotSetException
Exception to report that no value has yet been set for this property.