Show / Hide Table of Contents

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 Source

DeviceNumber

Device number configured in the device instance

Declaration
int DeviceNumber { get; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

GetDescription()

Retrieves a description of the device (manufacturer, model number, ...)

Declaration
string GetDescription()
Returns
Type Description
System.String

Device description

| Improve this Doc View Source

GetDriverInfo()

Retrieves descriptive and version information about the device.

Declaration
string GetDriverInfo()
Returns
Type Description
System.String

Device information

| Improve this Doc View Source

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.

| Improve this Doc View Source

GetInterfaceVersion()

The ASCOM Device interface version number that this device supports.

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

GetName()

Retrieves the name of the device

Declaration
string GetName()
Returns
Type Description
System.String

Name of the device

| Improve this Doc View Source

GetSupportedActions()

Returns the list of action names supported by this driver.

Declaration
IList<string> GetSupportedActions()
Returns
Type Description
System.Collections.Generic.IList<System.String>
| Improve this Doc View Source

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

| Improve this Doc View Source

IsConnected()

Retrieves the connected state of the device

Declaration
bool IsConnected()
Returns
Type Description
System.Boolean

True if the device is connected, false if not

| Improve this Doc View Source

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

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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

See Also

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