Show / Hide Table of Contents

Interface ISwitch

Defines the capabilities supported by an ASCOM Alpaca Switch device

Inherited Members
IDevice.DeviceNumber
IDevice.InvokeAction(String, String)
IDevice.SendCommandBlind(String, Boolean)
IDevice.SendCommandBool(String, Boolean)
IDevice.SendCommandString(String, Boolean)
IDevice.IsConnected()
IDevice.SetConnected(Boolean)
IDevice.GetDescription()
IDevice.GetDriverInfo()
IDevice.GetDriverVersion()
IDevice.GetInterfaceVersion()
IDevice.GetName()
IDevice.GetSupportedActions()
Namespace: ES.Ascom.Alpaca.Devices
Assembly: ES.Ascom.Alpaca.Shared.dll
Syntax
public interface ISwitch : IDevice

Methods

| Improve this Doc View Source

CanWrite(Int32)

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. Devices are numbered from 0 to MaxSwitch - 1

Declaration
bool CanWrite(int id)
Parameters
Type Name Description
System.Int32 id

The device number (0 to MaxSwitch - 1)

Returns
Type Description
System.Boolean
| Improve this Doc View Source

GetMaxSwitch()

Returns the number of switch devices managed by this driver. Devices are numbered from 0 to MaxSwitch - 1

Declaration
int GetMaxSwitch()
Returns
Type Description
System.Int32
| Improve this Doc View Source

GetMaxSwitchValue(Int32)

Gets the maximum value of the specified switch device as a double. Devices are numbered from 0 to MaxSwitch - 1.

Declaration
double GetMaxSwitchValue(int id)
Parameters
Type Name Description
System.Int32 id

The device number (0 to MaxSwitch - 1)

Returns
Type Description
System.Double
| Improve this Doc View Source

GetMinSwitchValue(Int32)

Gets the minimum value of the specified switch device as a double. Devices are numbered from 0 to MaxSwitch - 1.

Declaration
double GetMinSwitchValue(int id)
Parameters
Type Name Description
System.Int32 id

The device number (0 to MaxSwitch - 1)

Returns
Type Description
System.Double
| Improve this Doc View Source

GetSwitch(Int32)

Return the state of switch device id as a boolean. Devices are numbered from 0 to MaxSwitch - 1

Declaration
bool GetSwitch(int id)
Parameters
Type Name Description
System.Int32 id

The device number (0 to MaxSwitch - 1)

Returns
Type Description
System.Boolean
| Improve this Doc View Source

GetSwitchDescription(Int32)

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. Devices are numbered from 0 to MaxSwitch - 1

Declaration
string GetSwitchDescription(int id)
Parameters
Type Name Description
System.Int32 id

The device number (0 to MaxSwitch - 1)

Returns
Type Description
System.String
| Improve this Doc View Source

GetSwitchName(Int32)

Gets the name of the specified switch device. Devices are numbered from 0 to MaxSwitch - 1

Declaration
string GetSwitchName(int id)
Parameters
Type Name Description
System.Int32 id

The device number (0 to MaxSwitch - 1)

Returns
Type Description
System.String
| Improve this Doc View Source

GetSwitchStep(Int32)

Returns the step size that this device supports (the difference between successive values of the device). Devices are numbered from 0 to MaxSwitch - 1.

Declaration
double GetSwitchStep(int id)
Parameters
Type Name Description
System.Int32 id

The device number (0 to MaxSwitch - 1)

Returns
Type Description
System.Double
| Improve this Doc View Source

GetSwitchValue(Int32)

Gets the value of the specified switch device as a double. Devices are numbered from 0 to MaxSwitch - 1, The value of this switch is expected to be between MinSwitchValue and MaxSwitchValue.

Declaration
double GetSwitchValue(int id)
Parameters
Type Name Description
System.Int32 id

The device number (0 to MaxSwitch - 1)

Returns
Type Description
System.Double
| Improve this Doc View Source

SetSwitch(Int32, Boolean)

Sets a switch controller device to the specified state, true or false.

Declaration
void SetSwitch(int id, bool state)
Parameters
Type Name Description
System.Int32 id

The device number (0 to MaxSwitch - 1)

System.Boolean state

The required control state (True or False)

| Improve this Doc View Source

SetSwitchName(Int32, String)

Sets a switch device name to the specified value.

Declaration
void SetSwitchName(int id, string name)
Parameters
Type Name Description
System.Int32 id

The device number (0 to MaxSwitch - 1)

System.String name

The name of the device

| Improve this Doc View Source

SetSwitchValue(Int32, Double)

Sets a switch device value to the specified value.

Declaration
void SetSwitchValue(int id, double value)
Parameters
Type Name Description
System.Int32 id

The device number (0 to MaxSwitch - 1)

System.Double value

The value to be set, between MinSwitchValue and MaxSwitchValue

See Also

ISwitchAsync
  • Improve this Doc
  • View Source
Back to top Generated by DocFX