AlpacaClientGetDeviceT(AscomDevice, Int32, Int32, Int32, UInt32, String, String, Boolean, ILogger, ImageArrayTransferType, ImageArrayCompression, String, String, Boolean, Boolean, Boolean) 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: 3.0.0-rc.1+86c25ce733aebb4d8b1b8a62e84770ea5e972bea
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
)
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.

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

.NET Standard

Supported in: 2.0

See Also