Beispiel #1
0
 def test_parse_pythoncan_line_v_30_channel(self):
     # Parse message format for python-can 3.0 with channel
     line = "Timestamp:        0.000000    ID: 00000000    X                DLC:  3    c0 ff ee " \
            "                   Channel: vcan0"
     message, timestamp = send.parse_pythoncan_line(line, None, None)
     self.assertListEqual(message.data, self.RESULT_DATA_C0FFEE)
Beispiel #2
0
 def test_parse_pythoncan_line_v_30_flags(self):
     # Parse message format for python-can 3.0 with flags
     line = "Timestamp:        0.000000    ID: 00000000    X   R            DLC:  4    de ad ca fe"
     message, timestamp = send.parse_pythoncan_line(line, None, None)
     self.assertListEqual(message.data, self.RESULT_DATA_DEAD_CAFE)
Beispiel #3
0
 def test_parse_pythoncan_line_v_21(self):
     # Parse message format for python-can 2.1
     line = "Timestamp:        0.000000        ID: 0000    S          DLC: 3    c0 ff ee"
     message, timestamp = send.parse_pythoncan_line(line, None, None)
     self.assertListEqual(message.data, self.RESULT_DATA_C0FFEE)