From ae5b51ae257caf742b333343e730dda329c73db7 Mon Sep 17 00:00:00 2001 From: Alexander Bessman Date: Wed, 11 Sep 2019 14:38:10 +0200 Subject: [PATCH 1/4] ASCReader: Skip J1939TP messages --- can/io/asc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/can/io/asc.py b/can/io/asc.py index 656ac4fbe..d66611fa6 100644 --- a/can/io/asc.py +++ b/can/io/asc.py @@ -75,6 +75,7 @@ def __iter__(self): elif ( not isinstance(channel, int) or dummy.strip()[0:10].lower() == "statistic:" + or dummy.split(None, 1)[0] == "J1939TP" ): pass elif dummy[-1:].lower() == "r": From 6ca32ee5c2622eec10589983acedf5afd976f953 Mon Sep 17 00:00:00 2001 From: Alexander Bessman Date: Thu, 12 Sep 2019 09:46:17 +0200 Subject: [PATCH 2/4] Add example J1939TP message to logfile.asc --- test/data/logfile.asc | 1 + 1 file changed, 1 insertion(+) diff --git a/test/data/logfile.asc b/test/data/logfile.asc index 4b7c64363..842c463fe 100644 --- a/test/data/logfile.asc +++ b/test/data/logfile.asc @@ -9,6 +9,7 @@ Begin Triggerblock Sam Sep 30 15:06:13.191 2017 1.015991 1 Statistic: D 0 R 0 XD 0 XR 0 E 0 O 0 B 0.00% 1.015991 2 Statistic: D 0 R 0 XD 0 XR 0 E 0 O 0 B 0.00% 2.015992 1 Statistic: D 0 R 0 XD 0 XR 0 E 0 O 0 B 0.00% + 3.297743 1 J1939TP FEE3p 6 0 0 - Rx d 23 A0 0F A6 60 3B D1 40 1F DE 80 25 DF C0 2B E1 00 4B FF FF 3C 0F 00 4B FF FF FF FF FF FF FF FF FF FF FF FF 17.876707 CAN 1 Status:chip status error passive - TxErr: 131 RxErr: 0 17.876708 1 6F9 Rx d 8 05 0C 00 00 00 00 00 00 Length = 240015 BitCount = 124 ID = 1785 17.876976 1 6F8 Rx d 8 FF 00 0C FE 00 00 00 00 Length = 239910 BitCount = 124 ID = 1784 From 18465a2d2b8335d69167faaa52dbfc9a304a4fdb Mon Sep 17 00:00:00 2001 From: Alexander Bessman Date: Thu, 12 Sep 2019 10:34:54 +0200 Subject: [PATCH 3/4] Document log entry types ignored by ASCReader --- can/io/asc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/can/io/asc.py b/can/io/asc.py index d66611fa6..2da982f7a 100644 --- a/can/io/asc.py +++ b/can/io/asc.py @@ -26,7 +26,8 @@ class ASCReader(BaseIOHandler): """ - Iterator of CAN messages from a ASC logging file. + Iterator of CAN messages from a ASC logging file. Meta data (comments, + bus statistics, J1939 Transport Protocol messages) is ignored. TODO: turn relative timestamps back to absolute form """ From 26ea73ec303d09ffef3d1c0c1518cd6ec4d63376 Mon Sep 17 00:00:00 2001 From: Alexander Bessman Date: Thu, 12 Sep 2019 10:44:46 +0200 Subject: [PATCH 4/4] Add some more J1939TP examples --- test/data/logfile.asc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/data/logfile.asc b/test/data/logfile.asc index 842c463fe..8582cbf05 100644 --- a/test/data/logfile.asc +++ b/test/data/logfile.asc @@ -9,11 +9,20 @@ Begin Triggerblock Sam Sep 30 15:06:13.191 2017 1.015991 1 Statistic: D 0 R 0 XD 0 XR 0 E 0 O 0 B 0.00% 1.015991 2 Statistic: D 0 R 0 XD 0 XR 0 E 0 O 0 B 0.00% 2.015992 1 Statistic: D 0 R 0 XD 0 XR 0 E 0 O 0 B 0.00% + 3.098426 1 18EBFF00x Rx d 8 01 A0 0F A6 60 3B D1 40 Length = 273910 BitCount = 141 ID = 418119424x + 3.148421 1 18EBFF00x Rx d 8 02 1F DE 80 25 DF C0 2B Length = 271910 BitCount = 140 ID = 418119424x + 3.197693 1 18EBFF00x Rx d 8 03 E1 00 4B FF FF 3C 0F Length = 283910 BitCount = 146 ID = 418119424x + 3.248765 1 18EBFF00x Rx d 8 04 00 4B FF FF FF FF FF Length = 283910 BitCount = 146 ID = 418119424x 3.297743 1 J1939TP FEE3p 6 0 0 - Rx d 23 A0 0F A6 60 3B D1 40 1F DE 80 25 DF C0 2B E1 00 4B FF FF 3C 0F 00 4B FF FF FF FF FF FF FF FF FF FF FF FF 17.876707 CAN 1 Status:chip status error passive - TxErr: 131 RxErr: 0 17.876708 1 6F9 Rx d 8 05 0C 00 00 00 00 00 00 Length = 240015 BitCount = 124 ID = 1785 17.876976 1 6F8 Rx d 8 FF 00 0C FE 00 00 00 00 Length = 239910 BitCount = 124 ID = 1784 18.015997 1 Statistic: D 2 R 0 XD 0 XR 0 E 0 O 0 B 0.04% + 20.105214 2 18EBFF00x Rx d 8 01 A0 0F A6 60 3B D1 40 Length = 273925 BitCount = 141 ID = 418119424x + 20.155119 2 18EBFF00x Rx d 8 02 1F DE 80 25 DF C0 2B Length = 272152 BitCount = 140 ID = 418119424x + 20.204671 2 18EBFF00x Rx d 8 03 E1 00 4B FF FF 3C 0F Length = 283910 BitCount = 146 ID = 418119424x + 20.248887 2 18EBFF00x Rx d 8 04 00 4B FF FF FF FF FF Length = 283925 BitCount = 146 ID = 418119424x + 20.305233 2 J1939TP FEE3p 6 0 0 - Rx d 23 A0 0F A6 60 3B D1 40 1F DE 80 25 DF C0 2B E1 00 4B FF FF 3C 0F 00 4B FF FF FF FF FF FF FF FF FF FF FF FF 113.016026 1 Statistic: D 0 R 0 XD 0 XR 0 E 0 O 0 B 0.00% 113.016026 2 Statistic: D 0 R 0 XD 0 XR 0 E 0 O 0 B 0.00% End TriggerBlock