Dissect a CAN frame.
(cls, frame)
| 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) |