summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-21 15:40:37 +0000
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-21 15:40:37 +0000
commit2ab5cbcde5c8df39b150f590df559e082411c722 (patch)
tree53e0237440be7ac5b8cc8918e3ae33347e68c7c0 /docs
parent8a6735caf3f7548b0138230d3cb9b454f2641c72 (diff)
Added a CAUTION mention and fix some commands
Change-Id: I460f73da5efb0e9156b53ba35fef598dc6c46a7d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'docs')
-rw-r--r--docs/2-Installation.md12
1 files changed, 9 insertions, 3 deletions
diff --git a/docs/2-Installation.md b/docs/2-Installation.md
index 70036b6b..b519de33 100644
--- a/docs/2-Installation.md
+++ b/docs/2-Installation.md
@@ -58,7 +58,9 @@ $ export PATH=$PATH:/xdt/sdk/sysroots/x86_64-aglsdk-linux/usr/bin
$ git clone https://github.com/iotbzh/can-config-generator.git
$ cd can-config-generator
$ mkdir build
+$ cd build
$ cmake -G "Unix Makefiles" ..
+$ make
```
### Naming convention
@@ -92,11 +94,15 @@ engine.torque
```
> **NOTE** It's recommended that you follow this naming convention to named your CAN signals.
+>
> There is only character `*` that is forbidden in names because it's used as wildcard for subscription and unsubscrition.
+>
> This described in the below chapter.
### Generating JSON from Vector CANoe Database
+> **CAUTION** This chapter has not been tested since we haven't necessary automotive tools for that.
+
If you use Canoe to store your `gold standard` CAN signal definitions, you may be able to use the OpenXC `xml_to_json.py` script to make your JSON for you. First, export the Canoe .dbc file as XML - you can do this with Vector CANdb++. Next, create a JSON file according to the format defined above, but only define:
- CAN messages.
@@ -107,13 +113,13 @@ To install the OpenXC utilities and runs `xml_to_json.py` script:
```bash
$ sudo pip install openxc
-$ cd /usr/local/lib/python2.7/dist-packages/openxc-0.13.0-py2.7.egg/openxc/generator
+$ cd /usr/local/lib/python2.7/dist-packages/openxc/generator
```
Assuming the data exported from Vector is in `signals.xml` and your minimal mapping file is `mapping.json`, run the script:
```bash
-$ ./xml_to_json.py signals.xml mapping.json signals.json
+$ python -m openxc.utils ./xml_to_json.py signals.xml mapping.json signals.json
```
The script scans `mapping.json` to identify the CAN messages and signals that you want to use from the XML file. It pulls the neccessary details of the messages (bit position, bit size, offset, etc) and outputs the resulting subset as JSON into the output file, `signals.json`.
@@ -125,7 +131,7 @@ The resulting file together with `mapping.json` will work as input to the code g
To generate your config file you just have to run the generator using the `-m` option to specify your JSON file.
```bash
-$ can-config-generator -m ../tests/basic.json -o configuration-generated.cpp
+$ ./can-config-generator -m ../tests/basic.json -o configuration-generated.cpp
```
If you omit the `-o` option, then code is generated on the stdout.