Skip to content

Formats and fidelity ​

How much of a file CanViewer shows depends on the format. DBC is read by CanViewer's own parser (see Supported DBC statements). Every other format is read by canmatrix, running under Pyodide, and mapped into the same model. This page measures those readers on real test files. Every number in the tables below is generated from the pinned test baselines, so it is what the tests last saw, not an estimate.

How it is measured ​

The test corpus is the test files of two open-source projects, vendored as git submodules under third_party/: canmatrix (tag 1.3.3.1, BSD-2-Clause) and cantools (tag 45.1.2, MIT). The suite import-corpus.test.ts reads every file in a format CanViewer imports through canmatrix, under Pyodide in Node (the runtime the app uses) with the network blocked, and pins the result in import-corpus-baseline.json.

Where a file has a DBC twin, a DBC file that describes the same database, the suite also compares the two field by field through CanViewer's model (compare.ts): the twin read by CanViewer's parser against the file read by canmatrix. canmatrix's twins are the files in its tests/reference/ directories, which an older canmatrix converted from one source file per format; cantools pairs its files by name. A difference can therefore come from the reader or from the old conversion. Either way it is pinned, and any change, better or worse, fails the suite until the baseline is updated on purpose.

Reading the corpus ​

One row per format, over every corpus file of that format. Read means canmatrix returned at least one message, Read, no messages that it returned a database without any, and Failed that it raised an error. With reader notes counts files for which canmatrix printed warnings or errors; CanViewer shows those as parse problems.

FormatExtensionsCorpus filesReadRead, no messagesFailedMessagesSignalsWith reader notes
ARXML (AUTOSAR).arxml28176510650318
KCD (Kayak).kcd1714123591,0760
SYM (PEAK PCAN Symbol Editor).sym2928101738179
DBF (Busmaster).dbf8305660
Excel.xlsx87011126190
JSON (canmatrix).json8602884790
YAML (canmatrix).yaml, .yml8008000
FIBEX.xml8008000
ODX.odx0––––––
All formats114758318443,50027

ODX is read by the same adapter, but neither project has an ODX test file, so it is untested.

Compared with the DBC twin ​

How many of the files with a twin come out identical to it, how many differ, and how many could not be read at all.

FormatFiles with a DBC twinIdentical to the twinWith differencesNothing readDifference lines
ARXML (AUTOSAR)80621,360
KCD (Kayak)10172338
SYM (PEAK PCAN Symbol Editor)120120765
DBF (Busmaster)812510
Excel80711,439
JSON (canmatrix)80621,304
YAML (canmatrix)80088
FIBEX80088
All formats70240285,232

What differs, by format. Each cell counts the files (out of the number in the column header) that show at least one difference of that kind.

What differs from the DBC twinARXML (8)KCD (10)SYM (12)DBF (8)Excel (8)JSON (8)YAML (8)FIBEX (8)
Nothing read (the reader failed)22–51288
Message missing333–33––
Message the reader adds333–13––
Message: extended (29-bit) flag––––1–––
Message: name633–33––
Message: DLC––4–2–––
Message: sender–13––2––
Message: frame format (classic, CAN FD, J1939)––––2–––
Message: comment111156––
Message: attribute value523–35––
Signal missing339–53––
Signal the reader adds337–43––
Signal: start bit–12–1–––
Signal: byte order–12–––––
Signal: value type (signed, unsigned, float)311–3–––
Signal: factor––––1–––
Signal: offset––––6–––
Signal: minimum521–44––
Signal: maximum511–64––
Signal: unit5–3–44––
Signal: receivers––2––2––
Signal: multiplexing2–––12––
Signal: value descriptions3–3–15––
Signal: comment421126––
Signal: attribute value121–11––
Node missing––2––2––
Node the reader adds–1–1––––
Node: comment–2––2–––
Node: attribute value22––2–––
Database: attribute value––2–1–––
Value table missing11––11––
Value table the reader adds––6–––––
Attribute definition missing558–55––
Attribute definition the reader adds6–12–7–––
Attribute definition: type, range, default or enum values–1112–––
Attribute the reader adds to objects (once per name)6112–21––

