MCPcopy Index your code
hub / github.com/RustPython/RustPython / dissect_can_frame

Method dissect_can_frame

Lib/test/test_socket.py:2282–2285  ·  view source on GitHub ↗

Dissect a CAN frame.

(cls, frame)

Source from the content-addressed store, hash-verified

2280
2281 @classmethod
2282 def dissect_can_frame(cls, frame):
2283 """Dissect a CAN frame."""
2284 can_id, can_dlc, data = struct.unpack(cls.can_frame_fmt, frame)
2285 return (can_id, can_dlc, data[:can_dlc])
2286
2287 def testSendFrame(self):
2288 cf, addr = self.s.recvfrom(self.bufsize)

Callers 1

_testBCMMethod · 0.95

Calls 1

unpackMethod · 0.45

Tested by

no test coverage detected