com.impinj.octane

## Class PcBits

- java.lang.Object
- - com.impinj.octane.PcBits

-     public class PcBits
      extends java.lang.Object

  Helper class used to encode and decode the PC word. The protocol control word is backscattered with the EPC and helps to decode information on the tag See Gen2 Standard page 46

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PcBits()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static short` | `AdjustPcBits(short currentPcBits, short newEpcLengthInWords)` Returns new PC bits, based on the current PC bits and the new EPC length.
    `static short` | `EpcLengthInWords(short pcBits)` Determine the EPC length (in words) from the PC bits
    `static java.lang.String` | `toHexString(short pcBits)` formats the EPC bits as a hex string.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PcBits

          public PcBits()

  - ### Method Detail

    - #### AdjustPcBits

          public static short AdjustPcBits(short currentPcBits,
                                           short newEpcLengthInWords)

      Returns new PC bits, based on the current PC bits and the new EPC length. If you are rewriting an EPC and changing its length, you should adjust the old PC bits using this function and write them back to the tag
      Parameters:
        `currentPcBits` - the current PC bits read from the tag
        `newEpcLengthInWords` - the new epc length of the EPC you are writing
      Returns:
        the new epc bits to write back to the tag

    - #### EpcLengthInWords

          public static short EpcLengthInWords(short pcBits)

      Determine the EPC length (in words) from the PC bits
      Parameters:
        `pcBits` - the PC bits read from the tag
      Returns:
        the length of the EPC in words

    - #### toHexString

          public static java.lang.String toHexString(short pcBits)

      formats the EPC bits as a hex string.
      Parameters:
        `pcBits` - the PC bits read from a tag
      Returns:
        a hex string representation