AlpacaDiscoveryValidateAlpacaAddress Method
Validates that a device exists on the supplied IP address and port. If not, an attempt is made to re-discover the device based on the supplied unique ID.
Namespace: ASCOM.Alpaca.DiscoveryAssembly: ASCOM.Alpaca (in ASCOM.Alpaca.dll) Version: 4.1.0+517b408ca408f7a19aace78c1509f524714a3a13
public static bool ValidateAlpacaAddress(
string ipAddressString,
int portNumber,
string uniqueId,
out AscomDevice foundDevice,
ILogger logger = null
)
Public Shared Function ValidateAlpacaAddress (
ipAddressString As String,
portNumber As Integer,
uniqueId As String,
<OutAttribute> ByRef foundDevice As AscomDevice,
Optional logger As ILogger = Nothing
) As Boolean
- ipAddressString String
- The IP address of the Alpaca device as a string.
- portNumber Int32
- The IP port number of the Alpaca device.
- uniqueId String
- The unique ID of the Alpaca device.
- foundDevice AscomDevice
- An AlpacaDevice instance containing the new IP address and port of the Alpaca device when returning false and the device is found on another address. Otherwise null.
- logger ILogger (Optional)
- Optional logger for debug messages. Defaults to null, which suppresses logging.
BooleanTrue if the device exists on the supplied IP address and port, otherwise false. If a device with the same unique ID is found on a different address, foundDevice will be set to that device.
When the device is found on multiple paths, this method returns the address of the device that is closest to the original address e.g. is on the same sub-net.
Supported in: .NET Standard 2.0, .NET 8 .NET 9. .NET 10