The Switch type exposes the following members.

Constructors

  NameDescription
Public methodSwitch
Creates a Switch object with the given Prog ID

Methods

  NameDescription
Public methodAction
Invokes the specified device-specific action.
(Inherited from AscomDriver.)
Public methodCanWrite
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.
Public methodStatic memberChoose
Brings up the ASCOM Chooser Dialog to choose a Switch
Public methodCommandBlind
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.)
Public methodCommandBool
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.)
Public methodCommandString
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.)
Public methodDispose
Releases the unmanaged late bound COM object
(Inherited from AscomDriver.)
Public methodGetSwitch
Return the state of switch device id as a boolean.
Public methodGetSwitchDescription
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.
Public methodGetSwitchName
Return the name of switch device n. This method is mandatory.
Public methodGetSwitchValue
Returns the value for switch device id as a double.
Public methodMaxSwitchValue
Returns the maximum value for this switch device, this must be greater than MinSwitchValue(Int16).
Public methodMinSwitchValue
Returns the minimum value for this switch device, this must be less than MaxSwitchValue(Int16).
Public methodSetSwitch
Sets a switch controller device to the specified state If the device cannot be set then throws a MethodNotImplementedException.
Public methodSetSwitchName
Sets a switch device name to a specified value. If the device name cannot be set by the application this must return the MethodNotImplementedException .
Public methodSetSwitchValue
Set the value for this device as a double. If the switch cannot be set then throws a MethodNotImplementedException. If the value is not between the MaxSwitchValue(Int16) and MinSwitchValue(Int16) then throws an InvalidValueException.
Public methodSetupDialog
Launches a configuration dialog box for the driver. The call will not return until the user clicks OK or cancel manually.
(Inherited from AscomDriver.)
Public methodSwitchStep
Returns the step size that this device supports. This gives the difference between successive values of the device.

Properties

  NameDescription
Public propertyConnected
Set True to connect to the device. Set False to disconnect from the device. You can also read the property to check whether it is connected.
(Inherited from AscomDriver.)
Public propertyDescription
Returns a description of the device, such as manufacturer and modelnumber. Any ASCII characters may be used.
(Inherited from AscomDriver.)
Public propertyDriverInfo
Descriptive and version information about this ASCOM driver.
(Inherited from AscomDriver.)
Public propertyDriverVersion
A string containing only the major and minor version of the driver.
(Inherited from AscomDriver.)
Public propertyInterfaceVersion
The interface version number that this device supports.
(Inherited from AscomDriver.)
Public propertyMaxSwitch
Return the number of switch devices managed by this driver
Public propertyName
The short name of the driver, for display purposes
(Inherited from AscomDriver.)
Public propertySupportedActions
Returns the list of action names supported by this driver.
(Inherited from AscomDriver.)

See Also