Extra comments about decoding device
Decoded bit as bit-shift, for easier reading
Device decoding in separate function
Take into account length of device data
Prepare for supporting other device types