Rfid |
Creates an RfidBank01 instance having the specified contents of the PC, XPC, and EPC/UII portion. The most significant bit of the first character of the input becomes bit 10 (hex). The first four characters of the input become bits 10 (hex) through 1F (hex) (the PC bits). If the XPC indicator (bit 16 hex, extracted from the second character of the input) is zero, then the remaining characters of the input become bits 20 (hex) onward, with the most significant bit of the fifth character becoming bit 20 (hex). If the XPC indicator is one, then the fifth through eighth characters of the input become the XPC bits 210 (hex) through 21F (hex), and the remaining characters of the input become bits 20 (hex) onward (with the most significant bit of the ninth character becoming bit 20 hex). This interpretation of the input corresponds to the way that the contents of Bank 01 are backscattered in the Gen2/18000-6C Air Interface protocol, excluding the CRC bits.
If adjustEpcUiiLength is false, then sufficient zero padding bits are added to make the total length of the EPC/UII portion a multiple of 16 bits (that is, either 0, 4, 8, or 12 bits of padding are added), and the PC length bits are calculated based on this padded length, replacing whatever PC length value was provided in the input.
If adjustEpcUiiLength is true, then the contents of the EPC/UII portion is either right-truncated or padded on the right with zeros to match the length implied by the PC bits provided in the input.
If the length of the specified hexadecimal string is fewer than four characters, then sufficient zero characters are added to the right to make a total of four characters, and the result is interpreted as specified above.
public static RfidBank01 FromBackscatterHex( string backscatterHex, bool adjustEpcUiiLength )
Exception | Condition |
---|---|
EpcLibException | if the specified string is not a valid hexadecimal numeral. |