(cls, data)
| 79 | |
| 80 | @classmethod |
| 81 | def from_bytes(cls, data): |
| 82 | msgid, btag, btaginverse = struct.unpack_from('BBBx', data) |
| 83 | assert msgid == MSGID.DEV_DEP_MSG_IN |
| 84 | |
| 85 | transfer_size, transfer_attributes = struct.unpack_from('<LBxxx', data, 4) |
| 86 | |
| 87 | data = data[12:] |
| 88 | return cls(msgid, btag, btaginverse, transfer_size, transfer_attributes, data) |
| 89 | |
| 90 | |
| 91 | @staticmethod |