The differences behind each count are listed, line by line, in the baseline file. Some patterns stand out:

  • YAML and FIBEX read none of their eight files: canmatrix's YAML reader cannot load the files canmatrix itself wrote in its tests (could not determine a constructor), and its FIBEX reader fails on all of them (KeyError: 'CANCHANNEL01').
  • SYM loses signals: canmatrix's SYM reader drops multiplexed signals.
  • ARXML: canmatrix finds no frames in AUTOSAR 3 files unless the cluster information is ignored, so CanViewer reads such a file a second time that way and reports that it did. It fails on three of cantools' AUTOSAR 4.2 files.
  • Attribute definitions differ for most formats because those formats have no such concept: the reader invents none, and adds its own (the ARXML reader, for one, adds ISignalName and others to every signal).

Every file ​

All corpus files, with what canmatrix read from each
FileFormatClustersMessagesSignalsReader notesDifferences from the twinError
canmatrix/tests/files/arxml/ARXMLCompuMethod1.arxmlARXML1001
canmatrix/tests/files/arxml/ARXMLContainerTest.arxmlARXML15105
canmatrix/tests/files/arxml/ARXMLSecuredPDUTest.arxmlARXML122–
canmatrix/tests/files/arxml/ARXML_min_max.arxmlARXML1166
canmatrix/tests/files/arxml/MyECU.ecuc.arxmlARXML124–
canmatrix/tests/files/arxml/test.arxmlARXML1281521515
canmatrix/tests/files/dbf/test.dbfDBF122–0
canmatrix/tests/files/json/test.jsonJSON122–3
canmatrix/tests/files/kcd/test.kcdKCD126157–23
canmatrix/tests/files/sym/test.symSYM128158458
canmatrix/tests/files/xlsx/test.xlsxExcel127154–482
canmatrix/tests/reference/from_arxml/test.kcdKCD128158–86
canmatrix/tests/reference/from_arxml/test_CAN.dbfDBF–00–1ArbitrationIdOutOfRange: ID out of range
canmatrix/tests/reference/from_arxml/test_CAN.jsonJSON128158–312
canmatrix/tests/reference/from_arxml/test_CAN.symSYM1281572150
canmatrix/tests/reference/from_arxml/test_CAN.xlsxExcel127154–484
canmatrix/tests/reference/from_arxml/test_CAN.xmlFIBEX–00–1KeyError: 'CANCHANNEL01'
canmatrix/tests/reference/from_arxml/test_CAN.yamlYAML–00–1ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python…
canmatrix/tests/reference/from_dbc/test.arxmlARXML122135
canmatrix/tests/reference/from_dbc/test.dbfDBF122–4
canmatrix/tests/reference/from_dbc/test.jsonJSON122–17
canmatrix/tests/reference/from_dbc/test.kcdKCD122–7
canmatrix/tests/reference/from_dbc/test.symSYM122–20
canmatrix/tests/reference/from_dbc/test.xlsxExcel122–13
canmatrix/tests/reference/from_dbc/test.xmlFIBEX–00–1KeyError: 'CANCHANNEL01'
canmatrix/tests/reference/from_dbc/test.yamlYAML–00–1ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python…
canmatrix/tests/reference/from_dbf/test.arxmlARXML122133
canmatrix/tests/reference/from_dbf/test.jsonJSON122–17
canmatrix/tests/reference/from_dbf/test.kcdKCD122–8
canmatrix/tests/reference/from_dbf/test.symSYM122–21
canmatrix/tests/reference/from_dbf/test.xlsxExcel122–15
canmatrix/tests/reference/from_dbf/test.xmlFIBEX–00–1KeyError: 'CANCHANNEL01'
canmatrix/tests/reference/from_dbf/test.yamlYAML–00–1ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python…
canmatrix/tests/reference/from_json/test.arxmlARXML122124
canmatrix/tests/reference/from_json/test.dbfDBF122–1
canmatrix/tests/reference/from_json/test.kcdKCD122–0
canmatrix/tests/reference/from_json/test.symSYM122–10
canmatrix/tests/reference/from_json/test.xlsxExcel120–7
canmatrix/tests/reference/from_json/test.xmlFIBEX–00–1KeyError: 'CANCHANNEL01'
canmatrix/tests/reference/from_json/test.yamlYAML–00–1ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python…
canmatrix/tests/reference/from_kcd/test.arxmlARXML1261511297
canmatrix/tests/reference/from_kcd/test_test.kcd.dbfDBF–00–1ArbitrationIdOutOfRange: ID out of range
canmatrix/tests/reference/from_kcd/test_test.kcd.jsonJSON126157–403
canmatrix/tests/reference/from_kcd/test_test.kcd.symSYM1261562107
canmatrix/tests/reference/from_kcd/test_test.kcd.xlsxExcel125153–153
canmatrix/tests/reference/from_kcd/test_test.kcd.xmlFIBEX–00–1KeyError: 'CANCHANNEL01'
canmatrix/tests/reference/from_kcd/test_test.kcd.yamlYAML–00–1ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python…
canmatrix/tests/reference/from_sym/test.arxmlARXML1281521454
canmatrix/tests/reference/from_sym/test.dbfDBF–00–1ArbitrationIdOutOfRange: ID out of range
canmatrix/tests/reference/from_sym/test.jsonJSON128158–550
canmatrix/tests/reference/from_sym/test.kcdKCD128158–201
canmatrix/tests/reference/from_sym/test.xlsxExcel127154–284
canmatrix/tests/reference/from_sym/test.xmlFIBEX–00–1KeyError: 'CANCHANNEL01'
canmatrix/tests/reference/from_sym/test.yamlYAML–00–1ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python…
canmatrix/tests/reference/from_xls/test.arxmlARXML–0011ArbitrationIdOutOfRange: ID out of range
canmatrix/tests/reference/from_xls/test.dbfDBF–00–1ArbitrationIdOutOfRange: ID out of range
canmatrix/tests/reference/from_xls/test.jsonJSON–00–1ArbitrationIdOutOfRange: ID out of range
canmatrix/tests/reference/from_xls/test.kcdKCD–00–1ArbitrationIdOutOfRange: ID out of range
canmatrix/tests/reference/from_xls/test.symSYM125153–171
canmatrix/tests/reference/from_xls/test.xlsxExcel–00–1ArbitrationIdOutOfRange: ID out of range
canmatrix/tests/reference/from_xls/test.xmlFIBEX–00–1KeyError: 'CANCHANNEL01'
canmatrix/tests/reference/from_xls/test.yamlYAML–00–1ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python…
canmatrix/tests/reference/from_xlsx/test.arxmlARXML–0011ArbitrationIdOutOfRange: ID out of range
canmatrix/tests/reference/from_xlsx/test.dbfDBF–00–1ArbitrationIdOutOfRange: ID out of range
canmatrix/tests/reference/from_xlsx/test.jsonJSON–00–1ArbitrationIdOutOfRange: ID out of range
canmatrix/tests/reference/from_xlsx/test.kcdKCD–00–1ArbitrationIdOutOfRange: ID out of range
canmatrix/tests/reference/from_xlsx/test.symSYM125153–171
canmatrix/tests/reference/from_xlsx/test.xmlFIBEX–00–1KeyError: 'CANCHANNEL01'
canmatrix/tests/reference/from_xlsx/test.yamlYAML–00–1ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python…
cantools/tests/files/arxml/compu_method_no_category.arxmlARXML111–
cantools/tests/files/arxml/ecu-extract-4.2.arxmlARXML1001
cantools/tests/files/arxml/system-3.2.3.arxmlARXML12131
cantools/tests/files/arxml/system-4.2.arxmlARXML–00–AttributeError: 'NoneType' object has no attribute 'text'
cantools/tests/files/arxml/system-DAI-3.1.2.arxmlARXML1001
cantools/tests/files/arxml/system-bad-root-tag-4.2.arxmlARXML–00–AttributeError: 'NoneType' object has no attribute 'getparent'
cantools/tests/files/arxml/system-dangling-reference-4.2.arxmlARXML–00–AttributeError: 'NoneType' object has no attribute 'text'
cantools/tests/files/arxml/system-float-limits-missing-compu-scale-4.2.arxmlARXML111–
cantools/tests/files/arxml/system-float-values.arxmlARXML112–
cantools/tests/files/arxml/system-illegal-namespace-4.2.arxmlARXML1001
cantools/tests/files/arxml/system-illegal-root-4.2.arxmlARXML1001
cantools/tests/files/arxml/system-illegal-version-4.2.2.1.0.arxmlARXML1001
cantools/tests/files/arxml/system-missing-denominator-4.2.arxmlARXML111–
cantools/tests/files/arxml/system-missing-factor-4.2.arxmlARXML111–
cantools/tests/files/arxml/system-missing-rational-4.2.arxmlARXML1111
cantools/tests/files/kcd/auto_message_length.kcdKCD113–
cantools/tests/files/kcd/bad_message_length.kcdKCD111–2
cantools/tests/files/kcd/dump.kcdKCD1411–
cantools/tests/files/kcd/empty.kcdKCD000–
cantools/tests/files/kcd/message_layout.kcdKCD1816–
cantools/tests/files/kcd/signal_range.kcdKCD144–
cantools/tests/files/kcd/tester.kcdKCD137–
cantools/tests/files/kcd/the_homer.kcdKCD33393–
cantools/tests/files/kcd/vehicle.kcdKCD1217462–9
cantools/tests/files/sym/bad_message_length.symSYM110–11
cantools/tests/files/sym/big-endian.symSYM116–
cantools/tests/files/sym/comments_hex_and_motorola.symSYM1210217
cantools/tests/files/sym/empty-6.0.symSYM100–
cantools/tests/files/sym/empty-enum-6.0.symSYM110–
cantools/tests/files/sym/issue_138.symSYM111–
cantools/tests/files/sym/jopp-5.0.symSYM1442
cantools/tests/files/sym/jopp-6.0.symSYM1612
cantools/tests/files/sym/letter-terminated-can-id-6.0.symSYM110–
cantools/tests/files/sym/min-max-only-6.0.symSYM110–
cantools/tests/files/sym/multiplexed_variables.symSYM117–
cantools/tests/files/sym/receive-6.0.symSYM110–
cantools/tests/files/sym/send-6.0.symSYM110–
cantools/tests/files/sym/sendreceive-6.0.symSYM110–
cantools/tests/files/sym/signal-types-6.0.symSYM110–
cantools/tests/files/sym/special-chars-6.0.symSYM111–
cantools/tests/files/sym/test_extended_id_dump.symSYM120–14
cantools/tests/files/sym/test_multiline_enum.symSYM1612
cantools/tests/files/sym/test_multiplex_dump.symSYM111–15
cantools/tests/files/sym/type-extended-cycle-dash-p.symSYM1112
cantools/tests/files/sym/variables-color-enum-6.0.symSYM1114

