summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-22 10:02:32 +0000
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-22 10:02:32 +0000
commit2fd3b90d2736e29932b8fc279e5424916c943c69 (patch)
treeea48a15c8a0b351df6aa41d1c235201737234ae0
parent98ab4741189d69f7661b93ebc93b9abc879bba34 (diff)
Update README according to the documentation of CAN_signaling
Change-Id: I5daa7e0a815c84bc3e373888aef64518ef344449 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--README.md101
1 files changed, 58 insertions, 43 deletions
diff --git a/README.md b/README.md
index 288bcc5e..a9625621 100644
--- a/README.md
+++ b/README.md
@@ -19,56 +19,71 @@ The reference documentation of the JSON file can be found [here](https://github.
You can install any of these using your package manager. For instance, inside the iotbzh's docker image, you must enter this command :
- devel@bsp-devkit:~/$ sudo apt-get install cmake libboost-system-dev libboost-filesystem-dev libboost-program-options-dev
+ devel@bsp-devkit:~/$ sudo apt-get install libboost-system-dev libboost-filesystem-dev libboost-program-options-dev
You may want to install `libboost-all-dev` to get all boost components even if it's not required.
+* Make sure you already set up the AGL SDK using the following [SDK Quick Setup Guide](http://docs.iot.bzh/docs/getting_started/en/dev/reference/setup-sdk-environment.html). Alternatively, please refer to official guides available on [AGL Developer Site](http://docs.automotivelinux.org/docs/devguides/en/dev/#guides).
+
+> **CAUTION** Don't source the environment file to get this project compile. We just use CMake from SDK environment, so make sure to not have CMake on the system or remove it if needed with ```sudo apt-get remove cmake```.
+
## Compile
-<pre>
-<b>devel@bsp-devkit:~/projects/$</b> git clone https://github.com/iotbzh/can-config-generator.git
-Cloning into 'can-config-generator'...
-remote: Counting objects: 74, done.
-remote: Compressing objects: 100% (42/42), done.
-remote: Total 74 (delta 30), reused 67 (delta 27), pack-reused 0
-Unpacking objects: 100% (74/74), done.
-Checking connectivity... done.
-
-<b>devel@bsp-devkit:~/projects/$</b> cd can-config-generator
-<b>devel@bsp-devkit:~/projects/can-config-generator/(master)$</b> mkdir build
-<b>devel@bsp-devkit:~/projects/can-config-generator/build(master)$</b> cmake -G "Unix Makefiles" ..
--- The C compiler identification is GNU 4.9.2
--- The CXX compiler identification is GNU 4.9.2
--- Check for working C compiler: /usr/bin/cc
--- Check for working C compiler: /usr/bin/cc -- works
--- Detecting C compiler ABI info
--- Detecting C compiler ABI info - done
--- Check for working CXX compiler: /usr/bin/c++
--- Check for working CXX compiler: /usr/bin/c++ -- works
--- Detecting CXX compiler ABI info
--- Detecting CXX compiler ABI info - done
--- Boost version: 1.55.0
--- Found the following Boost libraries:
--- program_options
--- filesystem
--- system
--- Configuring done
--- Generating done
--- Build files have been written to: /home/devel/projects/can-config-generator/build
-<b>devel@bsp-devkit:~/projects/can-config-generator/build(master)$</b> make
-Scanning dependencies of target can-config-generator
-[ 12%] Building CXX object CMakeFiles/can-config-generator.dir/src/main.cpp.o
-[ 25%] Building CXX object CMakeFiles/can-config-generator.dir/src/openxc/message_set.cpp.o
-[ 37%] Building CXX object CMakeFiles/can-config-generator.dir/src/openxc/can_bus.cpp.o
-[ 50%] Building CXX object CMakeFiles/can-config-generator.dir/src/openxc/can_message.cpp.o
-[ 62%] Building CXX object CMakeFiles/can-config-generator.dir/src/openxc/command.cpp.o
-[ 75%] Building CXX object CMakeFiles/can-config-generator.dir/src/openxc/diagnostic_message.cpp.o
-[ 87%] Building CXX object CMakeFiles/can-config-generator.dir/src/openxc/mapping.cpp.o
-[100%] Building CXX object CMakeFiles/can-config-generator.dir/src/openxc/signal.cpp.o
-Linking CXX executable can-config-generator
-[100%] Built target can-config-generator
+```bash
+$ export PATH=$PATH:/xdt/sdk/sysroots/x86_64-aglsdk-linux/usr/bin
+$ export WD=$(pwd)
+$ git clone https://github.com/iotbzh/can-config-generator.git
+$ cd can-config-generator
+$ mkdir -p build
+$ cd build
+$ cmake -G "Unix Makefiles" ..
+$ make
</pre>
+### Naming convention
+
+We chose a doted naming convention because it's a well know schema.
+
+It separates and organize names into hierarchy. From the left to right, you describe your names using the more common ancestor at the left then more you go to the right the more it will be accurate.
+
+Let's take an example, here is an example about standard PID name following this convention:
+
+```
+engine.load
+engine.coolant.temperature
+fuel.pressure
+intake.manifold.pressure
+engine.speed
+vehicle.speed
+intake.air.temperature
+mass.airflow
+throttle.position
+running.time
+EGR.error
+fuel.level
+barometric.pressure
+commanded.throttle.position
+ethanol.fuel.percentage
+accelerator.pedal.position
+hybrid.battery-pack.remaining.life
+engine.oil.temperature
+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.
+
+### Available decoder
+
+You can use some basic decoder provided by default by the binding which are:
+
+* decoder_t::noopDecoder : Default decoder if not specified, return raw value from signal's bitfield.
+* decoder_t::booleanDecoder : Coerces a numerical value to a boolean.
+* decoder_t::stateDecoder : Find and return the corresponding string state for a CAN signal's raw integer value.
+
## Generate your config file
To generate your config file you just have to run the generator using the `-m` option to specify your JSON file.