Package 

Class Pdu


  • 
    public class Pdu
    
                        

    Converts a byte string from a Bluetooth LE scan into a Payload Data Unit (PDU) Created by dyoung on 4/14/15.

    • Method Detail

      • parse

         static Pdu parse(Array<byte> bytes, int startIndex)

        Parse a PDU from a byte array looking offset by startIndex

      • getType

         byte getType()

        PDU type field

      • getActualLength

         int getActualLength()

        Actual PDU length (may be less than declared length if fewer bytes are actually available.)

      • getStartIndex

         int getStartIndex()

        Start index within byte buffer of PDUThis is the start of the payload data that starts after the length and the type, so the PDUactually starts two bytes earlier

      • getEndIndex

         int getEndIndex()

        End index within byte buffer of PDU