DBC through canmatrix ​

canmatrix can read DBC too, but CanViewer does not use it for DBC: its own parser is more faithful. The suite mapper.test.ts shows how much, by reading the 58 real-world DBC files of the DBC corpus through canmatrix and the mapper, and comparing the result with CanViewer's own parse of the same file. It pins what differs in mapper-dbc-baseline.json.

Files
DBC files read through canmatrix58
Identical to CanViewer’s parser, no problems29
With differences29
With problems reported for canmatrix’s output11
With lines canmatrix could not read8
What canmatrix reads differentlyFilesDifference lines
Message missing1179
Message the reader adds68
Message: name11
Message: comment16
Message: attribute value11
Signal missing11
Signal the reader adds3275
Signal: value descriptions12
Signal: comment416
Node missing310
Node the reader adds23151
Attribute definition: type, range, default or enum values323

What is behind the largest counts:

  • canmatrix's DBC reader drops lines it cannot read, printing a message instead of failing. When the line is a BO_, it then attaches that message's signals to the previous message, which is where most signals the reader adds come from.
  • It creates a node for every sender that the file does not declare in BU_.
  • It drops comments on signals that do not exist (CanViewer reports those as parse problems instead) and applies long-name attributes to message names.
All 58 files
FileDifferencesProblemsLines not readMost frequent difference
acura_ilx_2016_nidec.dbc–––
bmw_e9x_e8x.dbc1––Node the reader adds (1)
cadillac_ct6_chassis.dbc–––
cadillac_ct6_object.dbc–––
cadillac_ct6_powertrain.dbc1––Node the reader adds (1)
chrysler_cusw.dbc455Message missing (2)
chrysler_pacifica_2017_hybrid_private_fusion.dbc–––
comma_body.dbc1––Node the reader adds (1)
ESR.dbc–––
fca_giorgio.dbc811Node the reader adds (7)
FORD_CADS_64.dbc15––Attribute definition: type, range, default or enum values (10)
FORD_CADS.dbc15––Attribute definition: type, range, default or enum values (10)
ford_cgea1_2_bodycan_2011.dbc–––
ford_cgea1_2_ptcan_2011.dbc–––
ford_fusion_2018_adas.dbc–––
ford_fusion_2018_pt.dbc–––
ford_lincoln_base_pt.dbc5––Attribute definition: type, range, default or enum values (3)
gm_global_a_chassis.dbc–––
gm_global_a_high_voltage_management.dbc–––
gm_global_a_lowspeed_1818125.dbc–––
gm_global_a_lowspeed.dbc135040Message missing (13)
gm_global_a_object.dbc3––Message missing (1)
gm_global_a_powertrain_expansion.dbc–––
gwm_haval_h6_phev_2024.dbc1––Node the reader adds (1)
hongqi_hs5.dbc–––
hyundai_2015_ccan.dbc–––
hyundai_2015_mcan.dbc2––Message missing (1)
hyundai_i30_2014.dbc–––
hyundai_santafe_2007.dbc–––
luxgen_s5_2015.dbc–––
mazda_2017.dbc21–Signal: value descriptions (2)
mazda_3_2019.dbc–––
mazda_radar.dbc–––
mazda_rx8.dbc–––
mercedes_benz_e350_2010.dbc–––
Model3CAN.dbc2––Message: name (1)
nissan_xterra_2011.dbc–––
opel_omega_2001.dbc–––
psa_aee2010_r3.dbc23––Node the reader adds (14)
rivian_park_assist_can.dbc1––Node the reader adds (1)
rivian_primary_actuator.dbc161–Signal: comment (13)
tesla_can.dbc52–Node the reader adds (4)
tesla_model3_party.dbc11––Node the reader adds (11)
tesla_model3_vehicle.dbc15––Node the reader adds (15)
tesla_powertrain.dbc8––Node missing (6)
toyota_2017_ref_pt.dbc2942929Signal the reader adds (259)
toyota_adas.dbc–––
toyota_iQ_2009_can.dbc–––
toyota_prius_2010_pt.dbc1––Node the reader adds (1)
toyota_radar_dsu_tssp.dbc–––
toyota_tss2_adas.dbc–––
volvo_v40_2017_pt.dbc244Node the reader adds (2)
volvo_v60_2015_pt.dbc–––
vw_meb.dbc621818Node the reader adds (32)
vw_mlb.dbc13––Node the reader adds (13)
vw_mqb.dbc9––Node the reader adds (5)
vw_mqbevo.dbc261010Node the reader adds (15)
vw_pq.dbc1411Node the reader adds (13)

Keeping this page current ​

After a change that alters what a reader produces, the suites fail until their baselines are regenerated (see Tests and baselines). Then regenerate this page from the new baselines and commit both:

sh
node scripts/docs/fidelity-tables.mjs

reference-docs.test.ts fails while the page and the baselines disagree.