Thetype exposes the following members.
Set True to connect to the device hardware. Set False to disconnect from the device hardware. You can also read the property to check whether it is connected. This reports the current hardware state.(Inherited from AscomDriver.)
Returns a description of the device, such as manufacturer and modelnumber. Any ASCII characters may be used.(Inherited from AscomDriver.)
Descriptive and version information about this ASCOM driver.(Inherited from AscomDriver.)
A string containing only the major and minor version of the driver.(Inherited from AscomDriver.)
The interface version number that this device supports.(Inherited from AscomDriver.)
Return the number of switch devices managed by this driver
The short name of the driver, for display purposes(Inherited from AscomDriver.)
Returns the list of custom action names supported by this driver.(Inherited from AscomDriver.)
Invokes the specified device-specific custom action.(Inherited from AscomDriver.)
Reports if the specified switch device can be written to, default true. This is false if the device cannot be written to, for example a limit switch or a sensor.
Brings up the ASCOM Chooser Dialog to choose a Switch
Transmits an arbitrary string to the device and does not wait for a response. Optionally, protocol framing characters may be added to the string before transmission.(Inherited from AscomDriver.)
Transmits an arbitrary string to the device and waits for a boolean response. Optionally, protocol framing characters may be added to the string before transmission.(Inherited from AscomDriver.)
Transmits an arbitrary string to the device and waits for a string response. Optionally, protocol framing characters may be added to the string before transmission.(Inherited from AscomDriver.)
Releases the unmanaged late bound COM object(Inherited from AscomDriver.)
Return the state of switch device id as a boolean.
Gets the description of the specified switch device. This is to allow a fuller description of the device to be returned, for example for a tool tip.
Return the name of switch device n. This method is mandatory.
Returns the value for switch device id as a double.
Returns the maximum value for this switch device, this must be greater than MinSwitchValue(Int16).
Returns the minimum value for this switch device, this must be less than MaxSwitchValue(Int16).
Sets a switch controller device to the specified state If the device cannot be set then throws a MethodNotImplementedException.
Sets a switch device name to a specified value. If the device name cannot be set by the application this must return the MethodNotImplementedException .
Launches a configuration dialog box for the driver. The call will not return until the user clicks OK or cancel manually.(Inherited from AscomDriver.)
Returns the step size that this device supports. This gives the difference between successive values of the device.
The Switch interface is used to define a number of 'switch devices'. A switch device can be used to control something, such as a power switch or may be used to sense the state of something, such as a limit switch.
This SwitchV2 interface is an extension of the original Switch interface. The changes allow devices to have more than two states and to distinguish between devices that are writable and those that are read only.
Compatibility between Switch and SwitchV2 interfaces:
Each device has a CanWrite method, this is true if it can be written to or false if the device can only be read.
The new MinSwitchValue, MaxSwitchValue and SwitchStep methods are used to define the range and values that a device can handle. This also defines the number of different values - states - that a device can have, from two for a traditional on-off switch, through those with a small number of states to those which have many states.
The SetSwitchValue and GetSwitchValue methods are used to set and get the value of a device as a double.
There is no fundamental difference between devices with different numbers of states.
Each device handled by a Switch is known as a device or switch device for general cases, a controller device if it can alter the state of the device and a sensor device if it can only be read.
For convenience devices are referred to as Boolean if the device can only have two states, and multi-state if it can have more than two values. These are treated the same in the interface definition.