12.07.2015 Views

SUB-20 User Manual - Dimax

SUB-20 User Manual - Dimax

SUB-20 User Manual - Dimax

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

15<strong>SUB</strong>-<strong>20</strong><strong>SUB</strong>-<strong>20</strong> API}printf("sub_open: %s\n", sub_strerror(sub_errno));return -1;3.1.3 sub_get_serial_numberSynopsisint sub_get_serial_number( sub_handle hndl, char *buf, int sz)Get serial number string descriptorParameters· *buf - buffer to store descriptor· sz - buffer sizeReturn valueOn success function returns string descriptor size. Otherwise negative number.Exampleif( sub_get_serial_number(hndl, buf, sizeof(buf)) >= 0 )printf( "Serial Number : %s\n", buf );else{/* Error */}3.1.4 sub_get_product_idSynopsisint sub_get_product_id( sub_handle hndl, char *buf, int sz);Get product ID string descriptorParameters· *buf - buffer to store descriptor· sz - buffer sizeReturn valueOn success function returns string descriptor size. Otherwise negative number.Exampleif( sub_get_product_id(hndl, buf, sizeof(buf)) >= 0 )printf( "Product ID : %s\n", buf );else{/* Error */}3.1.5 sub_get_versionSynopsisconst struct sub_version* sub_get_version( sub_handle hndl );© <strong>20</strong>13 xdimax.com rev 2.17

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!