AlpacaClientGetDeviceT(AscomDevice, Int32, Int32, Int32, UInt32, String, String, Boolean, ILogger, ImageArrayTransferType, ImageArrayCompression, String, String, Boolean, Boolean, Boolean, Int32) Method

Create an Alpaca client for a discovered ASCOM device specifying all parameters

Definition

Namespace: ASCOM.Alpaca.Clients
Assembly: ASCOM.Alpaca (in ASCOM.Alpaca.dll) Version: 4.0.0+77e18c564bf9ecdb0ef30166e894390d1b7d077c
C#
public static T GetDevice<T>(
	AscomDevice ascomDevice,
	int establishConnectionTimeout = 5,
	int standardDeviceResponseTimeout = 10,
	int longDeviceResponseTimeout = 100,
	uint clientNumber = 1,
	string userName = "",
	string password = "",
	bool strictCasing = true,
	ILogger logger = null,
	ImageArrayTransferType imageArrayTransferType = ImageArrayTransferType.BestAvailable,
	ImageArrayCompression imageArrayCompression = ImageArrayCompression.None,
	string userAgentProductName = null,
	string userAgentProductVersion = null,
	bool trustUserGeneratedSslCertificates = false,
	bool throwOnBadDateTimeJSON = false,
	bool request100Continue = false,
	int numberOfRetries = 1
)
where T : new(), AlpacaDeviceBaseClass

Parameters

ascomDevice  AscomDevice
An AscomDevice instance representing the device to use (mandatory parameter)
establishConnectionTimeout  Int32  (Optional)
Communications timeout (seconds) when initially connecting to the client. Default: 3 seconds
standardDeviceResponseTimeout  Int32  (Optional)
Communications timeout (seconds) for commands that are expected to complete quickly. Default: 3 seconds
longDeviceResponseTimeout  Int32  (Optional)
Communications timeout (seconds) for commands that are expected to take a long time such as synchronous telescope slews. Default: 100 seconds
clientNumber  UInt32  (Optional)
Arbitrary number identifying this particular client. Default: 1
userName  String  (Optional)
Basic authentication user name. Supply a or empty string if basic authentication is not required. Default: Empty string
password  String  (Optional)
Basic authentication password. Ignored if password is or an empty string. Default: Empty string
strictCasing  Boolean  (Optional)
Set true to require strict JSON casing in device responses.. Default: true
logger  ILogger  (Optional)
ILogger instance or null. Default: null
imageArrayTransferType  ImageArrayTransferType  (Optional)
Image array transfer type (Only relevant to Camera devices). Default: ImageArrayTransferType.BestAvailable
imageArrayCompression  ImageArrayCompression  (Optional)
Image array compression type (Only relevant to Camera devices). Default: ImageArrayCompression.None
userAgentProductName  String  (Optional)
User agent header product name. Default: Not added to header.
userAgentProductVersion  String  (Optional)
User agent header product version. Default: Not added to header.
trustUserGeneratedSslCertificates  Boolean  (Optional)
Trust user generated SSL certificates. Default: User generated SSL certificates are not trusted.
throwOnBadDateTimeJSON  Boolean  (Optional)
Return an error if the UTCDate JSON format is incorrect (Only relevant to Telescope devices). Default: Will accept the provided format and not return an error.
request100Continue  Boolean  (Optional)
Request that PUT requests use the 100CONTINUE HTTP protocol. Default: The 100CONTINUE protocol is not requested.
numberOfRetries  Int32  (Optional)
Number of retries for failed requests. Default: 1

Type Parameters

T

Return Value

T
An Alpaca client instance for the supplied device and configuration

Remarks

ASCOM Camera client specific parameters can be set through the ImageArrayTransferType and ImageArrayCompression properties.

Version Information

Supported in: .NET Standard 2.0, .NET 8 .NET 9. .NET 10

See Also