Interface IDevice
Base interface of every client implementation of ASCOM Alpaca device
Namespace: ES.Ascom.Alpaca.Devices
Assembly: ES.Ascom.Alpaca.Shared.dll
Syntax
public interface IDevice
Properties
| Improve this Doc View SourceDeviceNumber
Device number configured in the device instance
Declaration
int DeviceNumber { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceGetDescription()
Retrieves a description of the device (manufacturer, model number, ...)
Declaration
string GetDescription()
Returns
Type | Description |
---|---|
System.String | Device description |
GetDriverInfo()
Retrieves descriptive and version information about the device.
Declaration
string GetDriverInfo()
Returns
Type | Description |
---|---|
System.String | Device information |
GetDriverVersion()
Retrieves the version of the driver
Declaration
string GetDriverVersion()
Returns
Type | Description |
---|---|
System.String | A string containing only the major and minor version of the driver. |
GetInterfaceVersion()
The ASCOM Device interface version number that this device supports.
Declaration
int GetInterfaceVersion()
Returns
Type | Description |
---|---|
System.Int32 |
GetName()
Retrieves the name of the device
Declaration
string GetName()
Returns
Type | Description |
---|---|
System.String | Name of the device |
GetSupportedActions()
Returns the list of action names supported by this driver.
Declaration
IList<string> GetSupportedActions()
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<System.String> |
InvokeAction(String, String)
Invokes the specified device-specific action.
Declaration
string InvokeAction(string actionName, string actionParameters)
Parameters
Type | Name | Description |
---|---|---|
System.String | actionName | A well known name that represents the action to be carried out. |
System.String | actionParameters | List of required parameters or an Empty String if none are required |
Returns
Type | Description |
---|---|
System.String | String response from the device |
IsConnected()
Retrieves the connected state of the device
Declaration
bool IsConnected()
Returns
Type | Description |
---|---|
System.Boolean |
|
SendCommandBlind(String, Boolean)
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.
Declaration
void SendCommandBlind(string command, bool raw = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | command | The literal command string to be transmitted |
System.Boolean | raw | If set to true the string is transmitted 'as-is', if set to false then protocol framing characters may be added prior to transmission |
SendCommandBool(String, Boolean)
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.
Declaration
bool SendCommandBool(string command, bool raw = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | command | The literal command string to be transmitted |
System.Boolean | raw | If set to true the string is transmitted 'as-is', if set to false then protocol framing characters may be added prior to transmission |
Returns
Type | Description |
---|---|
System.Boolean | Boolean response from the device. |
SendCommandString(String, Boolean)
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.
Declaration
string SendCommandString(string command, bool raw = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | command | The literal command string to be transmitted. |
System.Boolean | raw | If set to true the string is transmitted 'as-is', if set to false then protocol framing characters may be added prior to transmission |
Returns
Type | Description |
---|---|
System.String | String response from the device. |
SetConnected(Boolean)
Sets the connected state of the device
Declaration
void SetConnected(bool connected)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | connected | Set True to connect to the device hardware, set False to disconnect from the device hardware |