aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-06-12 09:36:44 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-06-12 09:36:44 +0200
commita3e6126b082335cb9722c6b8d5321dd39d6d2dca (patch)
treed4d1bd6f330a624f7c85c86269b15d686a840ff9
parent4788a840abe82f2c0f20b027589085d29051763c (diff)
Updating README and add usage documentation.
Change-Id: I1bc2ef589ef60098cd1c1eb203e3140c0c955eed Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--README.md24
-rw-r--r--book.json93
-rw-r--r--docs/1-Architecture.md21
-rw-r--r--docs/2-Installation.md48
-rw-r--r--docs/3-Usage.md151
-rw-r--r--docs/Doc-Revisions.md6
-rw-r--r--docs/README.md8
-rw-r--r--docs/SUMMARY.md8
-rw-r--r--docs/_layouts/ebook/page.html36
-rw-r--r--docs/_layouts/ebook/pdf_footer.html13
-rw-r--r--docs/_layouts/ebook/pdf_header.html13
-rw-r--r--docs/_layouts/ebook/summary.html58
-rw-r--r--docs/_layouts/layout.html28
-rwxr-xr-xdocs/cover.jpgbin0 -> 225694 bytes
-rw-r--r--docs/cover_small.jpgbin0 -> 14655 bytes
-rwxr-xr-xdocs/images/high-level-arch.pngbin0 -> 30810 bytes
-rw-r--r--docs/images/iotbzh_logo_small.pngbin0 -> 6989 bytes
-rw-r--r--docs/images/logo_iot_bzh.svg142
-rw-r--r--docs/resources/cover.svg212
-rw-r--r--docs/resources/ebook.css386
-rwxr-xr-xdocs/resources/make_cover.sh14
-rwxr-xr-xgendocs.sh73
22 files changed, 1316 insertions, 18 deletions
diff --git a/README.md b/README.md
index a96c30d..3711156 100644
--- a/README.md
+++ b/README.md
@@ -1,31 +1,23 @@
# High level binding
-CAN binder, based upon ViWi definition.
+CAN binding, based upon ViWi definition.
This binding is intended to act between the low-level binding and clients. It collects resources as defined in a json configuration file, and
implements subscribe/unsubscribe/get verbs for the clients.
# build
```bash
-git submodule init
-git submodule update
-mkdir build
-cd build
-cmake ..
-make
+mkdir build;cd build; cmake ..; make
```
-
-> ! WARNING don't forget to initialize submodule needed to build the project.
-
# launching
natively under linux you can launch afb-daemon with the low-level and high-level bindings with a command like:
```bash
-afb-daemon --rootdir=<path_to_low_binding>/CAN-binder/build/package --ldpaths=<path_to_low_binding>/CAN-binder/build/package/lib:<path_to_high_binding>/build/high-can-binding --port=1234 --tracereq=common --token=1 --verbose --verbose --verbose
+afb-daemon --rootdir=<path_to_low_binding>/CAN-binder/build/package --ldpaths=<path_to_low_binding>/CAN-binder/build/package/lib:<path_to_high_binding>/build/high-can-binding --port=1234 --tracereq=common --token=1 --verbose
```
#json configuration file
-json configuration file (high.json) must be placed in the directory where you will launch afb-dameon
+json configuration file (high.json) must be placed in the directory where you launch afb-dameon
The json configuration file consists in 2 sections:
## definitions section
@@ -101,12 +93,8 @@ For instance:
}
```
# Running and testing
-You can use afb-client-demo to test high level binding.
-For instance, once daemon has been launched with the 2 bindings:
-```bash
-afb-client-demo ws://localhost:1234/api?token=1
-```
-You can then use commands such as:
+You can use *afb-client-demo* to test high level binding.
+For instance, once daemon has been launched with the 2 bindings, you can use commands such as:
```bash
high-can subscribe {"name":"/car/doors/","interval":10000}
high-can unsubscribe {"name":"/car/doors/","interval":10000}
diff --git a/book.json b/book.json
new file mode 100644
index 0000000..a39312a
--- /dev/null
+++ b/book.json
@@ -0,0 +1,93 @@
+{
+ "title": "High Level CAN Binding Guide",
+ "description": "High level CAN bus binding, based upon ViWi definition.",
+ "keywords": "AGL, Development, CAN, binding, binder, ViWi",
+ "author": "IoT.Bzh Team",
+ "website": "http://iot.bzh",
+ "published": "June 2017",
+ "version": "1.0",
+
+ "gitbook": "3.2.2",
+ "root": "docs",
+ "pdf": {
+ "fontFamily": "Verdana",
+ "fontSize": 12,
+ "paperSize": "a4",
+ "pageBreaksBefore": "//h:div[@class=\"page-break\"]"
+ },
+ "styles": {
+ "website": "resources/ebook.css",
+ "ebook": "resources/ebook.css",
+ "pdf": "resources/ebook.css"
+ },
+
+ "hidepageheaders": [2, 3],
+ "hidepagefooters": [2, 3],
+
+ "plugins": [
+ "regexplace"
+ ],
+ "pluginsConfig": {
+ "regexplace": {
+ "removeFirstPartsInSectionNumber": true,
+ "substitutes": [{
+ "pattern": "<!-- pagebreak -->",
+ "flags": "g",
+ "substitute": "<div class=\"page-break\"></div>"
+ },
+ {
+ "pattern": "<!-- clear -->",
+ "flags": "g",
+ "substitute": "<div class=\"clear\"></div>"
+ },
+ {
+ "pattern": "<!-- nopagebreak -->",
+ "flags": "g",
+ "substitute": "<div class=\"nopb\">"
+ },
+ {
+ "pattern": "<!-- endnopagebreak -->",
+ "flags": "g",
+ "substitute": "</div>"
+ },
+ {
+ "pattern": "<!-- note -->",
+ "flags": "g",
+ "substitute": "<div class=\"note\">"
+ },
+ {
+ "pattern": "<!-- endnote -->",
+ "flags": "g",
+ "substitute": "</div>"
+ },
+ {
+ "pattern": "!\\[(.*?)\\]\\((.*?)(?:\\s+\"(.*)\")?\\){0,}{caption=1([^\\}]*)}",
+ "flags": "gmi",
+ "substitute": "<figure id=\"fig_PAGE_LEVEL_._INDEX_\"><img $3 alt=\"$1\" title=\"$1\" href=\"$2\"><figcaption></figcaption></figure>",
+ "decode": true
+ },
+ {
+ "pattern": "<img ([^>]*) {0,}\/{0,}> {0,}{caption=1([^\\}]*)}",
+ "flags": "g",
+ "substitute": "<figure id=\"fig_PAGE_LEVEL_._INDEX_\"><img $2 $1><figcaption></figcaption></figure>",
+ "decode": true
+ },
+ {
+ "pattern": "<img (.*)alt=\"([^\"]*)\"(.*) {0,1}\/{0,1}><figcaption></figcaption>",
+ "flags": "g",
+ "substitute": "<img$1alt=\"$2\"$3><figcaption><span>Picture _PAGE_LEVEL_._INDEX_</span>: $2</figcaption>",
+ "store": {
+ "substitute": "<a href=\"_PAGE_PATH_#fig_PAGE_LEVEL_._INDEX_\">Pic. _PAGE_LEVEL_._INDEX_</a> <span>$2</span>",
+ "variable_name": "pictures"
+ }
+ },
+ {
+ "pattern": "<img ([^>]*)> {0,}{style {1,}([^}]*)}",
+ "flags": "g",
+ "substitute": "<img $1 style=\"$2\">",
+ "decode": true
+ }
+ ]
+ }
+ }
+}
diff --git a/docs/1-Architecture.md b/docs/1-Architecture.md
new file mode 100644
index 0000000..487c467
--- /dev/null
+++ b/docs/1-Architecture.md
@@ -0,0 +1,21 @@
+# AGL VIWI HIGH-CAN binding architecture
+
+This binding is intended to act between low-level binding(s) and clients. It builds ViWi resources as defined in a json configuration file, and implements subscribe/unsubscribe/get verbs for the clients. Each ViWi resource can be composed of several elements, for which subscriptions will be made to the low-level binding with configurable frequencies or filters.
+
+![ViWi High Level binding architecture](images/high-level-arch.png)
+
+<!-- pagebreak -->
+
+## BRIEF VIWI DESCRIPTION
+
+ViWi (Volkswagen Infotainment Web Interface) protocol defines a serie of objects, which can be queried or updated via JSon messages.
+
+Each object is assigned with a unique URI.
+
+The depth of the URI tree is limited to 3, i.e. /service/resource>/element/, for instance **/car/doors/3901a278-ba17-44d6-9aef-f7ca67c04840**.
+
+To retrieve the list of elements for a given resource, one can use the get command, for instance **get /car/doors/**.
+
+It is also possible to subscribe to elements or group of elements, for instance **subscribe /car/doors/3901a278-ba17-44d6-9aef-f7ca67c04840**. Requests can also have various filters, or specify a frequency.
+
+More details in the [ViWi general documentation](https://www.w3.org/Submission/viwi-protocol/) and in the [ViWi.service.car documentation](https://www.w3.org/Submission/viwi-service-car/)
diff --git a/docs/2-Installation.md b/docs/2-Installation.md
new file mode 100644
index 0000000..a5e1265
--- /dev/null
+++ b/docs/2-Installation.md
@@ -0,0 +1,48 @@
+## Installation
+
+## Prerequisites
+
+Low CAN binding must be installed. Prerequisites are the same.
+
+```bash
+$ git clone https://gerrit.automotivelinux.org/gerrit/apps/low-level-can-service
+```
+
+## Clone and build high level binding
+
+### Build requirements
+
+* CMake version 3.0 or later
+* G++, Clang++ or any C++11 compliant compiler.
+
+### Clone
+
+```bash
+$ export WD=$(pwd)
+$ git clone https://github.com/iotbzh/high-level-viwi-service.git
+```
+
+### Build
+
+```bash
+$ cd $WD/high-level-viwi-service
+$ mkdir build
+$ cd build
+$ cmake ..
+$ make
+```
+
+## Launching
+
+The Json high level configuration file *high.json* must be placed in the directory where you launch afb-daemon.
+
+```bash
+$ cp $WD/high-level-viwi-service/high.json $WD
+$ cd $WD
+```
+Natively under linux you can launch afb-daemon with the low-level and high-level bindings with a command like:
+
+```bash
+$ cd $WD
+$ afb-daemon --rootdir=$WD/low-level-can-service/CAN-binder/build/package --ldpaths=$WD/low-level-can-service/CAN-binder/build/package/lib:$WD/high-level-viwi-service/build/high-can-binding --port=1234 --tracereq=common --token=1 --verbose
+```
diff --git a/docs/3-Usage.md b/docs/3-Usage.md
new file mode 100644
index 0000000..450b459
--- /dev/null
+++ b/docs/3-Usage.md
@@ -0,0 +1,151 @@
+# Usage
+
+## JSon configuration file
+
+This file must be named *high.json*, and must accessible from afb-daemon.
+The json configuration file consists in 2 sections:
+
+### Definitions section
+
+This section describes each resources defined in the high-level binding. Each resource is composed with different properties having a name, a type and a description.
+Type can be boolean, double, string, or int. Properties "id", "uri" and "name" are compulsory.
+
+For instance:
+
+```json
+{
+ "name": "/car/demoboard/",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "identifier"
+ },
+ "uri": {
+ "type": "string",
+ "description": "object uri"
+ },
+ "name": {
+ "type": "string",
+ "description": "name"
+ },
+ "unit": {
+ "type": "string",
+ "description": "units"
+ },
+ "speed": {
+ "type": "double",
+ "description": "vehicle centerpoint speed as shown by the instrument cluster"
+ },
+ "rpm": {
+ "type": "double",
+ "description": "engine rotations per minute"
+ },
+ "level": {
+ "type": "double",
+ "description": "level of tankage"
+ },
+ "load": {
+ "type": "double",
+ "description": "engine load"
+ }
+ }
+}
+```
+
+<!-- pagebreak -->
+
+### Resources section
+
+This section defines which values should be assigned to resource's properties as defined in the definitions section.
+The link to the definitions section is made through the name of the resource.
+
+Some values are static, some are linked to low-level requests.
+
+In case a value is linked to a low-level request, the value will start with "${" and end with "}". In that case the value will consist in the name of the low-level signal, followed
+with the frequency of the signal in ms. -1 in the frequency means that high level binding should subscribe to low level binding for all changes, without specifying a frequency.
+
+For instance:
+```json
+{
+ "name": "/car/demoboard/",
+ "values": [{
+ "name": "vehicleSpeed",
+ "unit": "km/h",
+ "speed": "${diagnostic_messages.vehicle.speed,1000}"
+ }, {
+ "name": "engineSpeed",
+ "unit": "rpm",
+ "rpm": "${diagnostic_messages.engine.speed,1000}"
+ }, {
+ "name": "fuelLevel",
+ "unit": "litre",
+ "level": "${diagnostic_messages.fuel.level,1000}"
+ }, {
+ "name": "engineLoad",
+ "unit": "Nm",
+ "load": "${diagnostic_messages.engine.load,1000}"
+ }]
+}
+```
+
+<!-- pagebreak -->
+
+## Running and testing
+
+### Launch the binder together with the two bindings
+
+```bash
+$ cd $WD
+$ afb-daemon --rootdir=$WD/low-level-can-service/CAN-binder/build/package --ldpaths=$WD/low-level-can-service/CAN-binder/build/package/lib:$WD/high-level-viwi-service/build/high-can-binding --port=1234 --tracereq=common --token=1 --verbose
+```
+
+### Use afb-client-demo to test high level binding
+
+On another terminal, connect to the binding using previously installed _**AFB Websocket CLI**_ tool:
+
+```bash
+$ afb-client-demo ws://localhost:1234/api?token=1
+```
+
+You will be on an interactive session where you can communicate directly with the binding API.
+
+The binding provides at this moment 3 verbs, _get_, _subscribe_ and _unsubscribe_, which can take a JSON object as an argument.
+
+
+To use the _**AFB Websocket CLI**_ tool, a command line will be like the following :
+
+```
+<api> <verb> <arguments>
+```
+
+Where:
+
+* API : _**high-can**_.
+* Verb : _**get**_, _**subscribe**_ or _**unsubscribe**_
+* Arguments : _**{ "name": "/car/doors/" }**_
+
+You can therefore use commands such as:
+
+```
+high-can subscribe {"name":"/car/doors/","interval":10000}
+high-can unsubscribe {"name":"/car/doors/","interval":10000}
+high-can get {"name":"/car/demoboard/"}
+high-can get {"name":"/car/demoboard/","fields":["fuelLevel","engineLoad"]}
+```
+
+For instance the output of the third command should be:
+
+```
+high-can get {"name":"/car/demoboard/"}
+ON-REPLY 1:high-can/get: {"response":{"\/car\/demoboard\/2159e2-5b638a-39e242-7a2f5":{"id":"2159e2-5b638a-39e242-7a2f5","name":"vehicleSpeed","speed":0.000000,"unit":"km\/h","uri":"\/car\/demoboard\/2159e2-5b638a-39e242-7a2f5"},"\/car\/demoboard\/22ad2c-5a3c2b-50fabb-324c82":{"id":"22ad2c-5a3c2b-50fabb-324c82","level":0.000000,"name":"fuelLevel","unit":"litre","uri":"\/car\/demoboard\/22ad2c-5a3c2b-50fabb-324c82"},"\/car\/demoboard\/3a3ab9-2bd52c-11d30-689acf":{"id":"3a3ab9-2bd52c-11d30-689acf","name":"engineSpeed","rpm":0.000000,"unit":"rpm","uri":"\/car\/demoboard\/3a3ab9-2bd52c-11d30-689acf"},"\/car\/demoboard\/5ae808-8093cb-99716-30a605":{"id":"5ae808-8093cb-99716-30a605","load":0.000000,"name":"engineLoad","unit":"Nm","uri":"\/car\/demoboard\/5ae808-8093cb-99716-30a605"}},"jtype":"afb-reply","request":{"status":"success","uuid":"44ce03f9-a7ca-49e1-a62a-40c74db0caa0"}}
+```
+
+As you can see for the moment all values are 0, because we didn't inject any CAN data in the binder. To do this, you can use **canplayer** to feed the bindings with some data.
+
+For instance, on a third terminal:
+
+```bash
+$ canplayer -I highwaycomplete
+```
+
+
diff --git a/docs/Doc-Revisions.md b/docs/Doc-Revisions.md
new file mode 100644
index 0000000..1de1abb
--- /dev/null
+++ b/docs/Doc-Revisions.md
@@ -0,0 +1,6 @@
+Document revisions
+==================
+
+| Date | Version | Designation  | Author |
+|-------------|---------|--------------------------------------|-------------------------|
+| 07 Jun 2017 | 1.0 | Initial release | P. Lelong [ Iot.bzh ] |
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 0000000..f22761a
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,8 @@
+# Abstract
+
+This project proposes a High Level CAN Binding for AGL, with the following features:
+
+* Interface between UI and Low Level CAN binding
+* Generation of ViWi resources based on a json configuration description
+* Connection to Low Level binding in order to maintain Viwi objects status
+* Accepts subscriptions and gets events, and generate in reply Json messages in ViWi format
diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md
new file mode 100644
index 0000000..504de46
--- /dev/null
+++ b/docs/SUMMARY.md
@@ -0,0 +1,8 @@
+# Summary
+
+* [Abstract](README.md)
+* [Document revisions](Doc-Revisions.md)
+* [Architecture](1-Architecture.md)
+* [Installation](2-Installation.md)
+* [Usage](3-Usage.md)
+
diff --git a/docs/_layouts/ebook/page.html b/docs/_layouts/ebook/page.html
new file mode 100644
index 0000000..bf325e9
--- /dev/null
+++ b/docs/_layouts/ebook/page.html
@@ -0,0 +1,36 @@
+{% extends "layout.html" %}
+
+{% block title %}{{ page.title }}{% endblock %}
+{% block description %}{{ page.description }}{% endblock %}
+
+{% block style %}
+ {### Include theme css before plugins css ###}
+ {% if not fileExists(config.styles.print) %}
+ {% if options.format %}
+ <link rel="stylesheet" href="{{ (options.format + ".css")|resolveAsset }}">
+ {% else %}
+ <link rel="stylesheet" href="{{ "ebook.css"|resolveAsset }}">
+ {% endif %}
+ {% endif %}
+
+ {{ super() }}
+
+ {### Custom stylesheets for the book ###}
+
+ {% for type, style in config.styles %}
+ {% if fileExists(style) and (type == "ebook" or type == "print" or type == options.format) %}
+ <link rel="stylesheet" href="{{ style|resolveFile }}">
+ {% endif %}
+ {% endfor %}
+{% endblock %}
+
+{% block body %}
+<div class="page">
+ {% block page %}
+ <h1 class="book-chapter book-chapter-{{ page.depth }}">{{ page.title }}</h1>
+ <div class="section">
+ {{ page.content|safe }}
+ </div>
+ {% endblock %}
+</div>
+{% endblock %}
diff --git a/docs/_layouts/ebook/pdf_footer.html b/docs/_layouts/ebook/pdf_footer.html
new file mode 100644
index 0000000..679e562
--- /dev/null
+++ b/docs/_layouts/ebook/pdf_footer.html
@@ -0,0 +1,13 @@
+{% extends "./page.html" %}
+{% block body %}
+<div id="pdf-footer" class="pdf-footer">
+ <span class="footer-left">Version {{ config.version }}</span>
+ <span class="footer-right">{{ page.num }}</span>
+ <span class="footer-center">{{ config.published }}</span>
+</div>
+
+<!-- Allow to hide footer for some pages using hidepagefooters config in book.json -->
+<script>
+ if (({% for num in config.hidepagefooters %}{{ page.num }} == {{ num }} || {% endfor %}false)) document.getElementById('pdf-footer').style.display = 'none'
+</script>
+{% endblock %}
diff --git a/docs/_layouts/ebook/pdf_header.html b/docs/_layouts/ebook/pdf_header.html
new file mode 100644
index 0000000..ef49641
--- /dev/null
+++ b/docs/_layouts/ebook/pdf_header.html
@@ -0,0 +1,13 @@
+{% extends "./page.html" %}
+{% block body %}
+<div id="pdf-header" class="pdf-header">
+ <span class="header-left">IoT.Bzh</span>
+ <span class="header-right">{{ config.title }}</span>
+</div>
+
+<!-- Allow to hide header for some pages using hidepageheaders config in book.json -->
+<script>
+ if (({% for num in config.hidepageheaders %}{{ page.num }} == {{ num }} || {% endfor %}false)) document.getElementById('pdf-header').style.display = 'none'
+</script>
+
+{% endblock %} \ No newline at end of file
diff --git a/docs/_layouts/ebook/summary.html b/docs/_layouts/ebook/summary.html
new file mode 100644
index 0000000..be328a4
--- /dev/null
+++ b/docs/_layouts/ebook/summary.html
@@ -0,0 +1,58 @@
+{% extends "./page.html" %}
+
+{% block title %}{{ "SUMMARY"|t }}{% endblock %}
+
+{% macro articles(_articles) %}
+ {% for article in _articles %}
+ <li>
+ <span class="inner">
+ {% if article.path or article.url %}
+ {% if article.path %}
+ <a href="{{ article.path|contentURL }}{{ article.anchor }}">{{ article.title }}</a>
+ {% else %}
+ <a target="_blank" href="{{ article.url }}">{{ article.title }}</a>
+ {% endif %}
+ {% else %}
+ <span>{{ article.title }}</span>
+ {% endif %}
+ {% if 1 %}
+ <span class="page">{{ article.level }}</span>
+ {% endif %}
+ </span>
+ {% if article.articles.length > 0 %}
+ <ol>
+ {{ articles(article.articles) }}
+ </ol>
+ {% endif %}
+ </li>
+ {% endfor %}
+{% endmacro %}
+
+{% block page %}
+<div class="section toc">
+ <h1>{{ "SUMMARY"|t }}</h1>
+ <ol>
+ {% for part in summary.parts %}
+ {% if part.title %}
+ <li class="part-title">
+ <h2>{{ part.title }}</h2>
+ </li>
+ {% endif %}
+ {{ articles(part.articles) }}
+
+ {% if not loop.last %}
+ <li class="divider"></li>
+ {% endif %}
+ {% endfor %}
+
+ {% if glossary.path %}
+ <li>
+ <span class="inner">
+ <a href="{{ ('/' + glossary.path)|contentURL }}">{{ "GLOSSARY"|t }}</a>
+ </span>
+ </li>
+ {% endif %}
+ </ol>
+</div>
+{% endblock %}
+
diff --git a/docs/_layouts/layout.html b/docs/_layouts/layout.html
new file mode 100644
index 0000000..3d5aca6
--- /dev/null
+++ b/docs/_layouts/layout.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML>
+<html lang="{{ config.language }}" {% if page.dir == "rtl" %}dir="rtl"{% endif %}>
+ <head>
+ <meta charset="UTF-8">
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
+ <title>{% block title %}{{ config.title|d("GitBook", true) }}{% endblock %}</title>
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+ <meta name="description" content="{% block description %}{% endblock %}">
+ <meta name="generator" content="GitBook {{ gitbook.version }}">
+ {% if config.author %}<meta name="author" content="{{ config.author }}">{% endif %}
+ {% if config.isbn %}<meta name="identifier" content="{{ config.isbn }}" scheme="ISBN">{% endif %}
+ {% block style %}
+ {% for resource in plugins.resources.css %}
+ {% if resource.url %}
+ <link rel="stylesheet" href="{{ resource.url }}">
+ {% else %}
+ <link rel="stylesheet" href="{{ resource.path|resolveAsset }}">
+ {% endif %}
+ {% endfor %}
+ {% endblock %}
+
+ {% block head %}{% endblock %}
+ </head>
+ <body>
+ {% block body %}{% endblock %}
+ {% block javascript %}{% endblock %}
+ </body>
+</html>
diff --git a/docs/cover.jpg b/docs/cover.jpg
new file mode 100755
index 0000000..48e28ad
--- /dev/null
+++ b/docs/cover.jpg
Binary files differ
diff --git a/docs/cover_small.jpg b/docs/cover_small.jpg
new file mode 100644
index 0000000..00c358b
--- /dev/null
+++ b/docs/cover_small.jpg
Binary files differ
diff --git a/docs/images/high-level-arch.png b/docs/images/high-level-arch.png
new file mode 100755
index 0000000..b4a1e8c
--- /dev/null
+++ b/docs/images/high-level-arch.png
Binary files differ
diff --git a/docs/images/iotbzh_logo_small.png b/docs/images/iotbzh_logo_small.png
new file mode 100644
index 0000000..6a98c60
--- /dev/null
+++ b/docs/images/iotbzh_logo_small.png
Binary files differ
diff --git a/docs/images/logo_iot_bzh.svg b/docs/images/logo_iot_bzh.svg
new file mode 100644
index 0000000..aa23e84
--- /dev/null
+++ b/docs/images/logo_iot_bzh.svg
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="201"
+ height="55"
+ id="svg4035"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="logo_iot_bzh.svg"
+ inkscape:export-filename="/shared/Templates/Logo/logo_iot_bzh_100dpi.png"
+ inkscape:export-xdpi="100"
+ inkscape:export-ydpi="100">
+ <defs
+ id="defs4037">
+ <filter
+ id="filter4000"
+ inkscape:label="Drop Shadow"
+ style="color-interpolation-filters:sRGB">
+ <feFlood
+ id="feFlood4002"
+ flood-opacity="0.475"
+ flood-color="rgb(0,0,0)"
+ result="flood" />
+ <feComposite
+ id="feComposite4004"
+ in2="SourceGraphic"
+ in="flood"
+ operator="in"
+ result="composite1" />
+ <feGaussianBlur
+ id="feGaussianBlur4006"
+ stdDeviation="5"
+ result="blur" />
+ <feOffset
+ id="feOffset4008"
+ dx="8"
+ dy="8"
+ result="offset" />
+ <feComposite
+ id="feComposite4010"
+ in2="offset"
+ in="SourceGraphic"
+ operator="over"
+ result="composite2" />
+ </filter>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.4"
+ inkscape:cx="58.845307"
+ inkscape:cy="11.584152"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:window-width="1401"
+ inkscape:window-height="901"
+ inkscape:window-x="226"
+ inkscape:window-y="91"
+ inkscape:window-maximized="0" />
+ <metadata
+ id="metadata4040">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-49.874326,-541.49045)">
+ <g
+ id="g3091"
+ transform="matrix(0.33646024,0,0,0.33646024,52.43994,405.25569)"
+ inkscape:export-filename="/home/sdx/Pictures/Logo/logo_iot_bzh_100dpi.png"
+ inkscape:export-xdpi="100.22011"
+ inkscape:export-ydpi="100.22011"
+ style="display:inline;filter:url(#filter4000)">
+ <text
+ sodipodi:linespacing="125%"
+ id="text3557-5-3-7-0-7-3"
+ y="519.50671"
+ x="27.886671"
+ style="font-style:normal;font-weight:normal;font-size:97.09867096px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none"
+ xml:space="preserve"><tspan
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:97.09867096px;line-height:125%;font-family:FreeEuro;-inkscape-font-specification:'FreeEuro Bold';text-align:start;writing-mode:lr-tb;text-anchor:start"
+ y="519.50671"
+ x="27.886671"
+ id="tspan3559-5-4-1-5-0-6"
+ sodipodi:role="line">IOT</tspan></text>
+ <path
+ inkscape:connector-curvature="0"
+ d="m 286.73007,473.23356 c 28.21686,16.29102 28.75566,58.73779 0.99693,78.53831 -7.67688,5.47598 -8.77935,4.91028 -1.99529,-1.0238 17.47377,-15.28453 17.98492,-42.17775 1.08522,-57.09786 l -3.91266,-3.45435 0.72312,-3.71053 c 0.39771,-2.04076 0.5997,-5.73115 0.44885,-8.20083 -0.33876,-5.54623 0.15803,-6.49185 2.65383,-5.05094 z m -64.76568,11.40332 c 7.06047,-7.74198 18.64659,-14.16089 29.04027,-16.08874 l 6.87489,-1.27521 0.87404,2.89709 c 0.4807,1.59343 0.67439,5.2245 0.43037,8.06906 l -0.44364,5.17195 -6.13887,1.6918 c -10.91241,3.00731 -20.4022,10.85909 -25.4533,21.05979 l -2.41633,4.87984 -2.74281,-0.41238 c -5.14252,-0.77316 -12.72985,-3.97645 -12.79123,-5.40033 -0.092,-2.13451 8.34659,-15.74625 12.76661,-20.59287 z m 33.20546,36.39493 c -28.21687,16.29101 -65.24624,-4.46574 -68.51461,-38.40577 -0.9039,-9.38637 0.13723,-10.0583 1.88428,-1.21608 4.49989,22.77499 27.53453,36.66428 48.90556,29.48876 l 4.94788,-1.66128 2.85184,2.48149 c 1.56852,1.36481 4.66349,3.38493 6.87772,4.48914 4.97257,2.47973 5.54308,3.38282 3.04733,4.82374 z m 22.50729,-61.79039 c 3.17451,9.98553 2.94038,23.22889 -0.58688,33.19399 l -2.33309,6.59143 -2.94597,-0.69161 c -1.6203,-0.38041 -4.86173,-2.02821 -7.2032,-3.6618 l -4.25721,-2.97018 1.60429,-6.16234 c 2.85178,-10.95404 0.79685,-23.09833 -5.51167,-32.57307 l -3.01788,-4.53253 1.72854,-2.16916 c 3.24083,-4.06698 9.80863,-9.03614 11.07242,-8.37738 1.89457,0.98756 9.46336,15.1015 11.45065,21.35265 z m -48.80223,10.31437 c 0,-32.58201 36.49058,-54.27201 67.51771,-40.1325 8.58077,3.9104 8.6421,5.148 0.11108,2.23988 -21.97368,-7.49048 -45.51946,5.51348 -49.99082,27.6091 l -1.03521,5.11561 -3.57498,1.22902 c -1.96621,0.67596 -5.26316,2.34622 -7.32655,3.71171 -4.63379,3.06649 -5.70115,3.10904 -5.70115,0.22718 z m 42.25842,50.3871 c -10.23499,-2.24356 -21.58699,-9.06801 -28.45341,-17.10525 l -4.5418,-5.31622 2.07194,-2.20549 c 1.13957,-1.21302 4.18733,-3.19628 6.77282,-4.40726 l 4.70085,-2.20176 4.53458,4.47053 c 8.06061,7.94674 19.60535,12.23927 30.96496,11.51329 l 5.43422,-0.34731 1.01427,2.58154 c 1.90169,4.84014 2.92124,13.01261 1.71883,13.77769 -1.80254,1.14695 -17.80995,0.64475 -24.21726,-0.75976 z"
+ style="display:inline;fill:#5a2ca0"
+ id="path3415-4-2-2-5-0-3-7-4-4-1-5" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3557-5-3-7-46-7-3-7"
+ y="519.50671"
+ x="317.95816"
+ style="font-style:normal;font-weight:normal;font-size:97.09867096px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none"
+ xml:space="preserve"><tspan
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:97.09867096px;line-height:125%;font-family:FreeEuro;-inkscape-font-specification:'FreeEuro Bold';text-align:start;writing-mode:lr-tb;text-anchor:start"
+ y="519.50671"
+ x="317.95816"
+ id="tspan3559-5-4-1-90-0-2-9"
+ sodipodi:role="line">BZH</tspan></text>
+ </g>
+ <rect
+ style="display:inline;fill:none;stroke:none"
+ id="rect3098"
+ width="194.18564"
+ height="54.688999"
+ x="251.47862"
+ y="487.87482"
+ inkscape:export-filename="/home/sdx/Pictures/Logo/logo_iot_bzh_100dpi.png"
+ inkscape:export-xdpi="100.22011"
+ inkscape:export-ydpi="100.22011" />
+ </g>
+</svg>
diff --git a/docs/resources/cover.svg b/docs/resources/cover.svg
new file mode 100644
index 0000000..55509c7
--- /dev/null
+++ b/docs/resources/cover.svg
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="1800"
+ height="2360"
+ viewBox="0 0 1800 2360"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="cover.svg">
+ <defs
+ id="defs4175">
+ <filter
+ style="color-interpolation-filters:sRGB"
+ inkscape:label="Drop Shadow"
+ id="filter4000">
+ <feFlood
+ result="flood"
+ flood-color="rgb(0,0,0)"
+ flood-opacity="0.475"
+ id="feFlood4002" />
+ <feComposite
+ result="composite1"
+ operator="in"
+ in="flood"
+ in2="SourceGraphic"
+ id="feComposite4004" />
+ <feGaussianBlur
+ result="blur"
+ stdDeviation="5"
+ id="feGaussianBlur4006" />
+ <feOffset
+ result="offset"
+ dy="8"
+ dx="8"
+ id="feOffset4008" />
+ <feComposite
+ result="composite2"
+ operator="over"
+ in="SourceGraphic"
+ in2="offset"
+ id="feComposite4010" />
+ </filter>
+ <filter
+ style="color-interpolation-filters:sRGB"
+ id="filter4000-6"
+ inkscape:label="Drop Shadow">
+ <feFlood
+ id="feFlood4002-4"
+ flood-opacity="0.475"
+ flood-color="rgb(0,0,0)"
+ result="flood" />
+ <feComposite
+ id="feComposite4004-6"
+ in2="SourceGraphic"
+ in="flood"
+ operator="in"
+ result="composite1" />
+ <feGaussianBlur
+ id="feGaussianBlur4006-2"
+ stdDeviation="5"
+ result="blur" />
+ <feOffset
+ id="feOffset4008-8"
+ dx="8"
+ dy="8"
+ result="offset" />
+ <feComposite
+ id="feComposite4010-9"
+ in2="offset"
+ in="SourceGraphic"
+ operator="over"
+ result="composite2" />
+ </filter>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.24748737"
+ inkscape:cx="303.38436"
+ inkscape:cy="1108.7164"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:snap-text-baseline="false"
+ units="px"
+ inkscape:window-width="1920"
+ inkscape:window-height="1171"
+ inkscape:window-x="1920"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ showguides="false" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,1307.6379)">
+ <g
+ id="iotbzh-logo"
+ transform="matrix(2.3917866,0,0,2.3917866,216.6324,-1946.4393)"
+ inkscape:export-filename="/home/sdx/Pictures/Logo/logo_iot_bzh_100dpi.png"
+ inkscape:export-xdpi="100.22011"
+ inkscape:export-ydpi="100.22011"
+ style="display:inline;filter:url(#filter4000-6)">
+ <text
+ sodipodi:linespacing="125%"
+ id="text3557-5-3-7-0-7-3"
+ y="519.50671"
+ x="27.886671"
+ style="font-style:normal;font-weight:normal;font-size:97.09867096px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none"
+ xml:space="preserve"><tspan
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:97.09867096px;line-height:125%;font-family:FreeEuro;-inkscape-font-specification:'FreeEuro Bold';text-align:start;writing-mode:lr-tb;text-anchor:start"
+ y="519.50671"
+ x="27.886671"
+ id="tspan3559-5-4-1-5-0-6"
+ sodipodi:role="line">IOT</tspan></text>
+ <path
+ inkscape:connector-curvature="0"
+ d="m 286.73007,473.23356 c 28.21686,16.29102 28.75566,58.73779 0.99693,78.53831 -7.67688,5.47598 -8.77935,4.91028 -1.99529,-1.0238 17.47377,-15.28453 17.98492,-42.17775 1.08522,-57.09786 l -3.91266,-3.45435 0.72312,-3.71053 c 0.39771,-2.04076 0.5997,-5.73115 0.44885,-8.20083 -0.33876,-5.54623 0.15803,-6.49185 2.65383,-5.05094 z m -64.76568,11.40332 c 7.06047,-7.74198 18.64659,-14.16089 29.04027,-16.08874 l 6.87489,-1.27521 0.87404,2.89709 c 0.4807,1.59343 0.67439,5.2245 0.43037,8.06906 l -0.44364,5.17195 -6.13887,1.6918 c -10.91241,3.00731 -20.4022,10.85909 -25.4533,21.05979 l -2.41633,4.87984 -2.74281,-0.41238 c -5.14252,-0.77316 -12.72985,-3.97645 -12.79123,-5.40033 -0.092,-2.13451 8.34659,-15.74625 12.76661,-20.59287 z m 33.20546,36.39493 c -28.21687,16.29101 -65.24624,-4.46574 -68.51461,-38.40577 -0.9039,-9.38637 0.13723,-10.0583 1.88428,-1.21608 4.49989,22.77499 27.53453,36.66428 48.90556,29.48876 l 4.94788,-1.66128 2.85184,2.48149 c 1.56852,1.36481 4.66349,3.38493 6.87772,4.48914 4.97257,2.47973 5.54308,3.38282 3.04733,4.82374 z m 22.50729,-61.79039 c 3.17451,9.98553 2.94038,23.22889 -0.58688,33.19399 l -2.33309,6.59143 -2.94597,-0.69161 c -1.6203,-0.38041 -4.86173,-2.02821 -7.2032,-3.6618 l -4.25721,-2.97018 1.60429,-6.16234 c 2.85178,-10.95404 0.79685,-23.09833 -5.51167,-32.57307 l -3.01788,-4.53253 1.72854,-2.16916 c 3.24083,-4.06698 9.80863,-9.03614 11.07242,-8.37738 1.89457,0.98756 9.46336,15.1015 11.45065,21.35265 z m -48.80223,10.31437 c 0,-32.58201 36.49058,-54.27201 67.51771,-40.1325 8.58077,3.9104 8.6421,5.148 0.11108,2.23988 -21.97368,-7.49048 -45.51946,5.51348 -49.99082,27.6091 l -1.03521,5.11561 -3.57498,1.22902 c -1.96621,0.67596 -5.26316,2.34622 -7.32655,3.71171 -4.63379,3.06649 -5.70115,3.10904 -5.70115,0.22718 z m 42.25842,50.3871 c -10.23499,-2.24356 -21.58699,-9.06801 -28.45341,-17.10525 l -4.5418,-5.31622 2.07194,-2.20549 c 1.13957,-1.21302 4.18733,-3.19628 6.77282,-4.40726 l 4.70085,-2.20176 4.53458,4.47053 c 8.06061,7.94674 19.60535,12.23927 30.96496,11.51329 l 5.43422,-0.34731 1.01427,2.58154 c 1.90169,4.84014 2.92124,13.01261 1.71883,13.77769 -1.80254,1.14695 -17.80995,0.64475 -24.21726,-0.75976 z"
+ style="display:inline;fill:#5a2ca0"
+ id="path3415-4-2-2-5-0-3-7-4-4-1-5" />
+ <text
+ sodipodi:linespacing="125%"
+ id="text3557-5-3-7-46-7-3-7"
+ y="519.50671"
+ x="317.95816"
+ style="font-style:normal;font-weight:normal;font-size:97.09867096px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none"
+ xml:space="preserve"><tspan
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:97.09867096px;line-height:125%;font-family:FreeEuro;-inkscape-font-specification:'FreeEuro Bold';text-align:start;writing-mode:lr-tb;text-anchor:start"
+ y="519.50671"
+ x="317.95816"
+ id="tspan3559-5-4-1-90-0-2-9"
+ sodipodi:role="line">BZH</tspan></text>
+ </g>
+ <flowRoot
+ xml:space="preserve"
+ id="root-title"
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:Verdana;-inkscape-font-specification:'Verdana, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(2.3469382,0,0,2.3469382,464.13874,-1125.3671)"><flowRegion
+ id="flowRegion4303"><rect
+ id="rect4305"
+ width="679.99994"
+ height="141.42853"
+ x="-154.28572"
+ y="359.50504"
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:Verdana;-inkscape-font-specification:'Verdana, Bold';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1" /></flowRegion><flowPara
+ id="title"
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:87.5px;line-height:125%;font-family:Verdana;-inkscape-font-specification:'Verdana, Bold';text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1">{title}</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="root-subtitle"
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:Verdana;-inkscape-font-specification:'Verdana, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(1.8523279,0,0,1.8523279,553.97647,-524.84064)"><flowRegion
+ id="flowRegion4303-6"><rect
+ id="rect4305-0"
+ width="852.32806"
+ height="154.51677"
+ x="-239.3591"
+ y="346.41681"
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:Verdana;-inkscape-font-specification:'Verdana, Bold';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1" /></flowRegion><flowPara
+ id="subtitle"
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:62.5px;line-height:125%;font-family:Verdana;-inkscape-font-specification:'Verdana, Bold';text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1">{subtitle}</flowPara></flowRoot> <flowRoot
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:173.28189087px;line-height:125%;font-family:Verdana;-inkscape-font-specification:'Verdana, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ id="root-version"
+ xml:space="preserve"
+ transform="translate(-2.0185547,164)"><flowRegion
+ id="flowRegion4169"><rect
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:173.28189087px;line-height:125%;font-family:Verdana;-inkscape-font-specification:'Verdana, Bold';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1"
+ y="501.68909"
+ x="343.32947"
+ height="99.591171"
+ width="1117.3768"
+ id="rect4171" /></flowRegion><flowPara
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:68.75px;line-height:125%;font-family:Verdana;-inkscape-font-specification:'Verdana, Bold';text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1"
+ id="version">{version}</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="root-date"
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:Verdana;-inkscape-font-specification:'Verdana, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(4.3320472,0,0,4.3320472,1023.8272,-788.11995)"><flowRegion
+ id="flowRegion4303-6-5"><rect
+ id="rect4305-0-8"
+ width="251.40364"
+ height="23.922138"
+ x="-154.28572"
+ y="359.50504"
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:40px;line-height:125%;font-family:Verdana;-inkscape-font-specification:'Verdana, Bold';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1" /></flowRegion><flowPara
+ id="date"
+ style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:15.87009525px;line-height:125%;font-family:Verdana;-inkscape-font-specification:'Verdana, Bold';text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1">{date}</flowPara></flowRoot> </g>
+</svg>
diff --git a/docs/resources/ebook.css b/docs/resources/ebook.css
new file mode 100644
index 0000000..39f126c
--- /dev/null
+++ b/docs/resources/ebook.css
@@ -0,0 +1,386 @@
+/* IoT.Bzh theaming */
+
+h1 {
+ color: #330066;
+ border-bottom: 2px solid #330066;
+}
+
+h2 {
+ color: #330066;
+}
+
+h3 {
+ color: #330066;
+}
+
+h4 {
+ color: #330066;
+}
+
+
+/* GENERAL ELEMENTS */
+
+/* clear both */
+
+.clear {
+ clear: both;
+}
+
+.section> :last-child {
+ margin-bottom: 0 !important;
+}
+
+.section> :first-child {
+ margin-top: 0 !important;
+}
+
+
+/* SPECIAL ELEMENTS */
+
+
+/* page break always after element on pdf/print definition */
+
+div.pagebreak {
+ page-break-after: always;
+}
+
+
+/* no page break inside element on pdf/print definition */
+
+div.nopb {
+ page-break-inside: avoid !important;
+ margin: 4px 0 4px 0;
+}
+
+
+/* note blocks */
+
+div.note {
+ background: #FCF8E3 none repeat scroll 0% 0%;
+ color: #8A6D3B;
+ padding: 15px;
+ margin-bottom: 10px;
+ border-bottom: 5px solid #DDD;
+ border-color: #FAEBCC;
+ page-break-inside: avoid;
+}
+
+div.note p {
+ padding-bottom: 0;
+ margin-bottom: 0;
+}
+
+
+/* images, figures and captions */
+
+p img {
+ /* center all images */
+ display: block;
+ margin: 0 auto;
+ padding: 10px 0;
+}
+
+figure {
+ margin: 1.0em 0px;
+ padding: 10px 0;
+ text-align: center;
+ page-break-inside: avoid;
+ display: block;
+}
+
+figure img {
+ display: block;
+ margin: 0 auto;
+}
+
+figcaption {
+ clear: left;
+ margin: 1.0em 0 0 0;
+ text-align: center;
+ font-style: italic;
+ line-height: 1.5em;
+ font-size: 80%;
+ color: #666;
+ display: block;
+}
+
+.page .section p img {
+ margin-top: 10px;
+}
+
+
+/* ul, ol list margin fix */
+
+.page .section ol,
+.page .section ul {
+ margin-bottom: 10px;
+}
+
+
+/* blockquotes */
+
+.page .section blockquote {
+ margin: 0 0 0 5%;
+ font-style: italic;
+}
+
+
+/* PAGE SPECIFIC */
+
+
+/* set summary page to right side of the paper */
+
+.page .toc h1 {
+ page-break-before: right;
+}
+
+.page .section.toc {
+ page-break-inside: always;
+}
+
+/* table headers */
+
+div#README\.md table {
+ margin-top: 30px;
+ font-size: 95%;
+}
+
+div#README\.md table thead {
+ display: none;
+}
+
+
+
+/* CITATION AND IMAGES */
+
+
+/* math image styles */
+
+.page .section p img.svg,
+.page .section p img.png {
+ margin-top: 0px;
+ margin-bottom: -2px;
+}
+
+.page .section p img.math {
+ vertical-align: middle;
+ height: auto;
+ width: auto;
+ margin-top: -4px;
+ max-height: 15px;
+}
+
+.page .section p img.math.line1 {
+ margin-top: -7px;
+ max-height: 19px;
+}
+
+.page .section p img.math.line2 {
+ margin-top: -1px;
+ max-height: 30px;
+}
+
+
+/* credits page */
+
+.page .section ul.pictures {
+ margin-left: -30px;
+}
+
+.page .section ul.pictures li {
+ list-style: outside none none;
+}
+
+.page .section ul.pictures li a {
+ float: left;
+}
+
+.page .section ul.pictures li span {
+ display: block;
+ margin-left: 100px;
+}
+
+
+
+/* sub and super script */
+
+.page .section sub {
+ font-size: 80%;
+ margin-left: 1px;
+}
+
+
+/* citations and references */
+
+.page .section sup {
+ margin-left: -1px;
+ margin-right: 2px;
+ font-size: 80%;
+}
+
+.page .section sup:before {
+ content: " ";
+}
+
+.page .section ul.citations,
+.page .section ul.references {
+ margin-left: -30px;
+}
+
+
+.page .section ul.citations li:nth-child(1) {
+ margin-top: 20px;
+ padding-top: 20px;
+ border-top: 1px solid #BBB;
+}
+
+.page .section ul.citations li,
+.page .section ul.references li {
+ list-style: outside none none;
+}
+
+.page .section ul.citations li {
+ font-size: 80%;
+}
+
+.page .section ul.citations li>span:nth-child(1),
+.page .section ul.references li>span:nth-child(1) {
+ display: block;
+ float: left;
+ text-align: left;
+ width: 70px
+}
+
+.page .section ul.citations li>span:nth-child(1) {
+ width: 50px
+}
+
+.page .section ul.references li div {
+ margin-left: 70px;
+}
+
+.page .section ul.citations li div {
+ margin-left: 50px;
+}
+
+.page .section a[href="#"],
+.page .section a[href="#"]:link,
+.page .section a[href="#"]:visited,
+.page .section a[href="#"]:hover,
+.page .section a[href="#"]:focus {
+ text-decoration: none;
+ color: inherit;
+ cursor: text;
+ font-style: italic;
+}
+
+
+/* self referential footnotes */
+
+.page .section div[type="selfref"] a[href="#"],
+.page .section div[type="selfref"] a[href="#"]:link,
+.page .section div[type="selfref"] a[href="#"]:visited,
+.page .section div[type="selfref"] a[href="#"]:hover,
+.page .section div[type="selfref"] a[href="#"]:focus {
+ font-style: normal;
+}
+
+.page .section div[type="selfref"] span:nth-child(1) {
+ display: none;
+}
+
+
+/* page break always after element on pdf/print definition */
+
+div.page-break {
+ page-break-inside: always;
+}
+
+div.page-break:before {
+ content: ' ';
+}
+
+
+/* no page break inside element on pdf/print definition */
+
+div.nopb {
+ page-break-inside: avoid;
+}
+
+/* justify text */
+p {
+ text-align: justify;
+}
+
+/* page header and footer */
+
+.pdf-footer,
+.pdf-header {
+ margin-top: 20px;
+ color: #aaa;
+}
+
+.pdf-header .header-left {
+ float: left;
+ margin-left: 2em;
+ margin-right: auto;
+}
+
+.pdf-header .header-right {
+ display: table;
+ margin-left: auto;
+ margin-right: 2em;
+}
+
+.pdf-footer .sub {
+ padding-top: 8px;
+ font-size: 70%;
+}
+
+.pdf-header .sub {
+ padding-top: 2px;
+ font-size: 70%;
+}
+
+.pdf-footer {
+ padding-top: 10px;
+ border-top: 1px solid #eee;
+}
+
+.pdf-footer .footer-left {
+ float: left;
+ margin-left: 2em;
+ margin-right: auto;
+}
+
+.pdf-footer .footer-center {
+ display: table;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+.pdf-footer .footer-right {
+ float: right;
+ margin-left: auto;
+ margin-right: 2em;
+}
+
+.pdf-header {
+ padding-bottom: 10px;
+ border-bottom: 1px solid #eee;
+}
+
+.pdf-header .header-pages-count {
+ float: right;
+ text-align: right;
+}
+
+.pdf-header .header-pages-count a,
+.pdf-header .header-pages-count a:visited,
+.pdf-header .header-pages-count a:active,
+.pdf-header .header-pages-count a:focus,
+.pdf-header .header-pages-count a:link {
+ text-decoration: none;
+ color: #aaa;
+ cursor: text;
+}
diff --git a/docs/resources/make_cover.sh b/docs/resources/make_cover.sh
new file mode 100755
index 0000000..fef2087
--- /dev/null
+++ b/docs/resources/make_cover.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+cat cover.svg | sed -e 's/{title}/Low Level CAN binding/' \
+ -e 's/font-size:87.5px/font-size:50px/g' \
+ -e 's/{subtitle}//g' \
+ -e 's/{version}/Version 1.0/g' \
+ -e 's/{date}/March 2017/g' \
+ > /tmp/cover.svg
+
+# use imagemagick convert tool (cover size must be 1800x2360)
+convert -resize "1600x2160!" -border 100 -bordercolor white -background white \
+ -flatten -quality 100 /tmp/cover.svg ../cover.jpg
+
+convert -resize "200x262!" ../cover.jpg ../cover_small.jpg
diff --git a/gendocs.sh b/gendocs.sh
new file mode 100755
index 0000000..a0f6e5c
--- /dev/null
+++ b/gendocs.sh
@@ -0,0 +1,73 @@
+#!/bin/bash
+
+SCRIPT=$(basename $BASH_SOURCE)
+
+function usage() {
+ cat <<EOF >&2
+Usage: $SCRIPT [options] [pdf|serve|doxygen]
+
+Options:
+ --debug
+ enable debug when generating pdf or html documentation
+ -d|--dry
+ dry run
+ -h|--help
+ get this help
+
+Example:
+ $SCRIPT pdf
+
+EOF
+ exit 1
+}
+
+function info() {
+ echo "$@" >&2
+}
+
+#default values
+DEBUG_FLAG=""
+DRY=""
+DO_ACTION=""
+OUT_DIR=./build
+
+[[ $? != 0 ]] && usage
+while [ $# -gt 0 ]; do
+ case "$1" in
+ --debug) DEBUG_FLAG="--log=debug --debug";;
+ -d|--dry) DRY=echo;;
+ -h|--help) usage;;
+ pdf | serve | doxygen) DO_ACTION=$1;;
+ --) break;;
+ esac
+ shift
+done
+
+cd $(dirname $0)
+ROOTDIR=`pwd -P`
+
+# Create out dir if needed
+[ -d $OUT_DIR ] || mkdir -p $OUT_DIR
+
+if [ "$DO_ACTION" = "pdf" -o "$DO_ACTION" = "serve" ]; then
+ GITBOOK=`which gitbook`
+ [ "$?" = "1" ] && { echo "You must install gitbook first, using: sudo npm install -g gitbook-cli"; exit 1; }
+
+ EBCONV=`which ebook-convert`
+ [ "$?" = "1" ] && { echo "You must install calibre first, using: 'sudo apt install calibre' or refer to https://calibre-ebook.com/download"; exit 1; }
+
+ if [ "$DO_ACTION" = "pdf" ]; then
+ OUTFILE=$OUT_DIR/LowLevelCanBinding_Guide.pdf
+ $DRY $GITBOOK pdf $ROOTDIR $OUTFILE $DEBUG_FLAG
+ [ "$?" = "0" ] && echo "PDF has been successfully generated in $OUTFILE"
+ else
+ $DRY $GITBOOK serve $DEBUG_FLAG
+ fi
+
+elif [ "$DO_ACTION" = "doxygen" ]; then
+ $DRY cd $OUT_DIR && cmake .. && make doxygen $ROOTDIR/Doxyfile
+
+else
+ echo "Unknown action !"
+ usage
+fi