jlcout / epctagcoder

Java library for RFID EPC encode / decode

Home Page:https://jlcout.github.io/epctagcoder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible wrong with the generation values

tiagoaleff opened this issue · comments

For example, the following entry:

wrong
(source: http://www.kentraub.net/tools/tagxlate/EPCEncoderDecoder.html)

with my current code
code

But Im getting this result:

"epcScheme": "sscc"
"applicationIdentifier": "AI 00"
"tagSize": "96"
"filterValue": "6"
"partitionValue": "5"
"prefixLength": "7"
"companyPrefix": "9999999",
"extensionDigit": "7"
"serial": "000000058"
"checkDigit": "3"
"epcPureIdentityURI": "urn:epc:id:sscc:9999999.7000000058"
"epcTagURI": "urn:epc:tag:sscc-96:6.9999999.7000000058"
"epcRawURI": "urn:epc:raw:96.x31D66259FDA13B863A000000",
"binary": "001100011101011001100010010110011111110110100001001110111000011000111010000000000000000000000000",
"rfidTag": "31D66259FDA13B863A000000" }

Resumo
31D66259FDA13B863A000000 (it is the wrong result)
31D66259FC00000005000000 (its the right result)

Sorry for my English.

Thanks Thiago, I'll check it out this weekend.
Você é brasileiro? manda um email jlcoutlab@gmail.com

You just confused Extension Digit with Company Prefix Length, which unlike Ken Traub I compute internally.
Extension Digit is the first occurrence in Serial. With the Extension Digit you increase numeric capacity, for example using Extension Digit = 0 you could generate a certain maximum amount, reached the maximum then you use the Digit Extension = 1 and so on.

Try this way:

ParseSSCC parseSSCC96 = ParseSSCC.Builder()
		.withCompanyPrefix("9999999")
		.withExtensionDigit( SSCCExtensionDigit.EXTENSION_0 )
		.withSerial("000000005")
		.withTagSize( SSCCTagSize.BITS_96 )
		.withFilterValue( SSCCFilterValue.UNIT_LOAD_6 )
		.build();