mapcan 0.24.2__tar.gz → 0.25.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mapcan-0.24.2 → mapcan-0.25.1}/.gitignore +4 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/PKG-INFO +3 -3
- {mapcan-0.24.2 → mapcan-0.25.1}/README.md +2 -2
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/cli.md +29 -1
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/format-changelog.md +36 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/format.md +138 -11
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/web.md +2 -2
- {mapcan-0.24.2 → mapcan-0.25.1}/pyproject.toml +1 -1
- mapcan-0.24.2/schema/mapcan.schema.json → mapcan-0.25.1/schema/mapcan-part.schema.json +352 -402
- mapcan-0.24.2/schema/mapcan-part.schema.json → mapcan-0.25.1/schema/mapcan.schema.json +962 -198
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/__init__.py +1 -1
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/cli.py +42 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/codegen/c.py +15 -3
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/codegen/common.py +10 -1
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/codegen/py.py +5 -3
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/diff.py +79 -20
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/docmodel.py +3 -1
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/export/dbc.py +3 -2
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/export/eds.py +56 -11
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/fmt.py +6 -3
- mapcan-0.25.1/src/mapcan/importers/eds.py +295 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/layout.py +3 -1
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/locale/ru.py +158 -4
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/lsp/edits.py +4 -2
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/model.py +153 -2
- mapcan-0.25.1/src/mapcan/od.py +75 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/resolve.py +63 -34
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/upgrade.py +6 -1
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/validate.py +150 -6
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/web/app.py +7 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/web/session.py +6 -2
- mapcan-0.25.1/src/mapcan/web/static/assets/index-DDbx5OWy.css +1 -0
- mapcan-0.25.1/src/mapcan/web/static/assets/index-yljndu2x.js +37 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/web/static/index.html +2 -2
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/web/yamlops.py +6 -2
- mapcan-0.25.1/tests/data/canopen-od.yaml +51 -0
- mapcan-0.25.1/tests/data/vendor-io.eds +185 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/golden/reference.md +10 -12
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/golden/reference_bus1.h +14 -26
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_codegen.py +61 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_diff.py +33 -1
- mapcan-0.25.1/tests/test_eds_import.py +102 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_i18n.py +16 -6
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_lsp_edits.py +5 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_model.py +56 -3
- mapcan-0.25.1/tests/test_od.py +123 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_validate.py +59 -1
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_web_errors.py +11 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_yamlops.py +12 -3
- mapcan-0.24.2/src/mapcan/web/static/assets/index-CrDV-cv2.css +0 -1
- mapcan-0.24.2/src/mapcan/web/static/assets/index-DbzxbTZB.js +0 -36
- {mapcan-0.24.2 → mapcan-0.25.1}/LICENSE +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/NOTICE +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/THIRD_PARTY_NOTICES.md +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/ci-example.md +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/images/demo-dark.gif +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/images/demo-light.gif +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/images/document-pages-dark.png +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/images/document-pages-light.png +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/images/vscode-demo-dark.gif +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/images/vscode-demo-light.gif +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/images/vscode-hover-dark.png +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/images/vscode-hover-light.png +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/images/vscode-map-dark.png +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/images/vscode-map-light.png +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/images/vscode-problems-dark.png +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/images/vscode-problems-light.png +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/images/vscode-quickfix-dark.gif +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/images/vscode-quickfix-light.gif +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/images/web-frame-dark.png +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/images/web-frame-light.png +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/logo-dark.svg +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/logo-light.svg +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/templates.md +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/docs/zephyr.md +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/examples/canopen-node.yaml +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/examples/j1939.yaml +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/examples/minimal.yaml +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/examples/tractor/powertrain.yaml +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/examples/tractor/tractor.yaml +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/examples/vehicle-can.yaml +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/examples/zephyr/CMakeLists.txt +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/examples/zephyr/prj.conf +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/examples/zephyr/src/main.c +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/schema/mapcan-part-v1.schema.json +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/schema/mapcan-v1.schema.json +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/bits.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/canopen.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/codegen/__init__.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/codegen/zephyr.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/diagnostics.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/export/__init__.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/export/pdf.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/export/text.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/export/xlsx.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/extras.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/fonts/OFL-PTSerif.txt +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/fonts/OFL.txt +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/fonts/PT_Sans-Web-Bold.ttf +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/fonts/PT_Sans-Web-BoldItalic.ttf +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/fonts/PT_Sans-Web-Italic.ttf +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/fonts/PT_Sans-Web-Regular.ttf +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/fonts/PT_Serif-Web-Bold.ttf +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/fonts/PT_Serif-Web-BoldItalic.ttf +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/fonts/PT_Serif-Web-Italic.ttf +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/fonts/PT_Serif-Web-Regular.ttf +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/i18n.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/importers/__init__.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/importers/dbc.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/launcher.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/loader.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/locale/__init__.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/lsp/__init__.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/lsp/analysis.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/lsp/exports.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/lsp/server.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/protocols.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/schema.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/templates/document.html.j2 +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/templates/document.md.j2 +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/templates/pdf/gost-19.typ +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/templates/pdf/gost-2.105.typ +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/templates/pdf/gost-7.32.typ +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/templates/pdf/lib.typ +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/templates/pdf/mapcan.typ +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/templates/xlsx_style.yaml +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/units.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/updates.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/userconfig.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/web/__init__.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/web/devicefile.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/web/examples.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/web/newmap.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/web/static/OFL-Sora.txt +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/src/mapcan/web/static/favicon.svg +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/__init__.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/conftest.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/data/bit_layouts.json +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/data/invalid_map.yaml +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/data/legacy.yaml +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/data/logo.png +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/data/logo.svg +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/data/reference.yaml +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/data/v1/canopen-node.yaml +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/data/v1/j1939.yaml +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/data/v1/reference.yaml +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/data/v1/vehicle-can.yaml +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/data/zephyr_stub/zephyr/drivers/can.h +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/data/zephyr_stub/zephyr/kernel.h +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_auth.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_cli.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_device_file.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_direction.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_eds.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_exchange.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_export.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_extras.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_fmt.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_format_v1.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_import.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_include.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_j1939.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_launcher.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_loader_fast.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_lsp.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_lsp_server.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_new_signal.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_source.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_templates.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_titles.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_units.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_updates.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_upgrade.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_web.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_web_session.py +0 -0
- {mapcan-0.24.2 → mapcan-0.25.1}/tests/test_workspace.py +0 -0
|
@@ -20,6 +20,9 @@ env/
|
|
|
20
20
|
htmlcov/
|
|
21
21
|
.tox/
|
|
22
22
|
|
|
23
|
+
# npm workspaces (web, vscode, packages/*): dependencies installed at the root
|
|
24
|
+
node_modules/
|
|
25
|
+
|
|
23
26
|
# Generated output
|
|
24
27
|
out/
|
|
25
28
|
output/
|
|
@@ -45,3 +48,4 @@ examples_ui/
|
|
|
45
48
|
# Browser tests of the web editor
|
|
46
49
|
web/test-results/
|
|
47
50
|
web/playwright-report/
|
|
51
|
+
node_modules
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: mapcan
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.25.1
|
|
4
4
|
Summary: A YAML map of CAN signals as the single source of truth: validation, Excel/PDF/Markdown/HTML, DBC, C/Python code
|
|
5
5
|
Project-URL: Homepage, https://github.com/ordu1453/mapcan
|
|
6
6
|
Project-URL: Documentation, https://github.com/ordu1453/mapcan/blob/main/docs/format.md
|
|
@@ -207,7 +207,7 @@ mapcan build my-map.yaml -o build/ # every output at once
|
|
|
207
207
|
| ⚙️ | C: IDs, enums, structs, `pack`/`unpack`; no dynamic memory | `mapcan gen c` |
|
|
208
208
|
| 🐍 | Python module for tests and test benches | `mapcan gen py` |
|
|
209
209
|
| 🔀 | Comparison of two versions, changelog | `mapcan diff` |
|
|
210
|
-
| 📥 | A map from an existing DBC | `mapcan import dbc` |
|
|
210
|
+
| 📥 | A map from an existing DBC, or a CANopen device from its EDS or DCF | `mapcan import dbc`, `mapcan import eds` |
|
|
211
211
|
|
|
212
212
|
<p align="center">
|
|
213
213
|
<picture>
|
|
@@ -281,7 +281,7 @@ multiplexing) and [tractor/](https://github.com/ordu1453/mapcan/blob/main/exampl
|
|
|
281
281
|
## Documentation
|
|
282
282
|
|
|
283
283
|
* **[Map format](https://github.com/ordu1453/mapcan/blob/main/docs/format.md)**: every field, the rules, included files, versioning.
|
|
284
|
-
* **[Command line](https://github.com/ordu1453/mapcan/blob/main/docs/cli.md)**: commands, validation, generated code, document customization, DBC import.
|
|
284
|
+
* **[Command line](https://github.com/ordu1453/mapcan/blob/main/docs/cli.md)**: commands, validation, generated code, document customization, DBC, EDS and DCF import.
|
|
285
285
|
* **[Web editor](https://github.com/ordu1453/mapcan/blob/main/docs/web.md)**: the app, browser mode and its security, keyboard shortcuts, HTTP API.
|
|
286
286
|
* **[VS Code extension](https://github.com/ordu1453/mapcan/blob/main/vscode/README.md)**: features, settings, commands.
|
|
287
287
|
* **[PDF templates](https://github.com/ordu1453/mapcan/blob/main/docs/templates.md)**: ESKD/GOST details, logos, fonts, custom templates.
|
|
@@ -135,7 +135,7 @@ mapcan build my-map.yaml -o build/ # every output at once
|
|
|
135
135
|
| ⚙️ | C: IDs, enums, structs, `pack`/`unpack`; no dynamic memory | `mapcan gen c` |
|
|
136
136
|
| 🐍 | Python module for tests and test benches | `mapcan gen py` |
|
|
137
137
|
| 🔀 | Comparison of two versions, changelog | `mapcan diff` |
|
|
138
|
-
| 📥 | A map from an existing DBC | `mapcan import dbc` |
|
|
138
|
+
| 📥 | A map from an existing DBC, or a CANopen device from its EDS or DCF | `mapcan import dbc`, `mapcan import eds` |
|
|
139
139
|
|
|
140
140
|
<p align="center">
|
|
141
141
|
<picture>
|
|
@@ -209,7 +209,7 @@ multiplexing) and [tractor/](examples/tractor/tractor.yaml) (a map in two files)
|
|
|
209
209
|
## Documentation
|
|
210
210
|
|
|
211
211
|
* **[Map format](docs/format.md)**: every field, the rules, included files, versioning.
|
|
212
|
-
* **[Command line](docs/cli.md)**: commands, validation, generated code, document customization, DBC import.
|
|
212
|
+
* **[Command line](docs/cli.md)**: commands, validation, generated code, document customization, DBC, EDS and DCF import.
|
|
213
213
|
* **[Web editor](docs/web.md)**: the app, browser mode and its security, keyboard shortcuts, HTTP API.
|
|
214
214
|
* **[VS Code extension](vscode/README.md)**: features, settings, commands.
|
|
215
215
|
* **[PDF templates](docs/templates.md)**: ESKD/GOST details, logos, fonts, custom templates.
|
|
@@ -18,6 +18,7 @@ mapcan gen py FILE [-o DIR] [--bus NAME]
|
|
|
18
18
|
mapcan build FILE [-o DIR] [--formats xlsx,pdf,md,html,dbc,eds,c,py] [--pdf-template NAME]
|
|
19
19
|
mapcan diff OLD NEW [--format text|md|json] [--fail-on breaking|any]
|
|
20
20
|
mapcan import dbc FILE.dbc [-o FILE.yaml] [--title TEXT] [--lang en] [--force]
|
|
21
|
+
mapcan import eds FILE.eds|FILE.dcf [-o FILE.yaml] [--node-id N] [--title TEXT] [--lang en] [--force]
|
|
21
22
|
mapcan migrate FILE… [--check] # former field names → current ones, format v1 → v2
|
|
22
23
|
mapcan fmt FILE… [--check] # keys in one order, comments and layout kept
|
|
23
24
|
mapcan schema [-o schema.json] [--part] # --part: schema of an included file
|
|
@@ -188,6 +189,29 @@ becomes a `can` bus with explicit IDs. Value names become identifiers (`Not avai
|
|
|
188
189
|
`NOT_AVAILABLE`, the original text goes to the description), and whatever DBC cannot express is
|
|
189
190
|
reported as a warning.
|
|
190
191
|
|
|
192
|
+
## Importing an EDS or DCF
|
|
193
|
+
|
|
194
|
+
`mapcan import eds` describes a CANopen device from the EDS or DCF (CiA 306) its vendor ships: a
|
|
195
|
+
map with one `canopen` bus and that device, named and titled after `ProductName` (the vendor goes to
|
|
196
|
+
`document.organization`). It brings over:
|
|
197
|
+
|
|
198
|
+
- the TPDOs and RPDOs 1–4 from their communication and mapping parameters (1800/1A00, 1400/1600):
|
|
199
|
+
the COB-ID (an `id` only when it is not the default `$NODEID+base`), the transmission type (event,
|
|
200
|
+
or on request for RTR-only), the inhibit time (`inhibit_ms`), the event timer (`cycle_ms` of a
|
|
201
|
+
TPDO, `timeout_ms` of an RPDO);
|
|
202
|
+
- the mapped objects as signals in their places, with `index`/`subindex`, the data type
|
|
203
|
+
(`INTEGER*` → `twos_complement`, `REAL*` → `float`, strings → `bytes`), the object's name as
|
|
204
|
+
the title (and, in snake case, the signal's name), the limits and a non-zero default value;
|
|
205
|
+
- the producer heartbeat time (1017) as a heartbeat frame.
|
|
206
|
+
|
|
207
|
+
A DCF gives the configured values (`ParameterValue`), the node ID and the bit rate
|
|
208
|
+
(`[DeviceComissioning]`). An EDS has no node ID: `--node-id` sets it, otherwise 1 is used with a
|
|
209
|
+
warning; the bit rate is set only when the device supports one. Warnings list what the map cannot
|
|
210
|
+
hold: dummy entries of a mapping (their bits stay free), PDOs beyond the fourth, synchronous
|
|
211
|
+
transmission types, disabled PDOs (imported as enabled), types of the manufacturer (imported as
|
|
212
|
+
unsigned numbers) and the dictionary objects that no PDO carries. `mapcan export eds` and `mapcan
|
|
213
|
+
import eds` round-trip the PDOs and their objects.
|
|
214
|
+
|
|
191
215
|
## Comparing versions
|
|
192
216
|
|
|
193
217
|
`mapcan diff OLD NEW` lists what changed between two versions of a map and marks the changes that
|
|
@@ -200,7 +224,11 @@ break devices built against the old one (`[breaking]` in text, **breaking:** in
|
|
|
200
224
|
| a frame's ID, CANopen function, PGN, priority, length or IDE changed; a device's node ID or address | timing, transmission mode, sender and receivers |
|
|
201
225
|
| a signal moved or resized; its byte order, representation, encoding, factor or offset changed | titles, descriptions, units of display, initial values |
|
|
202
226
|
| a value renamed or renumbered; a flag moved; the multiplexer or a multiplexer value changed | limits widened or removed |
|
|
203
|
-
| a limit narrowed or added | |
|
|
227
|
+
| a limit narrowed or added | a frame, signal or flag renamed in its place (`renamed`, see below) |
|
|
228
|
+
|
|
229
|
+
A frame, signal or flag that keeps its place and layout under a new name is listed as `renamed`, with its old
|
|
230
|
+
and new [canonical path](format.md#paths-of-signals) (`old` and `new` in JSON), for tools that refer to
|
|
231
|
+
signals by path. The bus does not change; the names in generated code and DBC do.
|
|
204
232
|
|
|
205
233
|
`--fail-on breaking` exits with code 1 when a breaking change is found, `--fail-on any` on any change;
|
|
206
234
|
[ci-example.md](ci-example.md#breaking-changes-in-pull-requests) uses it to check pull requests.
|
|
@@ -5,6 +5,42 @@ Changes of the map format by mapcan version. Up to 0.23 they keep `mapcan: 1`; 0
|
|
|
5
5
|
[Versioning and compatibility](format.md#versioning-and-compatibility). A map that uses a field
|
|
6
6
|
needs at least the version of mapcan that introduced it; former names stay readable.
|
|
7
7
|
|
|
8
|
+
## 0.26
|
|
9
|
+
|
|
10
|
+
- The object dictionary of CANopen (#151): `objects` of a bus (objects every device of the bus has) and of a
|
|
11
|
+
device (its own, in the manufacturer area; one with an index of the bus's takes its place), read and written by SDO
|
|
12
|
+
([Object dictionary](format.md#object-dictionary)). An object is a variable (`data_type`) or a record or an
|
|
13
|
+
array of `entries`, with `access`, `default`, `unit`, and `source` for a value from the map: a master reads the
|
|
14
|
+
map version (`map_version.*`, `layout_crc32`) a device was built from. New rules `od-protocol`,
|
|
15
|
+
`od-object-area`, `od-object-duplicate`, `od-object-shape`, `od-default` and `od-unknown`. `mapcan export eds`
|
|
16
|
+
writes the objects as described. Maps without `objects` are unchanged.
|
|
17
|
+
- The layout of an SDO frame: bytes 1–3 are one field `sdo_object` (index and subindex), an enum of the
|
|
18
|
+
objects of the device's dictionary and of those the exchanges address, and the multiplexer selector of the
|
|
19
|
+
values of the exchanges, whatever their indices (was `sdo_index` and `sdo_subindex`, the selector only when
|
|
20
|
+
all exchanges had one index, otherwise one `sdo_data`). An `sdo_rx`/`sdo_tx` frame without exchanges is laid
|
|
21
|
+
out too. The generated code, DBC and documents of SDO frames change, and so does the `layout_crc32` of a map
|
|
22
|
+
with SDO frames.
|
|
23
|
+
- The `index` of a PDO signal may be in the standardized interface profiles too: `canopen-od` reports one
|
|
24
|
+
outside 0x2000..0xBFFF (was 0x2000..0x9FFF).
|
|
25
|
+
|
|
26
|
+
## 0.25
|
|
27
|
+
|
|
28
|
+
- A field of a bit field can be the multiplexer selector (#149): `multiplexer: true` on a flag, as on a signal.
|
|
29
|
+
The bit field holding it has no `mux`. DBC export writes the field as the multiplexer signal; the generated
|
|
30
|
+
C and Python code read the selector from the bit field. Maps without it are unchanged, and so is their
|
|
31
|
+
`layout_crc32`.
|
|
32
|
+
- The canonical path of a frame, signal or flag, `bus.frame.signal.flag`, names it for references from outside
|
|
33
|
+
the map (#100, [Paths of signals](format.md#paths-of-signals)). For it to be unique, a repeated bus name is
|
|
34
|
+
now the error `duplicate-bus-name`. `mapcan diff` reports a frame, signal or flag renamed in its place as
|
|
35
|
+
`renamed` with the old and the new path, instead of a removal and an addition (which were breaking).
|
|
36
|
+
|
|
37
|
+
## 0.24.3
|
|
38
|
+
|
|
39
|
+
- `invalid_raw` of a signed signal accepts the bits of a value (#148): of an 8-bit `twos_complement` signal
|
|
40
|
+
`0xFF` means `-1`, as the code sent on the bus, instead of the error `invalid-overflow`. Values from 2^(n−1)
|
|
41
|
+
to 2^n−1 are read in the signal's representation; signed values are written as before. The editors write
|
|
42
|
+
the values of `invalid_raw` in hex.
|
|
43
|
+
|
|
8
44
|
## 0.24
|
|
9
45
|
|
|
10
46
|
- **Format version 2** (`mapcan: 2`): a signal has four encodings instead of eight (#140), `number`, `enum`,
|
|
@@ -115,6 +115,7 @@ lint:
|
|
|
115
115
|
| `data_sample_point` | CAN FD: sample point of the data phase, percent (`75`) |
|
|
116
116
|
| `brs` | CAN FD: bit rate switch (BRS) of the frames by default, `true` if omitted. Set `false` when the nodes or the wiring cannot handle the data phase bit rate |
|
|
117
117
|
| `frames` | Frames whose sender is outside the map, with the receiving devices in `receivers`; also the CANopen broadcast frames (`nmt`, `sync`, `time`) |
|
|
118
|
+
| `objects` | CANopen: dictionary objects every device of the bus has (see [Object dictionary](#object-dictionary)) |
|
|
118
119
|
| `devices` | Devices |
|
|
119
120
|
|
|
120
121
|
### Device (`devices[]`)
|
|
@@ -127,6 +128,7 @@ lint:
|
|
|
127
128
|
| `node_id` | CANopen node address (1..127) |
|
|
128
129
|
| `address` | J1939 source address (0..253) |
|
|
129
130
|
| `description` | What the device is |
|
|
131
|
+
| `objects` | CANopen: the device's own dictionary objects, in the manufacturer area (see [Object dictionary](#object-dictionary)) |
|
|
130
132
|
| `frames` | The device's frames: those it transmits, plus the CANopen RX frames whose ID depends on its address (see [Sender and receivers](#sender-and-receivers)) |
|
|
131
133
|
|
|
132
134
|
### Frame (`frames[]`)
|
|
@@ -184,14 +186,14 @@ CANopen ID computation:
|
|
|
184
186
|
| `representation` | `number`: how the raw value is read as a number: `unsigned` (default), `twos_complement` (the usual signed integer), `ones_complement`, `sign_magnitude`, or `float` (IEEE 754, see [Floating point](#floating-point)). Generated C and Python code packs and unpacks the value in this representation; ones' complement and sign-magnitude have a symmetric range (−127…127 for 8 bits). DBC stores two's complement only, so the export warns about those two. Formerly `signed` + `signed_code` |
|
|
185
187
|
| `values` | Value table: `{0: NO_DATA, 1: {name: OK, description: "normal"}}` |
|
|
186
188
|
| `value_format` | `dec` \| `hex`: how values are shown in documents |
|
|
187
|
-
| `flags` | Bit field flags: `{bit, bit_length: 1, name, description, values}`; `bit` is the offset from the least significant bit of the field |
|
|
189
|
+
| `flags` | Bit field flags: `{bit, bit_length: 1, name, description, values, multiplexer}`; `bit` is the offset from the least significant bit of the field |
|
|
188
190
|
| `factor`, `offset`, `unit`, `min`, `max` | Physical conversion and range (in physical units) |
|
|
189
191
|
| `multiplexer` | `true` for the multiplexer selector signal |
|
|
190
192
|
| `mux` | Selector value (or list of values) for which the signal is present |
|
|
191
193
|
| `initial` | Default value in physical units (`…_INITIAL_RAW` in C, `GenSigStartValue` in DBC) |
|
|
192
194
|
| `source` | An integer `number`: the signal always carries a value from the map: `map_version.major`, `map_version.minor`, `map_version.patch` or `layout_crc32` (see [Map version in a frame](#map-version-in-a-frame)). Replaces `initial` |
|
|
193
195
|
| `invalid_raw` | An integer `number`: raw values that carry no value (see [Values without a value](#values-without-a-value)): `0xFF`, a list, ranges `0xFF00..0xFFFF`, or `{not_available: …, error: …}`. Formerly `invalid` |
|
|
194
|
-
| `index`, `subindex` | CANopen dictionary object mapped into the PDO (see [
|
|
196
|
+
| `index`, `subindex` | CANopen dictionary object mapped into the PDO (see [EDS](#eds)) |
|
|
195
197
|
| `spn` | J1939 suspect parameter number (SAE J1939-71), 0..524287. Shown in documents, written to DBC as the `SPN` signal attribute and to code as `<FRAME>_<SIGNAL>_SPN` |
|
|
196
198
|
| `comment` | A note or caveat (see [Text fields](#text-fields)) |
|
|
197
199
|
|
|
@@ -233,6 +235,11 @@ SAE J1939-71:
|
|
|
233
235
|
| `not_available` | The sender has no value (the parameter is not supported or not ready) |
|
|
234
236
|
| `error` | The sender has the parameter but reports a fault in it |
|
|
235
237
|
|
|
238
|
+
The values of a signed signal (`representation` other than `unsigned`) may be written either as
|
|
239
|
+
signed numbers or as their bits: of an 8-bit `twos_complement` signal, `0xFF` is the same as `-1` and
|
|
240
|
+
`0x80..0x8F` the same as `-128..-113`. Values from 2^(n−1) to 2^n−1 of an n-bit signal are read as
|
|
241
|
+
bits in the signal's representation; documents and generated code show the signed values.
|
|
242
|
+
|
|
236
243
|
Documents list both. Generated C has `<frame>_<signal>_is_not_available(raw)` and
|
|
237
244
|
`<frame>_<signal>_is_error(raw)`, and a single "not available" value is also
|
|
238
245
|
`<FRAME>_<SIGNAL>_INVALID_RAW`; the Python module has the same functions. DBC has one invalid value
|
|
@@ -331,6 +338,22 @@ signals:
|
|
|
331
338
|
Signals with different `mux` values may occupy the same bits; this is not an overlap. A signal
|
|
332
339
|
without `mux` is present for every selector value.
|
|
333
340
|
|
|
341
|
+
The selector can also be a field of a bit field: `multiplexer: true` on the flag. The bit field itself
|
|
342
|
+
then has no `mux`. In DBC the field is the multiplexer signal; the generated code reads it from the bit field.
|
|
343
|
+
|
|
344
|
+
```yaml
|
|
345
|
+
signals:
|
|
346
|
+
- name: status
|
|
347
|
+
encoding: bitfield
|
|
348
|
+
byte: 0
|
|
349
|
+
byte_length: 1
|
|
350
|
+
flags:
|
|
351
|
+
- {name: ready, bit: 0}
|
|
352
|
+
- {name: page, bit: 4, bit_length: 2, multiplexer: true, values: {0: VOLTAGES, 1: TEMPERATURES}}
|
|
353
|
+
- {name: voltage_data, byte: 1, byte_length: 7, encoding: bytes, mux: 0}
|
|
354
|
+
- {name: temperature_data, byte: 1, byte_length: 7, encoding: bytes, mux: 1}
|
|
355
|
+
```
|
|
356
|
+
|
|
334
357
|
### Protocols and CAN IDs
|
|
335
358
|
|
|
336
359
|
| `protocol` | How the ID is obtained |
|
|
@@ -389,7 +412,68 @@ and unpacks the whole payload; splitting it into packets is the job of the J1939
|
|
|
389
412
|
A signal longer than 64 bits can only be bytes (`encoding: bytes`, a byte array or text,
|
|
390
413
|
little-endian, starting at a byte boundary).
|
|
391
414
|
|
|
392
|
-
### Object dictionary
|
|
415
|
+
### Object dictionary
|
|
416
|
+
|
|
417
|
+
The dictionary of a CANopen device (CiA 301) is written in `objects`: of the bus, the objects every
|
|
418
|
+
device of the bus has (the identity 0x1018, the software version 0x100A, a version of the map at
|
|
419
|
+
one index for all), of any area; and of the device, its own, in the manufacturer area
|
|
420
|
+
(0x2000..0x5FFF) only. A device's object with the index of one of the bus takes its place for that
|
|
421
|
+
device. A master reads and writes the objects by SDO; an SDO exchange
|
|
422
|
+
(`sdo[]`) and a PDO signal (`index`, `subindex`) address an object of the dictionary but do not
|
|
423
|
+
make one.
|
|
424
|
+
|
|
425
|
+
| Field | Description |
|
|
426
|
+
|---|---|
|
|
427
|
+
| `index` | Required. 0x1000..0x1FFF communication profile, 0x2000..0x5FFF manufacturer area, 0x6000..0x9FFF standardized device profiles, 0xA000..0xBFFF standardized interface profiles. The data type area (0x0000..0x0FFF) and the reserved one (0xC000..0xFFFF) hold no objects of a device |
|
|
428
|
+
| `name` | Required. Identifier (`software_version`) |
|
|
429
|
+
| `title`, `description` | Name and description for people |
|
|
430
|
+
| `data_type` | A variable (VAR): its CiA 301 type, `unsigned8`..`unsigned64`, `integer8`..`integer64`, `real32`, `real64`, `boolean`, `visible_string`, `octet_string`, `unicode_string`, `time_of_day`, `time_difference`, `domain` |
|
|
431
|
+
| `access` | `ro` (the default), `wo`, `rw`, `const` |
|
|
432
|
+
| `default` | Value after power-up: a number, text for a string |
|
|
433
|
+
| `source` | The value is taken from the map, as a signal's [`source`](#map-version-in-a-frame): `map_version.major`, `.minor`, `.patch` or `layout_crc32`. An unsigned type of at least 8 bits (32 for the CRC) |
|
|
434
|
+
| `unit` | Unit of the value |
|
|
435
|
+
| `entries` | Instead of `data_type`: the entries of a RECORD by `subindex` from 0x01, each with `subindex`, `name`, `title`, `description`, `data_type`, `access`, `default`, `source`, `unit`. Subindex 0x00 holds the number of entries and is not written |
|
|
436
|
+
| `array` | `true`: the entries make an ARRAY, all of one data type |
|
|
437
|
+
|
|
438
|
+
```yaml
|
|
439
|
+
buses:
|
|
440
|
+
- name: drive_bus
|
|
441
|
+
protocol: canopen
|
|
442
|
+
objects: # every device of the bus has them
|
|
443
|
+
- index: 0x100A
|
|
444
|
+
name: software_version
|
|
445
|
+
title: Manufacturer software version
|
|
446
|
+
data_type: visible_string
|
|
447
|
+
access: const
|
|
448
|
+
- index: 0x2000
|
|
449
|
+
name: map_version
|
|
450
|
+
title: Map version
|
|
451
|
+
entries:
|
|
452
|
+
- {subindex: 1, name: major, data_type: unsigned8, source: map_version.major}
|
|
453
|
+
- {subindex: 2, name: minor, data_type: unsigned8, source: map_version.minor}
|
|
454
|
+
- {subindex: 3, name: patch, data_type: unsigned8, source: map_version.patch}
|
|
455
|
+
- {subindex: 4, name: layout_crc32, data_type: unsigned32, source: layout_crc32}
|
|
456
|
+
devices:
|
|
457
|
+
- name: drive
|
|
458
|
+
node_id: 0x05
|
|
459
|
+
frames:
|
|
460
|
+
- name: drive_sdo_rx
|
|
461
|
+
canopen: sdo_rx
|
|
462
|
+
sdo:
|
|
463
|
+
- {name: read_sw, command: 0x40, index: 0x100A}
|
|
464
|
+
- {name: read_map_crc, command: 0x40, index: 0x2000, subindex: 4}
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
The web editor has a page **Objects** for the bus and for each device: the objects by index under
|
|
468
|
+
a heading per index area (the device's page has the manufacturer area; on the bus's page it is the
|
|
469
|
+
overall manufacturer area, common to all devices), a + on the right of each heading for a new
|
|
470
|
+
object, and on the bus's page the standard objects of CiA 301 listed with a tick that puts them into
|
|
471
|
+
the map. On a device's page the bus's objects are locked: they are changed on the bus's page. A click
|
|
472
|
+
on an identifier opens the object's form (data type, access, value), a double click renames it. Once a device has a dictionary (its own or
|
|
473
|
+
the bus's), an SDO exchange or a PDO signal that addresses an object not in it is noted
|
|
474
|
+
(`od-unknown`). See [tests/data/canopen-od.yaml](../tests/data/canopen-od.yaml).
|
|
475
|
+
|
|
476
|
+
### EDS
|
|
393
477
|
|
|
394
478
|
A signal of a device's PDO can name the dictionary object it carries: `index` and, for an entry of
|
|
395
479
|
a record, `subindex` (0 by default). Signals sharing an `index` with different subindices form a
|
|
@@ -398,7 +482,10 @@ record. Documents show the object (`OD 0x6041:00`), and `mapcan export eds` writ
|
|
|
398
482
|
heartbeat time (1017, from a heartbeat frame's `cycle_ms`), the communication and mapping
|
|
399
483
|
parameters of each PDO with mapped signals (1400/1600 for RPDOs, 1800/1A00 for TPDOs; COB-ID
|
|
400
484
|
`$NODEID+base`, event timer from `cycle_ms`) and the objects themselves. Gaps between mapped
|
|
401
|
-
signals are filled with dummy objects.
|
|
485
|
+
signals are filled with dummy objects. `mapcan import eds` reads such a file, or a vendor's EDS or
|
|
486
|
+
DCF, back into a map ([cli.md](cli.md#importing-an-eds-or-dcf)). Objects of the device's
|
|
487
|
+
[dictionary](#object-dictionary) are written as described there, with their data type, access and
|
|
488
|
+
value, in place of those the file would have otherwise; an object a PDO maps is marked mappable.
|
|
402
489
|
|
|
403
490
|
```yaml
|
|
404
491
|
- name: drive_status
|
|
@@ -432,9 +519,14 @@ For `sdo_rx`/`sdo_tx` frames you can describe expedited SDO exchanges instead of
|
|
|
432
519
|
|
|
433
520
|
The value's `encoding` (`number` or `enum`) and `bit_length` (8, 16, 24 or 32) are required.
|
|
434
521
|
|
|
435
|
-
mapcan builds the frame layout itself: byte 0 is the command, bytes 1–
|
|
436
|
-
(little-endian
|
|
437
|
-
index), and bytes 4–7 the value.
|
|
522
|
+
mapcan builds the frame layout itself: byte 0 is the command, bytes 1–3 the object
|
|
523
|
+
(`sdo_object`: the index little-endian in bytes 1–2, the subindex in byte 3, so the raw value is
|
|
524
|
+
`index | subindex << 16`), and bytes 4–7 the value, selected by the object (the multiplexer). The
|
|
525
|
+
object is an enum of the objects of the device's [dictionary](#object-dictionary) — the bus's and
|
|
526
|
+
the device's own, a variable by its name, an entry of an array or a record as `OBJECT_ENTRY` — and
|
|
527
|
+
of the objects the exchanges address; an object added to a dictionary appears in the SDO frames of
|
|
528
|
+
every device that has it. An `sdo_rx`/`sdo_tx` frame without exchanges and signals is laid out the
|
|
529
|
+
same way.
|
|
438
530
|
|
|
439
531
|
## Sender and receivers
|
|
440
532
|
|
|
@@ -585,6 +677,31 @@ devices and frames in their places, marked with the file name; their forms are r
|
|
|
585
677
|
editors change the main file only), and clicking such a node in VS Code opens it in its file.
|
|
586
678
|
Included devices can be chosen as senders and receivers of the main file's frames.
|
|
587
679
|
|
|
680
|
+
## Paths of signals
|
|
681
|
+
|
|
682
|
+
A frame, signal or flag is referred to from outside the map (dashboard layouts, plots, alarm
|
|
683
|
+
thresholds, columns of decoded logs) by its **canonical path**, its names joined with dots:
|
|
684
|
+
|
|
685
|
+
| Node | Path | Example |
|
|
686
|
+
|---|---|---|
|
|
687
|
+
| Frame | `bus.frame` | `powertrain.eec1` |
|
|
688
|
+
| Signal | `bus.frame.signal` | `powertrain.eec1.engine_speed` |
|
|
689
|
+
| Field of a bit field | `bus.frame.signal.flag` | `can1.bms_faults.faults.overvoltage` |
|
|
690
|
+
|
|
691
|
+
The path is unique: bus names are unique in the map (`duplicate-bus-name`), frame names on their bus
|
|
692
|
+
wherever the frame is described (`duplicate-frame-name`), and signal and flag names in their frame
|
|
693
|
+
(`duplicate-signal-name`). The device that describes a frame is not part of the path, so moving a frame
|
|
694
|
+
from one device to another, or from a device to the bus, keeps it. Names are identifiers, so a path has
|
|
695
|
+
no other dots. The signals of an SDO exchange have no path.
|
|
696
|
+
|
|
697
|
+
Renaming a bus, frame, signal or flag changes the path. `mapcan diff` reports a frame, signal or flag
|
|
698
|
+
that keeps its place under a new name as **renamed**, with the old and the new path (`old` and `new`
|
|
699
|
+
in `--format json`), so that the references can be updated: a frame with the same ID, length and places
|
|
700
|
+
of its signals, a signal with the same bits, byte order and encoding, a flag with the same bits. Only
|
|
701
|
+
one candidate on each side counts; otherwise the change is a removal and an addition. In the editors,
|
|
702
|
+
**Copy Path** (the tree's context menu in VS Code, the button next to the node's name in the web editor)
|
|
703
|
+
copies the path of the selected node.
|
|
704
|
+
|
|
588
705
|
## Versioning and compatibility
|
|
589
706
|
|
|
590
707
|
`mapcan: 2` is the version of the format, not of the program. What it promises:
|
|
@@ -653,11 +770,13 @@ keep their order.
|
|
|
653
770
|
|---|---|
|
|
654
771
|
| Map | `mapcan`, `part_of`, `document`, `include`, `lint`, `value_tables`, `buses` |
|
|
655
772
|
| `document` | `title`, `subtitle`, `version`, `date`, `author`, `organization`, `language`, `bit_numbering`, `print`, `history` |
|
|
656
|
-
| Bus | `name`, `title`, `description`, `protocol`, `connector`, `bitrate`, `sample_point`, `fd`, `data_bitrate`, `data_sample_point`, `brs`, `frames`, `devices` |
|
|
657
|
-
| Device | `name`, `short`, `title`, `description`, `node_id`, `address`, `frames` |
|
|
773
|
+
| Bus | `name`, `title`, `description`, `protocol`, `connector`, `bitrate`, `sample_point`, `fd`, `data_bitrate`, `data_sample_point`, `brs`, `frames`, `objects`, `devices` |
|
|
774
|
+
| Device | `name`, `short`, `title`, `description`, `node_id`, `address`, `objects`, `frames` |
|
|
775
|
+
| Dictionary object | `index`, `name`, `title`, `description`, `data_type`, `access`, `default`, `source`, `unit`, `array`, `entries` |
|
|
776
|
+
| Entry of an object | `subindex`, `name`, `title`, `description`, `data_type`, `access`, `default`, `source`, `unit` |
|
|
658
777
|
| Frame | `name`, `title`, `description`, `comment`, `canopen`, `id`, `extended`, `pgn`, `priority`, `destination`, `length`, `brs`, `direction`, `cycle_ms`, `trigger`, `inhibit_ms`, `timeout_ms`, `sender`, `receivers`, `signals`, `sdo` |
|
|
659
778
|
| Signal | `name`, `title`, `description`, `comment`, `encoding`, `start_bit`, `byte`, `bit`, `bit_length`, `byte_length`, `byte_order`, `representation`, `charset`, `terminator`, `factor`, `offset`, `unit`, `min`, `max`, `values`, `value_format`, `flags`, `multiplexer`, `mux`, `initial`, `source`, `invalid_raw`, `spn`, `index`, `subindex` |
|
|
660
|
-
| Flag | `name`, `bit`, `bit_length`, `description`, `values` |
|
|
779
|
+
| Flag | `name`, `bit`, `bit_length`, `description`, `values`, `multiplexer` |
|
|
661
780
|
| SDO exchange | `name`, `description`, `command`, `index`, `subindex`, `value` |
|
|
662
781
|
|
|
663
782
|
The examples of the repository are kept in this layout.
|
|
@@ -692,6 +811,7 @@ turned off with `--disable CODE` or `lint.disable`.
|
|
|
692
811
|
| `name-collision` | error | Names collide in generated code (differ only in case, or clash with a _phys property) |
|
|
693
812
|
| `name-style` | warning | Name does not match the style rule (lint) |
|
|
694
813
|
| `name-inconsistent` | warning | The same value name is spelled differently |
|
|
814
|
+
| `duplicate-bus-name` | error | Duplicate bus name in the map |
|
|
695
815
|
| `duplicate-device-name` | error | Duplicate device name on the bus |
|
|
696
816
|
| `duplicate-frame-name` | error | Duplicate frame name on the bus |
|
|
697
817
|
| `duplicate-signal-name` | error | Duplicate signal/flag name in the frame |
|
|
@@ -730,8 +850,15 @@ turned off with `--disable CODE` or `lint.disable`.
|
|
|
730
850
|
| `j1939-field-protocol` | warning | pgn/priority/destination/address/spn on a non-J1939 bus |
|
|
731
851
|
| `j1939-spn-duplicate` | warning | The same SPN on several signals of the bus |
|
|
732
852
|
| `j1939-tp` | info | A PGN longer than 8 bytes is sent with the J1939-21 transport protocol |
|
|
733
|
-
| `canopen-od` | warning | Dictionary object on a signal outside a device's PDO, or outside 0x2000..
|
|
853
|
+
| `canopen-od` | warning | Dictionary object on a signal outside a device's PDO, or outside 0x2000..0xBFFF |
|
|
734
854
|
| `od-duplicate` | warning | The same dictionary object on several signals of a device |
|
|
855
|
+
| `od-subindex-zero` | error | A signal at subindex 0 of an array or a record: subindex 0 holds the number of its entries |
|
|
856
|
+
| `od-protocol` | warning | `objects` on a bus that is not CANopen |
|
|
857
|
+
| `od-object-area` | error | A dictionary object in the data type area (0x0000..0x0FFF) or the reserved one (0xC000..0xFFFF), or an object of a device outside the manufacturer area (0x2000..0x5FFF) |
|
|
858
|
+
| `od-object-duplicate` | error | The same index or name twice in a dictionary, or the same subindex or name twice in an object |
|
|
859
|
+
| `od-object-shape` | error | An object with both `data_type` and `entries` or with neither, `default`/`source`/`unit` of an array or a record on the object instead of its entries, an array of several data types |
|
|
860
|
+
| `od-default` | error | `default` that does not fit the data type, `default` with `source`, `source` of a type too short for it |
|
|
861
|
+
| `od-unknown` | info | An SDO exchange or a PDO signal addresses an object that is not in the device's dictionary |
|
|
735
862
|
|
|
736
863
|
### Sender and receivers
|
|
737
864
|
|
|
@@ -208,14 +208,14 @@ The sources are in [web/](../web) (Vue 3 + TypeScript + Vite). The built bundle
|
|
|
208
208
|
|
|
209
209
|
```sh
|
|
210
210
|
mapcan serve my-map.yaml --no-browser # API on :8765
|
|
211
|
+
npm ci # at the root of the repository: all npm workspaces
|
|
211
212
|
cd web
|
|
212
|
-
npm ci
|
|
213
213
|
npm run dev # http://localhost:5173 with hot reload
|
|
214
214
|
npm run build # type check + build into src/mapcan/web/static
|
|
215
215
|
```
|
|
216
216
|
|
|
217
217
|
UI strings are written in English in the source (`t("…")`, `N_("…")`) and serve as keys of the
|
|
218
|
-
Russian translation in [web/src/locale/ru.json](../web/src/locale/ru.json) (backend messages:
|
|
218
|
+
Russian translation in [web/src/locale/ru.json](../web/src/locale/ru.json) (the forms: [packages/forms/src/locale/ru.json](../packages/forms/src/locale/ru.json); backend messages:
|
|
219
219
|
[src/mapcan/locale/ru.py](../src/mapcan/locale/ru.py)); `tests/test_i18n.py` fails if a string has
|
|
220
220
|
no translation or a translation is no longer used.
|
|
221
221
|
After changing `web/src`, rebuild the bundle and commit `src/mapcan/web/static`: CI checks that
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mapcan"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.25.1"
|
|
4
4
|
description = "A YAML map of CAN signals as the single source of truth: validation, Excel/PDF/Markdown/HTML, DBC, C/Python code"
|
|
5
5
|
# readme: built from README.md with absolute links for PyPI (see fancy-pypi-readme below)
|
|
6
6
|
dynamic = ["readme"]
|