Extracts product IDs and versioned product IDs from a given source.
This function handles three types of input:
If the source is a string, it parses the serial number to extract both productId and versionedProductId.
If the source is a HardwareDescription, it extracts the productId, versionedProductId, deviceProductId,
and versionedDeviceProductId from either the device or assembly information.
If the source is a StackInfo, it parses the stack_serial_number to extract the productId and versionedProductId.
Returns
An object containing the following properties:
deviceProductId: The ID of the device.
productId: The general product ID.
versionedDeviceProductId: The device ID with version.
versionedProductId: The general product ID with version.
Throws
Throws an error if the source is of an invalid type.
Extracts product IDs and versioned product IDs from a given source.
This function handles three types of input:
productId
andversionedProductId
.HardwareDescription
, it extracts theproductId
,versionedProductId
,deviceProductId
, andversionedDeviceProductId
from either the device or assembly information.StackInfo
, it parses thestack_serial_number
to extract theproductId
andversionedProductId
.Returns
An object containing the following properties:
deviceProductId
: The ID of the device.productId
: The general product ID.versionedDeviceProductId
: The device ID with version.versionedProductId
: The general product ID with version.Throws
Throws an error if the
source
is of an invalid type.