MCPcopy Index your code
hub / github.com/python/cpython / dissect_can_frame

Method dissect_can_frame

Lib/test/test_socket.py:2351–2354  ·  view source on GitHub ↗

Dissect a CAN frame.

(cls, frame)

Source from the content-addressed store, hash-verified

2349
2350 @classmethod
2351 def dissect_can_frame(cls, frame):
2352 """Dissect a CAN frame."""
2353 can_id, can_dlc, data = struct.unpack(cls.can_frame_fmt, frame)
2354 return (can_id, can_dlc, data[:can_dlc])
2355
2356 def testSendFrame(self):
2357 cf, addr = self.s.recvfrom(self.bufsize)

Callers 1

_testBCMMethod · 0.95

Calls 1

unpackMethod · 0.80

Tested by

no test coverage detected