[][src]Function hid_io::protocol::hidio::packet_id

pub fn packet_id(packet_data: &mut Vec<u8>) -> Result<u32, HIDIOParseError>

Determines packet id from a byte stream

Arguments

Remarks

Uses a packet byte stream to determine packet Id.

struct HIDIO_Packet {
   ... (4 bits)
   uint8_t           id_width:1;  // 0 - 16bits, 1 - 32bits
   ... (11 bits)
   uint16_t/uint32_t id;          // Id field (check id_width to see which struct to use)
   ...
};