Click or drag to resize

ClientAPIPredictIPAddressFromSerialNumber Method

Predicts the card's IP address from its serial number.

Namespace: RAYLASE.SPICE3.ClientLib
Assembly: RAYLASE.SPICE3.ClientLib (in RAYLASE.SPICE3.ClientLib.dll) Version: 3.4.1
Syntax
C#
public static string PredictIPAddressFromSerialNumber(
	string serialNumber,
	CardDisposition cardDisposition = CardDisposition.Internal,
	bool useIPv6 = true
)

Parameters

serialNumber  String

The serial number of the card, in the format: "[SP3]#####".

The SP3 prefix is optional, leading zeros may be omitted.

cardDisposition  CardDisposition  (Optional)

How the card is installed.

useIPv6  Boolean  (Optional)

Which IP version to use.

Return Value

String
The predicted IP address.
Exceptions
ExceptionCondition
ArgumentExceptionserialNumber is not correctly formatted.
NotSupportedExceptioncardDisposition == ExternalDHCP and useIPv6 == false.
Remarks
Note  Note
  • IPv4 address prediction is not possible for cards which are installed Externally/DHCP.

  • For Internal and Peer-to-Peer installed cards, IPv4 address prediction may fail in rare cases where the card has adjusted its address to avoid conflict with the host PC's address.

  • IPv6 address prediction suffers from neither of these disadvantages.

See Also