eth32cfg_serialnum_string

int eth32cfg_serialnum_string(unsigned char product_id, unsigned short batch, unsigned short unit, 
                            char *serialstring, int bufsize);

Summary

This function takes the numeric components of the ETH32 serial number and formats a serial number string in the same way that it is printed on the ETH32 device enclosure.

Parameters

  • product_id - The product ID portion of the serial number

  • batch - The batch number portion of the serial number

  • unit - The unit number portion of the serial number

  • serialstring - Pointer to a string buffer where the string representation will be written.

  • bufsize - Specifies how many bytes long the serialstring buffer is.

Return Value

This function returns zero on success and a negative error code on failure. If the buffer size according to the bufsize parameter is not long enough to receive the entire serial number string, it will not be written, and the function will return the ETH_BUFSIZE error.

See Also

eth32cfg_data_t Structure