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:
productIdandversionedProductId.HardwareDescription, it extracts theproductId,versionedProductId,deviceProductId, andversionedDeviceProductIdfrom either the device or assembly information.StackInfo, it parses thestack_serial_numberto extract theproductIdandversionedProductId.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
sourceis of an invalid type.