MCPcopy Create free account
hub / github.com/LabPy/lantz / from_bytes

Method from_bytes

lantz/drivers/legacy/usbtmc.py:81–88  ·  view source on GitHub ↗
(cls, data)

Source from the content-addressed store, hash-verified

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

Callers 1

recvMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected