API Reference v9.2.0

WdiAutofocusProviderclass

Module: ZaberMotionMicroscopy

Class representing access to WDI Autofocus connection.

The following example illustrates how you can obtain an instance of this type:

import ZaberMotionMicroscopy

let wdiAutofocusProvider = try await WdiAutofocusProvider.openTcp(hostName: "169.254.64.162")
Related Guides:

Constants

c

defaultTcpPort

WdiAutofocusProvider.defaultTcpPort
Int Default port number for TCP connections to WDI autofocus.
Value
27

Properties

p

firmwareVersion

readonlythrows
try wdiAutofocusProvider.firmwareVersion
FirmwareVersion The firmware version of the connected autofocus.
p

providerId

readonly
wdiAutofocusProvider.providerId
Int The ID identifies the autofocus with the underlying library.

Methods

m

close()

asyncthrows
try await wdiAutofocusProvider.close()
Close the connection.
m

disableLaser()

asyncthrows
try await wdiAutofocusProvider.disableLaser()
Disables the laser.
m

enableLaser()

asyncthrows
try await wdiAutofocusProvider.enableLaser()
Enables the laser.
m

genericRead()

asyncthrows
try await wdiAutofocusProvider.genericRead(registerId, size, count = 1, offset = 0, registerBank = "U")
Generic read operation.
Arguments
NameTypeDescription
registerIdIntRegister address to read from.
sizeIntData size to read. Valid values are (1,2,4). Determines the data type (Byte, Word, DWord).
countIntNumber of values to read (defaults to 1).
offsetIntOffset within the register (defaults to 0).
registerBankStringRegister bank letter (defaults to U for user bank).
Return Value
[Int] Array of integers read from the device.
m

genericReadFloat()

asyncthrows
try await wdiAutofocusProvider.genericReadFloat(registerId, count = 1, offset = 0, registerBank = "U")
Generic read operation.
Arguments
NameTypeDescription
registerIdIntRegister address to read from.
countIntNumber of values to read (defaults to 1).
offsetIntOffset within the register (defaults to 0).
registerBankStringRegister bank letter (defaults to U for user bank).
Return Value
[Double] Array of floats read from the device.
m

genericWrite()

asyncthrows
try await wdiAutofocusProvider.genericWrite(registerId, size = 0, data = [], offset = 0, registerBank = "U")
Generic write operation.
Arguments
NameTypeDescription
registerIdIntRegister address to write to.
sizeIntData size to write. Valid values are (0,1,2,4). Determines the data type (Nil, Byte, Word, DWord).
data[Int]Array of values to write to the register. Empty array is allowed.
offsetIntOffset within the register (defaults to 0).
registerBankStringRegister bank letter (defaults to U for user bank).
m

genericWriteFloat()

asyncthrows
try await wdiAutofocusProvider.genericWriteFloat(registerId, data = [], offset = 0, registerBank = "U")
Generic write operation.
Arguments
NameTypeDescription
registerIdIntRegister address to write to.
data[Double]Array of values to write to the register. Empty array is allowed.
offsetIntOffset within the register (defaults to 0).
registerBankStringRegister bank letter (defaults to U for user bank).
m

getStatus()

asyncthrows
try await wdiAutofocusProvider.getStatus()
Gets the status of the autofocus.
Return Value
WdiAutofocusProviderStatus The status of the autofocus.
s

openTcp()

asyncthrows
try await WdiAutofocusProvider.openTcp(hostName, port = WdiAutofocusProvider.defaultTcpPort)
Opens a TCP connection to WDI autofocus.
Arguments
NameTypeDescription
hostNameStringHostname or IP address.
portIntOptional port number (defaults to 27).
Return Value
WdiAutofocusProvider An object representing the autofocus connection.
m

toString()

throws
try wdiAutofocusProvider.toString()
Returns a string that represents the autofocus connection.
Return Value
String A string that represents the connection.