Interface IDeviceAsync
Base interface of every client implementation of ASCOM Alpaca device
Namespace: ES.Ascom.Alpaca.Devices
Assembly: ES.Ascom.Alpaca.Shared.dll
Syntax
public interface IDeviceAsync
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 SourceGetDescriptionAsync()
Retrieves a description of the device (manufacturer, model number, ...)
Declaration
Task<string> GetDescriptionAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | Device description |
GetDriverInfoAsync()
Retrieves descriptive and version information about the device.
Declaration
Task<string> GetDriverInfoAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | Device information |
GetDriverVersionAsync()
Retrieves the version of the driver
Declaration
Task<string> GetDriverVersionAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | A string containing only the major and minor version of the driver. |
GetInterfaceVersionAsync()
The ASCOM Device interface version number that this device supports.
Declaration
Task<int> GetInterfaceVersionAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> |
GetNameAsync()
Retrieves the name of the device
Declaration
Task<string> GetNameAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | Name of the device |
GetSupportedActionsAsync()
Returns the list of action names supported by this driver.
Declaration
Task<IList<string>> GetSupportedActionsAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IList<System.String>> |
InvokeActionAsync(String, String)
Invokes the specified device-specific action.
Declaration
Task<string> InvokeActionAsync(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.Threading.Tasks.Task<System.String> | String response from the device |
IsConnectedAsync()
Retrieves the connected state of the device
Declaration
Task<bool> IsConnectedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
|
SendCommandBlindAsync(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
Task SendCommandBlindAsync(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.Threading.Tasks.Task |
SendCommandBoolAsync(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
Task<bool> SendCommandBoolAsync(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.Threading.Tasks.Task<System.Boolean> | Boolean response from the device. |
SendCommandStringAsync(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
Task<string> SendCommandStringAsync(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.Threading.Tasks.Task<System.String> | String response from the device. |
SetConnectedAsync(Boolean)
Sets the connected state of the device
Declaration
Task SetConnectedAsync(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 |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |