summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2012-10-11 17:39:25 +0200
committerAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2012-10-11 17:39:25 +0200
commitf785c40a96b49df26b35e6a71437be2520d24204 (patch)
tree4c4981028d1d90960f5e5ffeb36f8c5a69248726
parentdcd8dc53fb4523bf955e171acf5614d81dcb6cdb (diff)
downloadDLT-daemon-f785c40a96b49df26b35e6a71437be2520d24204.tar.gz
Modfied documentation using asciibook.
-rw-r--r--INSTALL.txt124
-rw-r--r--README.txt122
-rwxr-xr-xReleaseNotes.txt172
-rwxr-xr-xdoc/create_doc.sh27
-rw-r--r--doc/dlt-convert.1200
-rw-r--r--doc/dlt-convert.1.txt87
-rw-r--r--doc/dlt-daemon.1113
-rw-r--r--doc/dlt-daemon.1.txt59
-rw-r--r--doc/dlt-receive.1176
-rw-r--r--doc/dlt-receive.1.txt75
-rw-r--r--doc/dlt-system.199
-rw-r--r--doc/dlt-system.1.txt56
-rw-r--r--doc/dlt-system.conf.5494
-rw-r--r--doc/dlt-system.conf.5.txt186
-rw-r--r--doc/dlt.conf.5449
-rw-r--r--doc/dlt.conf.5.txt183
-rw-r--r--doc/dlt_book.txt46
-rw-r--r--doc/dlt_cheatsheet.txt239
-rw-r--r--doc/dlt_design_specification.txt629
-rw-r--r--doc/dlt_user_manual.txt327
-rwxr-xr-xdoc/images/dlt_architecture.pngbin0 -> 24373 bytes
-rwxr-xr-xdoc/images/dlt_message_flow.pngbin0 -> 52581 bytes
-rwxr-xr-xdoc/images/dlt_overview.pngbin0 -> 15875 bytes
-rwxr-xr-xdoc/images/genivi_chrome_1_transparent.pngbin0 -> 261894 bytes
24 files changed, 3148 insertions, 715 deletions
diff --git a/INSTALL.txt b/INSTALL.txt
index d58d83e..9835199 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -1,6 +1,9 @@
+Diagnostic Log and Trace - Installation
+========================================
+Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
+
Instructions for installing this software
-----------------------------------------
-
This software uses cmake as its build tool. To build and install the
DLT daemon, follow these steps:
@@ -11,8 +14,119 @@ DLT daemon, follow these steps:
- optional: sudo make install
- optional: sudo ldconfig
+Compile options with default values
+-----------------------------------
+[options="header"]
+|==============================================================================================
+| Option | Value | Comment
+| WITH_SYSTEMD | OFF | Set to on to run CMakeLists.txt in systemd
+| WITH_SYSTEMD_WATCHDOG | OFF | Set to ON to use the systemd watchdog in dlt-daemon
+| WITH_DLT_ADAPTOR | ON | Set ton ON to build src/adaptor binaries
+| WITH_DLT_CONSOLE | ON | Set ton ON to build src/console binaries
+| WITH_DLT_SYSTEM | ON | Set ton ON to build src/systembinaries
+| WITH_DLT_EXAMPLES | ON | Set ton ON to build src/examplesbinaries
+| WITH_DLT_TESTS | ON | Set ton ON to build src/testbinaries
+| WITH_DLT_SHM_ENABLE | OFF | Set to OFF to use FIFO as IPC from user to daemon
+| WITH_CHECK_CONFIG_FILE | OFF | Set to ON to create a configure file of CheckIncludeFiles and CheckFunctionExists
+| WITH_DOC | OFF | Set to ON to build documentation target
+| WITH_TESTSCRIPTS | OFF | Set to on to run CMakeLists.txt in test scripts
+| WITH_GPROF | OFF | Set \-pg to compile flags
+| WITH_MAN | ON | Set to OFF to skip building of man pages
+| BUILD_SHARED_LIBS | ON | Set to OFF to build static libraries
+| CMAKE_INSTALL_PREFIX | /usr/local |
+| CMAKE_BUILD_TYPE | RelWithDebInfo |
+|==============================================================================================
+
+In order to change these options, you can modify this values
+with ccmake, do the appropriate changes in CmakeList.txt or via
+the commandline for cmake
+
+- Change a value with: cmake -D<Variable>=<Value>
+- Example: cmake -DCMAKE_INSTALL_PREFIX=/usr
+
+Create Man pages
+----------------
+With the compile option "WITH_MAN=ON" (default value) the man
+pages will generated. After the call "sudo make install" (see
+"Compiling in Linux") they are installed at <CMAKE_INSTALL_PREFIX>/share/man.
+
+Create doxygen documentation
+----------------------------
+- mkdir build
+- cd build
+- cmake -DWITH_DOC=ON ..
+- make
+- (only DLT doc - optional )make doc
+- (only DLT-Filetransfer - optional )make doc-filetransfer
+
+You find the documentation know as HTML, RTF or LaTex in <project-root>/build/doc
+
+- Doxygen documentation
+
+Generation of systemd unit files
+--------------------------------
+
+DLT provides some example unit files for systemd, stored in <DLT-root>/systemd.
+In <DLT-root>/systemd/CMakeLists.txt you have to specify some values, e.g. the port for dlt-adaptor-udp.
+By default the generation of unit files with cmake is off. Please follow these steps to enable the generation:
+
+* Change into the root directory of DLT-daemon
+* mkdir build
+* cd build
+* cmake -DWITH_SYSTEMD=ON ..
+
+You find the parsed unit files in the PROJECT_BINARY_DIR/systemd directory.
+
+Git configuration
+-----------------
+It is important to set the name of the user and the email of the user for all git instances on the system:
+
+----
+git config --global user.name "Firstname Lastname"
+git config --global user.email "your_email@youremail.com"
+----
+
+If you are behind a proxy you have to set up the Git proxy configuration, e.g.
+
+----
+git config --global http.proxy $http_proxy
+----
+
+Checkout the code from the GENIVI Git repository.
+
+----
+git clone http://git.projects.genivi.org/dlt-daemon.git
+----
+
+Working on the code & contribution
+----------------------------------
+Get an overview of all branches:
+
+----
+git branch -a
+----
+
+Switch to the branch you want to work on (see versioning scheme, the master is the feature branch) and verify that it has switched.
+
+----
+git checkout <remote branch>
+git branch -a
+----
+
+Best practice is to create a local branch based on the remote branch:
+
+----
+git checkout -b <local branch> <remote branch>
+----
+
+Start working, best practice is to commit smaller, compilable pieces during the work that makes it easier to handle later on.
+
+If you want to commit your changes, send them to the auto-dlt list, you can create a patch like this:
+
+----
+git format-patch -s <remote branch>
+----
+
+This creates a set of patches that are published via the mailing list. The patches will be discussed, merged & uploaded on the git.
+
-Please read the README.txt for
-- Compile options
-- Man pages
-- Doxygen documentation \ No newline at end of file
diff --git a/README.txt b/README.txt
index f317849..a6d2c08 100644
--- a/README.txt
+++ b/README.txt
@@ -1,11 +1,14 @@
-DLT - Automotive Diagnostic Log and Trace
-
-Version: 2.9.0 RELEASE
+Diagnostic Log and Trace - Readme
+==================================
+Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
+Overview
+--------
This component provides a standardised log and trace interface, based on the
standardised protocol specified in the AUTOSAR standard 4.0 DLT.
This component can be used by GENIVI components and other applications as
logging facility providing
+
- the DLT shared library
- the DLT daemon
- the DLT daemon adaptors
@@ -20,84 +23,57 @@ The DLT client can send control messages to the daemon, e.g. to set
individual log levels of applications and contexts or get the list of
applications and contexts registered in the DLT daemon.
+Documentation
+-------------
+- DLT Release Notes: ReleaseNotes.txt
+- DLT Installation: INSTALL.txt
+- DLT User Manual: doc/dlt_user_manual.txt
+- DLT Cheatsheet: doc/dlt_cheatsheet.txt
+- DLT Design Specification :doc/dlt_design_specification.txt
-Homepage
---------
-https://collab.genivi.org/wiki/display/geniviproj/Automotive+DLT+%28Diagnostic+Log+and+Trace%29
+API Documentation
+-----------------
+See INSTALL.txt regarding doxygen API documentation generation.
+Manpages
+--------
+- dlt-daemon(1)
+- dlt.conf(5)
+- dlt-system(1)
+- dlt-system.conf(5)
+- dlt-receive(1)
+- dlt-convert(9)
+
+Known issues
+------------
+- DLT library: Usage of dlt_user_log_write_float64() and DLT_FLOAT64() leads to "Illegal instruction (core dumped)" on ARM target.
+- DLT library: Nested calls to DLT_LOG_ ... are not supported, and will lead to a deadlock.
+
+Software/Hardware
+-----------------
+Developped and tested with Ubuntu Linux 12.04 32-bit / Intel PC
License
-------
-Full information on the license for this software
-is available in the "LICENSE.txt" file.
-The full MPL license is in "MPL.txt."
-
-
-Contact
--------
-Alexander Wenzel (Alexander.AW.Wenzel@bmw.de)
-Christian Muck (christian.muck@bmw.de)
+Full information on the license for this software is available in the "LICENSE.txt" file.
+Source Code
+-----------
+git://git.projects.genivi.org/dlt-daemon.git
+http://git.projects.genivi.org/dlt-daemon.git
+ssh://git-genivi@git.projects.genivi.org/dlt-daemon.git
-Compiling in Linux:
--------------------
-- mkdir build
-- cd build
-- cmake ..
-- make
-- optional: sudo make install
-- optional: sudo ldconfig
-
-
-Compile options with default values
------------------------------------
-- WITH_SYSTEMD = OFF
-- WITH_SYSTEMD_WATCHDOG = OFF
-- WTIH_DLT_ADAPTOR = ON
-- WITH_DLT_CONSOLE = ON
-- WITH_DLT_EXAMPLES = ON
-- WITH_DLT_SYSTEM = ON
-- WITH_DLT_EXAMPLES = ON
-- WITH_DLT_TESTS = ON
-- WITH_CHECK_CONFIG_FILE = OFF
-- WITH_DOC = OFF
-- WITH_TESTSCRIPTS = OFF
-- WITH_GPROF = OFF
-- WITH_MAN = ON
-- WITH_DLTTEST = OFF
-- BUILD_SHARED_LIBS = ON
-- CMAKE_INSTALL_PREFIX = /usr
-- CMAKE_BUILD_TYPE = RelWithDebInfo
-
-In order to change these options, you can modify this values
-with ccmake, do the appropriate changes in CmakeList.txt or via
-the commandline for cmake
-- Change a value with: cmake -D<Variable>=<Value>
-- Example: cmake -DCMAKE_INSTALL_PREFIX=/usr
-
-
-Man pages
----------
-With the compile option "WITH_MAN=ON" (default value) the man
-pages will generated. After the call "sudo make install" (see
-"Compilin in Linux") they are installed at <CMAKE_INSTALL_PREFIX>/share/man.
+Homepage
+--------
+http://projects.genivi.org/diagnostic-log-trace
-To get more informations, call e.g.
-- man dlt-daemon
-- man dlt.conf
-- man dlt-convert
-- man dlt-receive
-- man dlt-system
-- man dlt-system.conf
+Mailinglist
+-----------
+https://lists.genivi.org/mailman/listinfo/genivi-diagnostic-log-and-trace
+Contact
+-------
+Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> +
+Christian Muck <christian.muck@bmw.de>
-Create doxygen documentation
-----------------------------
-- mkdir build
-- cd build
-- cmake -DWITH_DOC=ON ..
-- make
-- (only DLT doc - optional )make doc
-- (only DLT-Filetransfer - optional )make doc-filetransfer
-You find the documentation know as HTML, RTF or LaTex in <project-root>/build/doc
diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt
index 94b8788..26f7d22 100755
--- a/ReleaseNotes.txt
+++ b/ReleaseNotes.txt
@@ -1,51 +1,23 @@
-DLT - Automotive Diagnostic Log and Trace
+Diagnostic Log and Trace - Release Notes
+=========================================
+Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
-Version: 2.9.0 RELEASE
-
-This component provides a standardised log and trace interface, based on the
-standardised protocol specified in the AUTOSAR standard 4.0 DLT.
-This component can be used by GENIVI components and other applications as
-logging facility providing
-- the DLT shared library
-- the DLT daemon
-- the DLT daemon adaptors
-- the DLT client console utilities
-- the DLT test applications
-
-The DLT daemon is the central component in GENIVI, which gathers all
-logs and traces from the DLT user applications. The logs and traces
-are stored optionally directly in a file in the ECU. The DLT daemon
-forwards all logs and traces to a connected DLT client.
-The DLT client can send control messages to the daemon, e.g. to set
-individual log levels of applications and contexts or get the list of
-applications and contexts registered in the DLT daemon.
-
-
-Homepage
---------
-https://collab.genivi.org/wiki/display/geniviproj/Automotive+DLT+%28Diagnostic+Log+and+Trace%29
-
-
-License
+Version
-------
-Full information on the license for this software
-is available in the "LICENSE.txt" file.
-The full MPL license is in "MPL.txt."
+2.9.0 RELEASE
-
-Contact
+Changes
-------
-Alexander Wenzel (Alexander.AW.Wenzel@bmw.de)
-Christian Muck (christian.muck@bmw.de)
-Changes in this release
------------------------
2.9.0
+
+ * Increased buffer sizes for DLT user library and DLT daemon
* [GDLT-120]: truncated and Segmented network tracing
* [GDLT-137]: Automatically try resending of user buffer after FIFO full
* [GSWD-85]: Added authors file
2.8.0
+
* [GDLT-115]: Encapsulate user macros
* Fix register app and register context was not stored in buffer when FIFO is full. Other controll messages still not saved in buffer.
* Create new fifo only when same application registers with different pid.'
@@ -125,7 +97,6 @@ Changes in this release
2.5.0
-Improvements
* [GDLT-53] Man pages installation included
* .cproject and .project file for Eclipse included
* Update of doxygen documentation and generation
@@ -133,8 +104,6 @@ Improvements
* [GENDLT-16] Create variable in dlt-system.conf to configure the timeout of the filetransfer
* [GDLT-37] Extend automated test tools for parallel process/threads tests
* [GSW-138] API Extension to resend the log messages in the user buffer
-
-Bugfixes
* [GDLT-36] Prefixing of dlt_version.h fixed
* [GDLT-31] Tracefile content stored different under Ubuntu 64 bit version compared to Ubuntu/Win 32 Bit version fixed
* [GDLT-35] Compile warnings fixed
@@ -142,23 +111,17 @@ Bugfixes
2.4.2
-Improvements
* Added dynamic increasable ringbuffers to user lib and daemon.
* dlt-system filetransfer now recovers when file is deleted during filetransfer.
* Added check of file size when starting and deleting files during filetransfer
* Added chekc of shm buffer availability when push to shm
* Create abstraction of shm buffer management.
-
-Bugfixes
* Fixed buffer overflow problem in buffer library.
* Disabled share memory by default - disabled completely shared memory if not enabled.
2.4.1
-Improvements
* Added dynamic increasable ringbuffers to user lib and dlt-daemon.
-
-Bugfixes
* Created abstraction of shm buffer management.
* dlt-system filetransfer now recovers when file is deleted during filetransfer.
* Added check of file size when starting and deleting files during filetransfer.
@@ -166,15 +129,12 @@ Bugfixes
2.4.1
-Improvements
* Added internal logging facility to stdout, syslog or local file, configurable in configuration file.
* Added deamonise and signal handlers to dlt-system.
* Added manual pages.
* Added new API dlt_check_library_version() function.
-
-Bugfixes
- * Fifo or SHM mode can be changed by compiler switch.
- * Replaced SHM implementation.
+ * Fifo or SHM mode can be changed by compiler switch.
+ * Replaced SHM implementation.
* Fixed shared memory problem in DLT library during startup, if application is started before daemon.
* Fixed syslog adapter in dlt-system.
* Reverted API changes in dlt_register_app() function.
@@ -182,7 +142,6 @@ Bugfixes
2.4.0
-Improvements
* New config files /etc/dlt.conf and /etc/dlt-system.conf must be adapted to the needs
* New DLT user lib API dlt_get_log_state() to get DLT client state
* New DLT user lib API to manage flow control (needed for bulk data logging)
@@ -197,44 +156,31 @@ Improvements
2.3.0
-Improvements
* [GSW-16] Systemd configuration for syslog to DLT dapater
* [GSW-62] DLT Library version check
* [GSW-28] Directory where persistent data is stored is not configurable
* [GSW-59] Statically allocated large array
* Added init script for Ubuntu
* Optional adding of gprof compile flags
-
-Bugfixes
* sprintf with float64 fails on ARM platform; disabled this function on QRM platform.
-2.2.0:
-
-Improvements
+2.2.0
* Moved build process completely to cmake
* Added commandline parameter -u to set ring buffer size
-
-Bugfixes
-
* Reduced cpu consumption needed by applications using DLT library
* Increased default ringbuffer size to 10024 bytes
* Changed delay in receiver routine to 100ms
-
-2.1.0:
-
-Improvements
+2.1.0
* DLT Viewer (QT)
* New dlt viewer (QT-based) implementated
* Moved to seperate project, see extra Release Notes for DLT Viewer (QT)
-
* DLT Viewer (WX) - Deprecated
* Old dlt viewer (WX) is removed now from package generation
* Moved to seperate project
* Removed filtering of messages during writing to a file
-
* DLT library:
* Functions dlt_file_read_raw() and dlt_file_read_header_raw() added
* Added support for raw messages in nonverbose mode
@@ -245,13 +191,11 @@ Improvements
Attention: This file must be adapted to each target platform.
* Removed signal handlers from dlt_user.c; SIGPIPE signal is ignored; atexit() handler still exists
* Function dlt_forward_msg() added
-
* DLT daemon:
* Small optimization in get_log_info() for one searched application with one searched context,
which is existing in the context table of the dlt daemon
* Optional syncing to serial header added
* Support for keep-alive messages, realized as seperate thread
-
* General:
* Combined dlt-test-user-multi and dlt-test-many to dlt-test-stress
* Extended dlt-test-client
@@ -260,22 +204,16 @@ Improvements
* Added dlt-test-internal
* Removed plugin support from dlt_receive and dlt_convert
* Extended documentation
-
-Bugfixes:
* dlt viewer (wx): Fixed minor bug, it's possible now to compile the dlt viewer (wx) again under mingw under Windows
* DLT test programs: Fixed minor bug in dlt-test-user, test3f: Wrong counter was used
* Removed DLT_LOG calls in injection functions due to problems (application hangs)
-
-2.0.5:
-
-Improvements
+2.0.5
* DLT viewer:
* The default log level is now shown, if already known
* Renamed Filter->New.. to Filter->Delete all filter
* Enhanced performance
-
* DLT library:
* On crash or termination of application using the DLT library,
the registered context and application IDs are removed properly
@@ -283,7 +221,6 @@ Improvements
* dlt_register_context_ll_ts() and Macro therefore added
* dlt_message_payload() has now additional type DLT_OUTPUT_ASCII_LIMITED
* dlt_message_header_flags() added
-
* DLT daemon:
* Support for dlt_register_context_ll_ts() added
* Enhanced support for get_log_info (all modes, 1 app all contexts, 1 app 1 context, all apps all contexts)
@@ -293,13 +230,10 @@ Improvements
* dlt_daemon_context_find(), dlt_daemon_application_find(): Now O(log n) instead O(n)
* Several functions optimized
* Unnecessary functions removed
-
* General:
* Moved definition of struct DltUser from dlt_user_private.h to dlt_user.h
* dlt.h includes now dlt_common.h
* Extended dlt-test-user and dlt-test-client applications
-
-Bugfixes:
* DLT daemon/DLT library: Fixed bug in Filter Delete
* DLT daemon: Fixed bug in dlt daemon which leads to a crash, when starting/stoping application, then sending
new log level to context of this (now not running) application.
@@ -308,34 +242,25 @@ Bugfixes:
* DLT library: Fixed bug in send function
* DLT viewer: Fixed bug in set default log level
-2.0.4:
+2.0.4
-Attention:
* License has changed from ADRLPD to ADRLRM
-
-Improvements
-
* DLT viewer:
* Support for non-verbose mode (as FIBEX plugin)
-
* DLT library:
* Support for non-verbose mode (as FIBEX plugin)
* dlt_message_print_* functions added
* Semaphore calls added to enable multi-threading
* Changed injection interface from direct usage to callback
-
* Requested log level and trace status is set immediately
in dlt_set_application_ll_ts_limit()
* Implemented receiver thread in DLT library
(used for setting of log level/trace status and for injection handling)
* Added signal-handler and atexit-handler for cleanup (calls dlt_free())
-
* General:
* Added implementation of clientlib and testclient for Windows
* Both adaptors sends now log messages with log level DLT_LOG_INFO
* Multi-threading example in src/tests/dlt-test-user-multi added
-
-Bugfixes:
* DLT viewer: Right mouse button for loading plugin descriptions (MOST-/Fibex-XML File)
is now working (also in Windows)
* DLT library: Fixed bug in dlt_print_mixed_string()
@@ -349,9 +274,7 @@ Bugfixes:
* Added -lrt to package config file
* Resolved dependency from dlt_client.h to dlt_common.h -> dlt_common.h is now public
-2.0.3:
-
-Improvements
+2.0.3
* DLT viewer:
* Reduced load if idle
@@ -378,9 +301,6 @@ Improvements
* Tested and improved MOST plugin
* Support for float (32 Bit) and double (64 Bit) values
* Code fragments for winclientlib and wintestclient added
-
-Bugfixes
-
* DLT library: Fixed bug in DLT_IMPORT_CONTEXT
* DLT library: Fixed bug in dlt_plugin_print() and dlt_most_payload()
* DLT daemon and library: Fixed bug in handling of description strings
@@ -388,10 +308,8 @@ Bugfixes
* General: Fixed parsing and printing of MOST messages
* Several small bugs fixed
-2.0.2:
+2.0.2
-Improvements
-
* DLT viewer:
* Showing timestamp
* Compiles now with MS Visual C++
@@ -413,11 +331,6 @@ Improvements
* Support for timestamp in standardheader extras added
* Support for ECU ID in standardheader extras added;
this value can be overwritten by the DLT daemon
-
-(*) = feature not enabled in binary build
-
-Bugfixes
-
* DLT viewer:
* Store and load application and context description fixed
* Fixed crash on termination of Windows version
@@ -428,60 +341,13 @@ Bugfixes
* Fixed writing and reading of locally created dlt files
* Several smaller bugs fixed
-2.0.1:
+2.0.1
-Improvements
-
* Full support for serial connection between DLT daemon and DLT Viewer
-
-Bugfixes
-
* Several small bugs fixed in DLT Viewer
-
-2.0.0:
-
-Improvments
+2.0.0
* Initial Release of new DLT daemon Version 2 including the new DLT Client DLT Viewer
-
-Bug fixes
-
* Initial Release
-
-Known issues in this release
-----------------------------
-
- * DLT library: Usage of dlt_user_log_write_float64() and DLT_FLOAT64() leads
- to "Illegal instruction (core dumped)" on ARM target.
- * DLT library: Nested calls to DLT_LOG_ ... are not supported, and will lead to a deadlock.
-
-
-API Documentation:
-------------------
-
- * GENIVI_UserManual_DLT_Daemon.odt
- API Documentaion and Programming HowTo
- * Doxygen documentation, can be created with "make doxygen", will then be located at
- doc/html/index.htm, or doc/rtf/refman.rtf
-
-Other Documents
-----------------
-
- * GENIVI_UserManual_DLT_Client.odt
- User Manual for DLT programs
- * GENIVI_Specification_DLT_Daemon.odt
- Internals of DLT daemon and DLT library
-
-Notes
------
-
- * Moved to cmake build process
-
-Software/Hardware
------------------
-
- * Developped with:
- * Ubuntu Linux 9.10 32-bit / Intel PC
-
diff --git a/doc/create_doc.sh b/doc/create_doc.sh
new file mode 100755
index 0000000..a360e2d
--- /dev/null
+++ b/doc/create_doc.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+asciidoc -a toc2 dlt_user_manual.txt
+asciidoc -a toc2 dlt_design_specification.txt
+asciidoc -a toc2 dlt_cheatsheet.txt
+
+asciidoc -a toc2 dlt-daemon.1.txt
+a2x --doctype manpage --format manpage dlt-daemon.1.txt
+asciidoc -a toc2 dlt.conf.5.txt
+a2x --doctype manpage --format manpage dlt.conf.5.txt
+asciidoc -a toc2 dlt-convert.1.txt
+a2x --doctype manpage --format manpage dlt-convert.1.txt
+asciidoc -a toc2 dlt-receive.1.txt
+a2x --doctype manpage --format manpage dlt-receive.1.txt
+asciidoc -a toc2 dlt-system.1.txt
+a2x --doctype manpage --format manpage dlt-system.1.txt
+asciidoc -a toc2 dlt-system.conf.5.txt
+a2x --doctype manpage --format manpage dlt-system.conf.5.txt
+
+asciidoc -a toc2 dlt_book.txt
+
+cd ..
+
+asciidoc -a toc2 README.txt
+asciidoc -a toc2 INSTALL.txt
+asciidoc -a toc2 ReleaseNotes.txt
+
diff --git a/doc/dlt-convert.1 b/doc/dlt-convert.1
index aceb3fc..4272845 100644
--- a/doc/dlt-convert.1
+++ b/doc/dlt-convert.1
@@ -1,68 +1,136 @@
-.TH dlt-convert 1 "April 13, 2012" "version 2.9.0" "USER COMMANDS"
-.SH NAME
+'\" t
+.\" Title: dlt-convert
+.\" Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
+.\" Date: 10/11/2012
+.\" Manual: \ \&
+.\" Source: \ \&
+.\" Language: English
+.\"
+.TH "DLT\-CONVERT" "1" "10/11/2012" "\ \&" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
dlt-convert \- Convert DLT Logging files into ASCII
-.SH SYNOPSIS
-.B dlt-convert
-[\-h] [\-a] [\-x] [\-m] [\-s][\-o filename] [\-v] [\-c] [\-b number]
-[\-e number] [\-w] file1 [file2] [file3]
-.SH DESCRIPTION
-Read DLT files, print DLT messages as ASCII and store the messages again.
-Use Ranges and Output file to cut DLT files.
-Use two files and Output file to join DLT files.
-.SH OPTIONS
-.TP
-\-h
-Display a short help text.
-.TP
-\-a
-Print DLT file; payload as ASCII.
-.TP
-\-x
-Print DLT file; payload as hex.
-.TP
-\-m
-Print DLT file; payload as hex and ASCII.
-.TP
-\-s
-Print DLT file; only headers.
-.TP
-\-o
-Output messages in new DLT file.
-.TP
-\-v
-Verbose mode.
-.TP
-\-c
-Count number of messages.
-.TP
-\-b
-First messages to be handled.
-.TP
-\-e
-Last message to be handled.
-.TP
-\-w
-Follow dlt file while file is increasing.
-.SH EXAMPLES
-.TP
-Convert DLT file into ASCII:
-.B dlt-convert
-\-a mylog.dlt
-.PP
-.TP
-Cut a specific range, e.g. from message 1 to message 3 from a file called log.dlt and store the result to a file called newlog.dlt:
-.B dlt-convert
-\-b 1 -e 3 -o newlog.dlt log.dlt
-.PP
-.TP
-Paste two dlt files log1.dlt and log2.dlt to a new file called newlog.dlt:
-.B dlt-convert
-\-o newlog.dlt log1.dlt log2.dlt
-.PP
-.SH EXIT STATUS
-Non zero is returned in case of failure.
-.SH AUTHOR
-Alexander Wenzel (alexander.aw.wenzel (at) bmw.de)
-.SH SEE ALSO
-dlt-daemon(1)
+.SH "SYNOPSIS"
+.sp
+\fBdlt\-convert\fR [\-h] [\-a] [\-x] [\-m] [\-s][\-o filename] [\-v] [\-c] [\-b number] [\-e number] [\-w] file1 [file2] [file3]
+.SH "DESCRIPTION"
+.sp
+Read DLT files, print DLT messages as ASCII and store the messages again\&. Use Ranges and Output file to cut DLT files\&. Use two files and Output file to join DLT files\&.
+.SH "OPTIONS"
+.PP
+\fB\-h\fR
+.RS 4
+Display a short help text\&.
+.RE
+.PP
+\fB\-a\fR
+.RS 4
+Print DLT file; payload as ASCII\&.
+.RE
+.PP
+\fB\-x\fR
+.RS 4
+Print DLT file; payload as hex\&.
+.RE
+.PP
+\fB\-m\fR
+.RS 4
+Print DLT file; payload as hex and ASCII\&.
+.RE
+.PP
+\fB\-s\fR
+.RS 4
+Print DLT file; only headers\&.
+.RE
+.PP
+\fB\-o\fR
+.RS 4
+Output messages in new DLT file\&.
+.RE
+.PP
+\fB\-v\fR
+.RS 4
+Verbose mode\&.
+.RE
+.PP
+\fB\-c\fR
+.RS 4
+Count number of messages\&.
+.RE
+.PP
+\fB\-b\fR
+.RS 4
+First messages to be handled\&.
+.RE
+.PP
+\fB\-e\fR
+.RS 4
+Last message to be handled\&.
+.RE
+.PP
+\fB\-w\fR
+.RS 4
+Follow dlt file while file is increasing\&.
+.RE
+.SH "EXAMPLES"
+.PP
+Start DLT daemon in background mode
+.RS 4
+
+\fBdlt\-daemon \-d\fR
+.RE
+.PP
+Start DLT daemon with own configuration
+.RS 4
+
+\fBdlt\-daemon \-c ~/my\-dlt\-configuration\&.cfg\fR
+.RE
+.PP
+Convert DLT file into ASCII
+.RS 4
+
+\fBdlt\-convert \-a mylog\&.dlt\fR
+.RE
+.PP
+Cut a specific range, e\&.g\&. from message 1 to message 3 from a file called log\&.dlt and store the result to a file called newlog\&.dlt
+.RS 4
+
+\fBdlt\-convert \-b 1 \-e 3 \-o newlog\&.dlt log\&.dlt\fR
+.RE
+.PP
+Paste two dlt files log1\&.dlt and log2\&.dlt to a new file called newlog\&.dlt
+.RS 4
+\fBdlt\-convert \-o newlog\&.dlt log1\&.dlt log2\&.dlt\fR
+.RE
+.SH "EXIT STATUS"
+.sp
+Non zero is returned in case of failure\&.
+.SH "AUTHOR"
+.sp
+Alexander Wenzel (alexander\&.aw\&.wenzel (at) bmw\&.de)
+.SH "RESOURCES"
+.sp
+Main web site: http://projects\&.genivi\&.org/diagnostic\-log\-trace Mailinglist: https://lists\&.genivi\&.org/mailman/listinfo/genivi\-diagnostic\-log\-and\-trace
+.SH "SEE ALSO"
+.sp
+dlt\-daemon(1)
diff --git a/doc/dlt-convert.1.txt b/doc/dlt-convert.1.txt
new file mode 100644
index 0000000..37d4886
--- /dev/null
+++ b/doc/dlt-convert.1.txt
@@ -0,0 +1,87 @@
+DLT-CONVERT(1)
+=============
+:doctype: manpage
+
+NAME
+----
+dlt-convert - Convert DLT Logging files into ASCII
+
+SYNOPSIS
+--------
+*dlt-convert* [-h] [-a] [-x] [-m] [-s][-o filename] [-v] [-c] [-b number] [-e number] [-w] file1 [file2] [file3]
+
+DESCRIPTION
+-----------
+Read DLT files, print DLT messages as ASCII and store the messages again.
+Use Ranges and Output file to cut DLT files.
+Use two files and Output file to join DLT files.
+
+OPTIONS
+-------
+*-h*::
+ Display a short help text.
+
+*-a*::
+ Print DLT file; payload as ASCII.
+
+*-x*::
+ Print DLT file; payload as hex.
+
+*-m*::
+ Print DLT file; payload as hex and ASCII.
+
+*-s*::
+ Print DLT file; only headers.
+
+*-o*::
+ Output messages in new DLT file.
+
+*-v*::
+ Verbose mode.
+
+*-c*::
+ Count number of messages.
+
+*-b*::
+ First messages to be handled.
+
+*-e*::
+ Last message to be handled.
+
+*-w*::
+ Follow dlt file while file is increasing.
+
+EXAMPLES
+--------
+Start DLT daemon in background mode::
+ *dlt-daemon -d*
+
+Start DLT daemon with own configuration::
+ *dlt-daemon -c ~/my-dlt-configuration.cfg*
+
+Convert DLT file into ASCII::
+ *dlt-convert -a mylog.dlt*
+
+Cut a specific range, e.g. from message 1 to message 3 from a file called log.dlt and store the result to a file called newlog.dlt::
+ *dlt-convert -b 1 -e 3 -o newlog.dlt log.dlt*
+
+Paste two dlt files log1.dlt and log2.dlt to a new file called newlog.dlt::
+ *dlt-convert -o newlog.dlt log1.dlt log2.dlt*
+
+EXIT STATUS
+-----------
+Non zero is returned in case of failure.
+
+AUTHOR
+------
+Alexander Wenzel (alexander.aw.wenzel (at) bmw.de)
+
+RESOURCES
+---------
+Main web site: <http://projects.genivi.org/diagnostic-log-trace> +
+Mailinglist: <https://lists.genivi.org/mailman/listinfo/genivi-diagnostic-log-and-trace>
+
+SEE ALSO
+--------
+dlt-daemon(1)
+
diff --git a/doc/dlt-daemon.1 b/doc/dlt-daemon.1
index 8a955a7..7ffc60a 100644
--- a/doc/dlt-daemon.1
+++ b/doc/dlt-daemon.1
@@ -1,43 +1,78 @@
-.TH dlt-daemon 1 "April 13, 2012" "version 2.9.0" "USER COMMANDS"
-.SH NAME
+'\" t
+.\" Title: dlt-daemon
+.\" Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
+.\" Date: 10/11/2012
+.\" Manual: \ \&
+.\" Source: \ \&
+.\" Language: English
+.\"
+.TH "DLT\-DAEMON" "1" "10/11/2012" "\ \&" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
dlt-daemon \- DLT daemon for logging and tracing purpose
-.SH SYNOPSIS
-.B dlt-daemon
-[\-h] [\-d] [\-c filename]
-.SH DESCRIPTION
-The DLT daemon is the central place where logs and traces are gathered
-from different applications, stored temporarily or permanently and
-transferred to a DLT client application, which can run directly on the
-GENIVI system or more likely on a external tester device.
+.SH "SYNOPSIS"
+.sp
+\fBdlt\-daemon\fR [\-h] [\-d] [\-c filename]
+.SH "DESCRIPTION"
+.sp
+The DLT daemon is the central place where logs and traces are gathered from different applications, stored temporarily or permanently and transferred to a DLT client application, which can run directly on the GENIVI system or more likely on a external tester device\&.
+.SH "OPTIONS"
.PP
-dlt-daemon loads by default the configuration file /etc/dlt.conf.
-See dlt.conf(1).
-.SH OPTIONS
-.TP
-\-h
-Display a short help text.
-.TP
-\-d
-Daemonize, needed in System V init systems.
-.TP
-\-c
-Load an alternative configuration file. By default the configuration
-file /etc/dlt.conf is loaded.
-.SH EXAMPLES
-.TP
-Start DLT daemon in background mode:
-.B dlt-daemon
-\-d
+\fB\-h\fR
+.RS 4
+Display a short help text\&.
+.RE
.PP
-.TP
-Start DLT daemon with own configuration:
-.B dlt-daemon
-\-c ~/my-dlt-configuration.cfg
+\fB\-d\fR
+.RS 4
+Daemonize, needed in System V init systems\&.
+.RE
.PP
-.SH EXIT STATUS
-Non zero is returned in case of failure.
-.SH AUTHOR
-Alexander Wenzel (alexander.aw.wenzel (at) bmw.de)
-.SH SEE ALSO
-dlt.conf(5)
-dlt-system(1)
+\fB\-c\fR
+.RS 4
+Load an alternative configuration file\&. By default the configuration file /etc/dlt\&.conf is loaded\&.
+.RE
+.SH "EXAMPLES"
+.PP
+Start DLT daemon in background mode
+.RS 4
+
+\fBdlt\-daemon \-d\fR
+.RE
+.PP
+Start DLT daemon with own configuration
+.RS 4
+
+\fBdlt\-daemon \-c ~/my\-dlt\-configuration\&.cfg\fR
+.RE
+.SH "EXIT STATUS"
+.sp
+Non zero is returned in case of failure\&.
+.SH "AUTHOR"
+.sp
+Alexander Wenzel (alexander\&.aw\&.wenzel (at) bmw\&.de)
+.SH "RESOURCES"
+.sp
+Main web site: http://projects\&.genivi\&.org/diagnostic\-log\-trace Mailinglist: https://lists\&.genivi\&.org/mailman/listinfo/genivi\-diagnostic\-log\-and\-trace
+.SH "SEE ALSO"
+.sp
+dlt\&.conf(5) dlt\-system(1)
diff --git a/doc/dlt-daemon.1.txt b/doc/dlt-daemon.1.txt
new file mode 100644
index 0000000..69159a7
--- /dev/null
+++ b/doc/dlt-daemon.1.txt
@@ -0,0 +1,59 @@
+DLT-DAEMON(1)
+=============
+:doctype: manpage
+
+NAME
+----
+dlt-daemon - DLT daemon for logging and tracing purpose
+
+SYNOPSIS
+--------
+*dlt-daemon* [-h] [-d] [-c filename]
+
+DESCRIPTION
+-----------
+The DLT daemon is the central place where logs and traces are gathered
+from different applications, stored temporarily or permanently and
+transferred to a DLT client application, which can run directly on the
+GENIVI system or more likely on a external tester device.
+
+OPTIONS
+-------
+*-h*::
+ Display a short help text.
+
+*-d*::
+ Daemonize, needed in System V init systems.
+
+*-c*::
+ Load an alternative configuration file. By default the configuration
+ file /etc/dlt.conf is loaded.
+
+EXAMPLES
+--------
+Start DLT daemon in background mode::
+*dlt-daemon -d*
+
+Start DLT daemon with own configuration::
+*dlt-daemon -c ~/my-dlt-configuration.cfg*
+
+EXIT STATUS
+-----------
+Non zero is returned in case of failure.
+
+AUTHOR
+------
+Alexander Wenzel (alexander.aw.wenzel (at) bmw.de)
+
+RESOURCES
+---------
+Main web site: <http://projects.genivi.org/diagnostic-log-trace> +
+Mailinglist: <https://lists.genivi.org/mailman/listinfo/genivi-diagnostic-log-and-trace>
+
+SEE ALSO
+--------
+dlt.conf(5) +
+dlt-system(1)
+
+
+
diff --git a/doc/dlt-receive.1 b/doc/dlt-receive.1
index b3eff48..0c150a0 100644
--- a/doc/dlt-receive.1
+++ b/doc/dlt-receive.1
@@ -1,62 +1,116 @@
-.TH dlt-receive 1 "April 13, 2012" "version 2.9.0" "USER COMMANDS"
-.SH NAME
+'\" t
+.\" Title: dlt-receive
+.\" Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
+.\" Date: 10/11/2012
+.\" Manual: \ \&
+.\" Source: \ \&
+.\" Language: English
+.\"
+.TH "DLT\-RECEIVE" "1" "10/11/2012" "\ \&" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
dlt-receive \- Console based client for DLT Logging
-.SH SYNOPSIS
-.B dlt-receive
-[\-h] [\-a] [\-x] [\-m] [\-s][\-o filename] [\-v] [\-y]
-[\-b baudrate] [\-e ecuid]hostname/serial_device_name
-.SH DESCRIPTION
-Receive DLT messages from DLT daemon and print or store the messages.
-.SH OPTIONS
-.TP
-\-h
-Display a short help text.
-.TP
-\-a
-Print DLT file; payload as ASCII.
-.TP
-\-x
-Print DLT file; payload as hex.
-.TP
-\-m
-Print DLT file; payload as hex and ASCII.
-.TP
-\-s
-Print DLT file; only headers.
-.TP
-\-o
-Output messages in new DLT file.
-.TP
-\-v
-Verbose mode.
-.TP
-\-y
-Serial device mode.
-.TP
-\-b
-Serial device baudrate (Default: 115200).
-.TP
-\-e
-Set ECU ID (Default: RECV).
-.SH EXAMPLES
-.TP
-Print received message headers received from a dlt-daemon running on localhost:
-.B dlt-receive
-\-s localhost
-.PP
-.TP
-Print received message headers received from a serila interface:
-.B dlt-receive
-\-s -y /dev/ttySO
-.PP
-.TP
-Store received message headers from a dlt-daemon to a log file called log.dlt and filter them for e.g. Application ID ABCD and Context ID EFGH (Write:ABCD EFGH as single line to a file claled filter.txt):
-.B dlt-receive
-\-s -o log.dlt -f filter.txt localhost
-.PP
-.SH EXIT STATUS
-Non zero is returned in case of failure.
-.SH AUTHOR
-Alexander Wenzel (alexander.aw.wenzel (at) bmw.de)
-.SH SEE ALSO
-dlt-daemon(1)
+.SH "SYNOPSIS"
+.sp
+\fBdlt\-receive\fR [\-h] [\-a] [\-x] [\-m] [\-s][\-o filename] [\-v] [\-y] [\-b baudrate] [\-e ecuid]hostname/serial_device_name
+.SH "DESCRIPTION"
+.sp
+Receive DLT messages from DLT daemon and print or store the messages\&.
+.SH "OPTIONS"
+.PP
+\fB\-h\fR
+.RS 4
+Display a short help text\&.
+.RE
+.PP
+\fB\-a\fR
+.RS 4
+Print DLT file; payload as ASCII\&.
+.RE
+.PP
+\fB\-x\fR
+.RS 4
+Print DLT file; payload as hex\&.
+.RE
+.PP
+\fB\-m\fR
+.RS 4
+Print DLT file; payload as hex and ASCII\&.
+.RE
+.PP
+\fB\-s\fR
+.RS 4
+Print DLT file; only headers\&.
+.RE
+.PP
+\fB\-o\fR
+.RS 4
+Output messages in new DLT file\&.
+.RE
+.PP
+\fB\-v\fR
+.RS 4
+Verbose mode\&.
+.RE
+.PP
+\fB\-y\fR
+.RS 4
+Serial device mode\&.
+.RE
+.PP
+\fB\-b\fR
+.RS 4
+Serial device baudrate (Default: 115200)\&.
+.RE
+.PP
+\fB\-e\fR
+.RS 4
+Set ECU ID (Default: RECV)\&.
+.RE
+.SH "EXAMPLES"
+.PP
+Print received message headers received from a dlt\-daemon running on localhost
+.RS 4
+dlt\-receive \-s localhost
+.RE
+.PP
+Print received message headers received from a serila interface
+.RS 4
+dlt\-receive \-s \-y /dev/ttySO
+.RE
+.PP
+Store received message headers from a dlt\-daemon to a log file called log\&.dlt and filter them for e\&.g\&. Application ID ABCD and Context ID EFGH (Write:ABCD EFGH as single line to a file claled filter\&.txt)
+.RS 4
+dlt\-receive \-s \-o log\&.dlt \-f filter\&.txt localhost
+.RE
+.SH "EXIT STATUS"
+.sp
+Non zero is returned in case of failure\&.
+.SH "AUTHOR"
+.sp
+Alexander Wenzel (alexander\&.aw\&.wenzel (at) bmw\&.de)
+.SH "RESOURCES"
+.sp
+Main web site: http://projects\&.genivi\&.org/diagnostic\-log\-trace Mailinglist: https://lists\&.genivi\&.org/mailman/listinfo/genivi\-diagnostic\-log\-and\-trace
+.SH "SEE ALSO"
+.sp
+dlt\-daemon(1)
diff --git a/doc/dlt-receive.1.txt b/doc/dlt-receive.1.txt
new file mode 100644
index 0000000..440ac2b
--- /dev/null
+++ b/doc/dlt-receive.1.txt
@@ -0,0 +1,75 @@
+DLT-RECEIVE(1)
+==============
+:doctype: manpage
+
+NAME
+----
+dlt-receive - Console based client for DLT Logging
+
+SYNOPSIS
+--------
+*dlt-receive* [-h] [-a] [-x] [-m] [-s][-o filename] [-v] [-y] [-b baudrate] [-e ecuid]hostname/serial_device_name
+
+DESCRIPTION
+-----------
+Receive DLT messages from DLT daemon and print or store the messages.
+
+OPTIONS
+-------
+*-h*::
+ Display a short help text.
+
+*-a*::
+ Print DLT file; payload as ASCII.
+
+*-x*::
+Print DLT file; payload as hex.
+
+*-m*::
+Print DLT file; payload as hex and ASCII.
+
+*-s*::
+Print DLT file; only headers.
+
+*-o*::
+Output messages in new DLT file.
+
+*-v*::
+Verbose mode.
+
+*-y*::
+Serial device mode.
+
+*-b*::
+Serial device baudrate (Default: 115200).
+
+*-e*::
+Set ECU ID (Default: RECV).
+
+EXAMPLES
+--------
+Print received message headers received from a dlt-daemon running on localhost::
+ dlt-receive -s localhost
+
+Print received message headers received from a serila interface::
+ dlt-receive -s -y /dev/ttySO
+
+Store received message headers from a dlt-daemon to a log file called log.dlt and filter them for e.g. Application ID ABCD and Context ID EFGH (Write:ABCD EFGH as single line to a file claled filter.txt)::
+ dlt-receive -s -o log.dlt -f filter.txt localhost
+
+EXIT STATUS
+-----------
+Non zero is returned in case of failure.
+
+AUTHOR
+------
+Alexander Wenzel (alexander.aw.wenzel (at) bmw.de)
+
+RESOURCES
+---------
+Main web site: <http://projects.genivi.org/diagnostic-log-trace> +
+Mailinglist: <https://lists.genivi.org/mailman/listinfo/genivi-diagnostic-log-and-trace>
+
+SEE ALSO
+--------
+dlt-daemon(1)
diff --git a/doc/dlt-system.1 b/doc/dlt-system.1
index 582404e..00997ea 100644
--- a/doc/dlt-system.1
+++ b/doc/dlt-system.1
@@ -1,37 +1,68 @@
-.TH dlt-system 1 "April 13, 2012" "version 2.9.0" "USER COMMANDS"
-.SH NAME
+'\" t
+.\" Title: dlt-system
+.\" Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
+.\" Date: 10/11/2012
+.\" Manual: \ \&
+.\" Source: \ \&
+.\" Language: English
+.\"
+.TH "DLT\-SYSTEM" "1" "10/11/2012" "\ \&" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
dlt-system \- DLT system logging process
-.SH SYNOPSIS
-.B dlt-system
-[\-h] [\-c filename]
-.SH DESCRIPTION
-The DLT system logging process is the central application, which logs
-system information from the platform. It provides the features
-filetransfer, syslog adapater, logging of any kind of files and
-procfilesystem logger. The individual features can be enabled and
-disabled in the configuration file.
+.SH "SYNOPSIS"
+.sp
+\fBdlt\-system\fR [\-h] [\-c filename]
+.SH "DESCRIPTION"
+.sp
+The DLT system logging process is the central application, which logs system information from the platform\&. It provides the features filetransfer, syslog adapater, logging of any kind of files and procfilesystem logger\&. The individual features can be enabled and disabled in the configuration file\&.
+.sp
+dlt\-system loads by default the configuration file /etc/dlt\-system\&.conf\&. See dlt\-system\&.conf(1)\&.
+.SH "OPTIONS"
.PP
-dlt-system loads by default the configuration file /etc/dlt-system.conf.
-See dlt-system.conf(1).
-.SH OPTIONS
-.TP
-\-h
-Display a short help text.
-.TP
-\-c
-Load an alternative configuration file. By default the configuration
-file /etc/dlt.conf is loaded.
-.SH EXAMPLES
-.TP
-Start DLT system with own configuration:
-.B dlt-system
-\-c ~/my-configuration.cfg \-v
+\fB\-h\fR
+.RS 4
+Display a short help text\&.
+.RE
.PP
-.SH EXIT STATUS
-Non zero is returned in case of failure.
-.SH AUTHOR
-Alexander Wenzel (alexander.aw.wenzel (at) bmw.de)
-.SH SEE ALSO
-dlt-system.conf(5)
-dlt-daemon(1)
-
+\fB\-c\fR
+.RS 4
+Load an alternative configuration file\&. By default the configuration file /etc/dlt\&.conf is loaded\&.
+.RE
+.SH "EXAMPLES"
+.PP
+Start DLT system with own configuration
+.RS 4
+dlt\-system \-c ~/my\-configuration\&.cfg \-v
+.RE
+.SH "EXIT STATUS"
+.sp
+Non zero is returned in case of failure\&.
+.SH "AUTHOR"
+.sp
+Alexander Wenzel (alexander\&.aw\&.wenzel (at) bmw\&.de)
+.SH "RESOURCES"
+.sp
+Main web site: http://projects\&.genivi\&.org/diagnostic\-log\-trace Mailinglist: https://lists\&.genivi\&.org/mailman/listinfo/genivi\-diagnostic\-log\-and\-trace
+.SH "SEE ALSO"
+.sp
+dlt\-system\&.conf(5) dlt\-daemon(1)
diff --git a/doc/dlt-system.1.txt b/doc/dlt-system.1.txt
new file mode 100644
index 0000000..81d8033
--- /dev/null
+++ b/doc/dlt-system.1.txt
@@ -0,0 +1,56 @@
+DLT-SYSTEM(1)
+==============
+:doctype: manpage
+
+NAME
+----
+dlt-system - DLT system logging process
+
+SYNOPSIS
+--------
+*dlt-system* [-h] [-c filename]
+
+DESCRIPTION
+-----------
+The DLT system logging process is the central application, which logs
+system information from the platform. It provides the features
+filetransfer, syslog adapater, logging of any kind of files and
+procfilesystem logger. The individual features can be enabled and
+disabled in the configuration file.
+
+dlt-system loads by default the configuration file /etc/dlt-system.conf.
+See dlt-system.conf(1).
+
+OPTIONS
+-------
+*-h*::
+ Display a short help text.
+
+*-c*::
+ Load an alternative configuration file. By default the configuration
+ file /etc/dlt.conf is loaded.
+
+EXAMPLES
+--------
+Start DLT system with own configuration::
+ dlt-system -c ~/my-configuration.cfg -v
+
+EXIT STATUS
+-----------
+Non zero is returned in case of failure.
+
+AUTHOR
+------
+Alexander Wenzel (alexander.aw.wenzel (at) bmw.de)
+
+RESOURCES
+---------
+Main web site: <http://projects.genivi.org/diagnostic-log-trace> +
+Mailinglist: <https://lists.genivi.org/mailman/listinfo/genivi-diagnostic-log-and-trace>
+
+SEE ALSO
+--------
+dlt-system.conf(5) +
+dlt-daemon(1)
+
+
diff --git a/doc/dlt-system.conf.5 b/doc/dlt-system.conf.5
index 2515ee1..debf6ac 100644
--- a/doc/dlt-system.conf.5
+++ b/doc/dlt-system.conf.5
@@ -1,156 +1,352 @@
-.TH dlt-system.conf 5 "April 13, 2012" "version 2.9.0" "USER COMMANDS"
-.SH NAME
+'\" t
+.\" Title: dlt-system.conf
+.\" Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
+.\" Date: 10/11/2012
+.\" Manual: \ \&
+.\" Source: \ \&
+.\" Language: English
+.\"
+.TH "DLT\-SYSTEM\&.CONF" "5" "10/11/2012" "\ \&" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
dlt-system.conf \- DLT system process configuration file
-.SH DESCRIPTION
-The DLT system logging process is the central application, which logs
-system information from the platform. It provides the features
-filetransfer, syslog adapater, logging of any kind of files and
-procfilesystem logger. The individual features can be enabled and
-disabled in the configuration file.
-.PP
-The configuration file dlt-system.conf allows to configure the different
-runtime behaviour of dlt-system. The configuration file is loaded
-during startup of dlt-system.
-.PP
-dlt-system loads by default the configuration file /etc/dlt-system.conf.
-An alternative configuration file can be loaded with the option \-c.
-.SH GENERAL OPTIONS
-.TP
-.B ApplicationId
-The application Id used for the dlt-system process.
-.IP
+.SH "DESCRIPTION"
+.sp
+The DLT system logging process is the central application, which logs system information from the platform\&. It provides the features filetransfer, syslog adapater, logging of any kind of files and procfilesystem logger\&. The individual features can be enabled and disabled in the configuration file\&.
+.sp
+The configuration file dlt\-system\&.conf allows to configure the different runtime behaviour of dlt\-system\&. The configuration file is loaded during startup of dlt\-system\&.
+.sp
+dlt\-system loads by default the configuration file /etc/dlt\-system\&.conf\&. An alternative configuration file can be loaded with the option \-c\&.
+.SH "GENERAL OPTIONS"
+.PP
+\fBApplicationId\fR
+.RS 4
+The application Id used for the dlt\-system process\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: SYS
-.SH SYSLOG ADAPTER OPTIONS
-.TP
-.B SyslogEnable
-If this option is set to 1, the syslog adapter feature is enabled.
-.IP
-Default: 0.
-.TP
-.B SyslogContextId
-This value defines context id of the syslog adapter.
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.SH "SYSLOG ADAPTER OPTIONS"
+.PP
+\fBSyslogEnable\fR
+.RS 4
+If this option is set to 1, the syslog adapter feature is enabled\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+Default: 0\&.
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBSyslogContextId\fR
+.RS 4
+This value defines context id of the syslog adapter\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: SYSL
-.TP
-.B SyslogPort
-This value defines the UDP port opened for receiving log messages from
-syslog.
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBSyslogPort\fR
+.RS 4
+This value defines the UDP port opened for receiving log messages from syslog\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: 47111
-.SH FILETRANSFER OPTIONS
-.TP
-.B FiletransferEnable
-If this option is set to 1, the filetransfer feature is enabled.
-.IP
-Default: 0.
-.TP
-.B FiletransferContextId
-The Context Id of the filetransfer.
-.IP
-Default: File.
-.TP
-.B FiletransferTimeStartup
-Time in seconds after startup of dlt-system when first file is transfered.
-.IP
-Default: 30.
-.TP
-.B FiletransferTimeoutBetweenLogs
-Time in ms seconds to wait between two file transfer logs of a single file to DLT.
-.IP
-Default: 10.
-.TP
-.B FiletransferTempDir
-Temporary directory to use. File transfer will move a file to this directory while it is being compressed and sent.
-.IP
-Default: /tmp.
-.TP
-.B FiletransferDirectory
-You can define multiple file transfer directories Define the directory to watch, whether to compress the file with zlib and the zlib compression level For parsing purposes, FiletransferCompressionLevel must be the last one of three values..
-.IP
-Default: /var/dlt/ft1.
-.TP
-.B FiletransferCompression
-You can define multiple file transfer directories. Define the directory to watch, whether to compress the file with zlib and the zlib compression level For parsing purposes, FiletransferCompressionLevel must be the last one of three values..
-.IP
-Default: 0.
-.TP
-.B FiletransferCompressionLevel
-You can define multiple file transfer directories Define the directory to watch, whether to compress the file with zlib and the zlib compression level For parsing purposes, FiletransferCompressionLevel must be the last one of three values..
-.IP
-Default: 5.
-.TP
-.B FiletransferTimeStartup
-This value defines the amount of time in seconds after start of
-dlt-system, when dlt-system starts to send the first file.
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.SH "FILETRANSFER OPTIONS"
+.PP
+\fBFiletransferEnable\fR
+.RS 4
+If this option is set to 1, the filetransfer feature is enabled\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+Default: 0\&.
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBFiletransferContextId\fR
+.RS 4
+The Context Id of the filetransfer\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+Default: File\&.
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBFiletransferTimeStartup\fR
+.RS 4
+Time in seconds after startup of dlt\-system when first file is transfered\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+Default: 30\&.
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBFiletransferTimeoutBetweenLogs\fR
+.RS 4
+Time in ms seconds to wait between two file transfer logs of a single file to DLT\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+Default: 10\&.
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBFiletransferTempDir\fR
+.RS 4
+Temporary directory to use\&. File transfer will move a file to this directory while it is being compressed and sent\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+Default: /tmp\&.
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBFiletransferDirectory\fR
+.RS 4
+You can define multiple file transfer directories Define the directory to watch, whether to compress the file with zlib and the zlib compression level For parsing purposes, FiletransferCompressionLevel must be the last one of three values\&.\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+Default: /var/dlt/ft1\&.
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBFiletransferCompression\fR
+.RS 4
+You can define multiple file transfer directories\&. Define the directory to watch, whether to compress the file with zlib and the zlib compression level For parsing purposes, FiletransferCompressionLevel must be the last one of three values\&.\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+Default: 0\&.
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBFiletransferCompressionLevel\fR
+.RS 4
+You can define multiple file transfer directories Define the directory to watch, whether to compress the file with zlib and the zlib compression level For parsing purposes, FiletransferCompressionLevel must be the last one of three values\&.\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+Default: 5\&.
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBFiletransferTimeStartup\fR
+.RS 4
+This value defines the amount of time in seconds after start of dlt\-system, when dlt\-system starts to send the first file\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: 30
-.TP
-.B FiletransferTimeDelay
-This value defines the amount of time after which a sent file is deleted
-and the next file is strated to be transmitted.
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBFiletransferTimeDelay\fR
+.RS 4
+This value defines the amount of time after which a sent file is deleted and the next file is strated to be transmitted\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: 10
-.TP
-.B FiletransferTimeoutBetweenLogs
-This value defines the amount of time to wait between two file transfer
-logs of a single file.
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBFiletransferTimeoutBetweenLogs\fR
+.RS 4
+This value defines the amount of time to wait between two file transfer logs of a single file\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: 10
-.SH LOG FILES OPTIONS
-.TP
-.B LogFileEnable
-If this option is set to 1, the log files feature is enabled.
-.IP
-Default: 0.
-.TP
-.B LogFileFilename
-This value sets the full filename path to the file, which should be logged.
-.TP
-.B LogFileMode
-This value the defines in which operation mode this file is logged.
-Possible values are: 0 = off, 1 = startup only, 2 = regular.
-In mode 1 the file is only logged once when dlt-system is started.
-In mode 2 the file is logged regularly every time LogFileTimeDelay timer
-elapses.
-.TP
-.B LogFileTimeDelay
-This value is used in mode 3 and defines the number of seconds, after
-which the defined file is logged.
-.TP
-.B LogFileContextId
-This value defines the context id, which is used for logging the file.
-.SH LOG PROCESSES OPTIONS
-.TP
-.B LogProcessesEnable
-If this option is set to 1, the log processes feature is enabled.
-.IP
-Default: 0.
-.TP
-.B LogProcessesContextId
-This value defines the context id, which is used for logging processes
-files.
-.TP
-.B LogProcessName
-This value defines the name of the process to be logged, as used in the
-file stat of each process.
-If the value is defined as *, all processes are logged.
-.TP
-.B LogProcessFilename
-This value sets the relative filename path to the file, which should be
-logged. The path is relative to the procfilesystem folder of the
-process.
-.TP
-.B LogProcessMode
-This value the defines in which operation mode this process file is
-logged. Possible values are: 0 = off, 1 = startup only, 2 = regular.
-In mode 1 the file is only logged once when dlt-system is started.
-In mode 2 the file is logged regularly every time LogFileTimeDelay timer
-elapses.
-.TP
-.B LogProcessTimeDelay
-This value is used in mode 3 and defines the number of seconds, after
-which the defined procfilesystem file is logged.
-.SH AUTHOR
-Alexander Wenzel (alexander.aw.wenzel (at) bmw.de)
-.SH SEE ALSO
-dlt-system(1)
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.SH "LOG FILES OPTIONS"
+.PP
+\fBLogFileEnable\fR
+.RS 4
+If this option is set to 1, the log files feature is enabled\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+Default: 0\&.
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBLogFileFilename\fR
+.RS 4
+This value sets the full filename path to the file, which should be logged\&.
+.RE
+.PP
+\fBLogFileMode\fR
+.RS 4
+This value the defines in which operation mode this file is logged\&. Possible values are: 0 = off, 1 = startup only, 2 = regular\&. In mode 1 the file is only logged once when dlt\-system is started\&. In mode 2 the file is logged regularly every time LogFileTimeDelay timer elapses\&.
+.RE
+.PP
+\fBLogFileTimeDelay\fR
+.RS 4
+This value is used in mode 3 and defines the number of seconds, after which the defined file is logged\&.
+.RE
+.PP
+\fBLogFileContextId\fR
+.RS 4
+This value defines the context id, which is used for logging the file\&.
+.RE
+.SH "LOG PROCESSES OPTIONS"
+.PP
+\fBLogProcessesEnable\fR
+.RS 4
+If this option is set to 1, the log processes feature is enabled\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+Default: 0\&.
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBLogProcessesContextId\fR
+.RS 4
+This value defines the context id, which is used for logging processes files\&.
+.RE
+.PP
+\fBLogProcessName\fR
+.RS 4
+This value defines the name of the process to be logged, as used in the file stat of each process\&. If the value is defined as *, all processes are logged\&.
+.RE
+.PP
+\fBLogProcessFilename\fR
+.RS 4
+This value sets the relative filename path to the file, which should be logged\&. The path is relative to the procfilesystem folder of the process\&.
+.RE
+.PP
+\fBLogProcessMode\fR
+.RS 4
+This value the defines in which operation mode this process file is logged\&. Possible values are: 0 = off, 1 = startup only, 2 = regular\&. In mode 1 the file is only logged once when dlt\-system is started\&. In mode 2 the file is logged regularly every time LogFileTimeDelay timer elapses\&.
+.RE
+.PP
+\fBLogProcessTimeDelay\fR
+.RS 4
+This value is used in mode 3 and defines the number of seconds, after which the defined procfilesystem file is logged\&.
+.RE
+.SH "AUTHOR"
+.sp
+Alexander Wenzel (alexander\&.aw\&.wenzel (at) bmw\&.de)
+.SH "RESOURCES"
+.sp
+Main web site: http://projects\&.genivi\&.org/diagnostic\-log\-trace Mailinglist: https://lists\&.genivi\&.org/mailman/listinfo/genivi\-diagnostic\-log\-and\-trace
+.SH "SEE ALSO"
+.sp
+dlt\-system(1) dlt\-daemon(1)
diff --git a/doc/dlt-system.conf.5.txt b/doc/dlt-system.conf.5.txt
new file mode 100644
index 0000000..60bed26
--- /dev/null
+++ b/doc/dlt-system.conf.5.txt
@@ -0,0 +1,186 @@
+DLT-SYSTEM.CONF(5)
+==================
+:doctype: manpage
+
+NAME
+----
+dlt-system.conf - DLT system process configuration file
+
+DESCRIPTION
+-----------
+The DLT system logging process is the central application, which logs
+system information from the platform. It provides the features
+filetransfer, syslog adapater, logging of any kind of files and
+procfilesystem logger. The individual features can be enabled and
+disabled in the configuration file.
+
+The configuration file dlt-system.conf allows to configure the different
+runtime behaviour of dlt-system. The configuration file is loaded
+during startup of dlt-system.
+
+dlt-system loads by default the configuration file /etc/dlt-system.conf.
+An alternative configuration file can be loaded with the option -c.
+
+GENERAL OPTIONS
+---------------
+
+*ApplicationId*::
+ The application Id used for the dlt-system process.
+
+ Default: SYS
+
+SYSLOG ADAPTER OPTIONS
+----------------------
+
+*SyslogEnable*::
+ If this option is set to 1, the syslog adapter feature is enabled.
+
+ Default: 0.
+
+*SyslogContextId*::
+ This value defines context id of the syslog adapter.
+
+ Default: SYSL
+
+*SyslogPort*::
+ This value defines the UDP port opened for receiving log messages from
+ syslog.
+
+ Default: 47111
+
+FILETRANSFER OPTIONS
+--------------------
+
+*FiletransferEnable*::
+ If this option is set to 1, the filetransfer feature is enabled.
+
+ Default: 0.
+
+*FiletransferContextId*::
+ The Context Id of the filetransfer.
+
+ Default: File.
+
+*FiletransferTimeStartup*::
+ Time in seconds after startup of dlt-system when first file is transfered.
+
+ Default: 30.
+
+*FiletransferTimeoutBetweenLogs*::
+ Time in ms seconds to wait between two file transfer logs of a single file to DLT.
+
+ Default: 10.
+
+*FiletransferTempDir*::
+ Temporary directory to use. File transfer will move a file to this directory while it is being compressed and sent.
+
+ Default: /tmp.
+
+*FiletransferDirectory*::
+ You can define multiple file transfer directories Define the directory to watch, whether to compress the file with zlib
+ and the zlib compression level For parsing purposes, FiletransferCompressionLevel must be the last one of three values..
+
+ Default: /var/dlt/ft1.
+
+*FiletransferCompression*::
+ You can define multiple file transfer directories. Define the directory to watch, whether to compress the file with zlib
+ and the zlib compression level For parsing purposes, FiletransferCompressionLevel must be the last one of three values..
+
+ Default: 0.
+
+*FiletransferCompressionLevel*::
+ You can define multiple file transfer directories Define the directory to watch, whether to compress the file with zlib
+ and the zlib compression level For parsing purposes, FiletransferCompressionLevel must be the last one of three values..
+
+ Default: 5.
+
+*FiletransferTimeStartup*::
+ This value defines the amount of time in seconds after start of
+ dlt-system, when dlt-system starts to send the first file.
+
+ Default: 30
+
+*FiletransferTimeDelay*::
+ This value defines the amount of time after which a sent file is deleted
+ and the next file is strated to be transmitted.
+
+ Default: 10
+
+*FiletransferTimeoutBetweenLogs*::
+ This value defines the amount of time to wait between two file transfer
+ logs of a single file.
+
+ Default: 10
+
+LOG FILES OPTIONS
+-----------------
+
+*LogFileEnable*::
+ If this option is set to 1, the log files feature is enabled.
+
+ Default: 0.
+
+*LogFileFilename*::
+ This value sets the full filename path to the file, which should be logged.
+
+*LogFileMode*::
+ This value the defines in which operation mode this file is logged.
+ Possible values are: 0 = off, 1 = startup only, 2 = regular.
+ In mode 1 the file is only logged once when dlt-system is started.
+ In mode 2 the file is logged regularly every time LogFileTimeDelay timer
+ elapses.
+
+*LogFileTimeDelay*::
+ This value is used in mode 3 and defines the number of seconds, after
+ which the defined file is logged.
+
+*LogFileContextId*::
+ This value defines the context id, which is used for logging the file.
+
+LOG PROCESSES OPTIONS
+---------------------
+
+*LogProcessesEnable*::
+ If this option is set to 1, the log processes feature is enabled.
+
+ Default: 0.
+
+*LogProcessesContextId*::
+ This value defines the context id, which is used for logging processes
+ files.
+
+*LogProcessName*::
+ This value defines the name of the process to be logged, as used in the
+ file stat of each process.
+ If the value is defined as *, all processes are logged.
+
+*LogProcessFilename*::
+ This value sets the relative filename path to the file, which should be
+ logged. The path is relative to the procfilesystem folder of the
+ process.
+
+*LogProcessMode*::
+ This value the defines in which operation mode this process file is
+ logged. Possible values are: 0 = off, 1 = startup only, 2 = regular.
+ In mode 1 the file is only logged once when dlt-system is started.
+ In mode 2 the file is logged regularly every time LogFileTimeDelay timer
+ elapses.
+
+*LogProcessTimeDelay*::
+ This value is used in mode 3 and defines the number of seconds, after
+ which the defined procfilesystem file is logged.
+
+AUTHOR
+------
+Alexander Wenzel (alexander.aw.wenzel (at) bmw.de)
+
+RESOURCES
+---------
+Main web site: <http://projects.genivi.org/diagnostic-log-trace> +
+Mailinglist: <https://lists.genivi.org/mailman/listinfo/genivi-diagnostic-log-and-trace>
+
+SEE ALSO
+--------
+dlt-system(1) +
+dlt-daemon(1)
+
diff --git a/doc/dlt.conf.5 b/doc/dlt.conf.5
index dbe046d..aa011b4 100644
--- a/doc/dlt.conf.5
+++ b/doc/dlt.conf.5
@@ -1,152 +1,331 @@
-.TH dlt.conf 5 "April 13, 2012" "version 2.8.0 ALPHA" "USER COMMANDS"
-.SH NAME
+'\" t
+.\" Title: dlt.conf
+.\" Author: [see the "AUTHOR" section]
+.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
+.\" Date: 10/11/2012
+.\" Manual: \ \&
+.\" Source: \ \&
+.\" Language: English
+.\"
+.TH "DLT\&.CONF" "5" "10/11/2012" "\ \&" "\ \&"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
dlt.conf \- DLT daemon configuration file
-.SH DESCRIPTION
-The DLT daemon is the central place where logs and traces are gathered
-from different applications, stored temporarily or permanently and
-transferred to a DLT client application, which can run directly on the
-GENIVI system or more likely on a external tester device.
-.PP
-The configuration file dlt.conf allows to configure the different
-runtime behaviour of the dlt-daemon. The configuration file is loaded
-during startup of dlt-daemon.
-.PP
-dlt-daemon loads by default the configuration file /etc/dlt.conf. An
-alternative configuration file can be loaded with the option \-c.
-.SH GENERAL OPTIONS
-.TP
-.B Verbose
-If set to 1 DLT daemon is started in dubug mode, so that all internal debug
-information is printed out on the console.
-.IP
-Default: 0
-.TP
-.B Daemonize
-If set to 1 DLT daemon is started in background as daemon. This option
-is only needed in System V init systems. In systemd based startup
-systems the daemon is started by spawning own process.
-.IP
+.SH "DESCRIPTION"
+.sp
+The DLT daemon is the central place where logs and traces are gathered from different applications, stored temporarily or permanently and transferred to a DLT client application, which can run directly on the GENIVI system or more likely on a external tester device\&.
+.sp
+The configuration file dlt\&.conf allows to configure the different runtime behaviour of the dlt\-daemon\&. The configuration file is loaded during startup of dlt\-daemon\&.
+.sp
+dlt\-daemon loads by default the configuration file /etc/dlt\&.conf\&. An alternative configuration file can be loaded with the option \-c\&.
+.SH "GENERAL OPTIONS"
+.PP
+\fBDaemonize\fR
+.RS 4
+If set to 1 DLT daemon is started in background as daemon\&. This option is only needed in System V init systems\&. In systemd based startup systems the daemon is started by spawning own process\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: 0
-.TP
-.B SendSerialHeader
-If set to 1 DLT daemon sends each DLT message to the client with
-prepanding the serial header "DLS0x01".
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBSendSerialHeader\fR
+.RS 4
+If set to 1 DLT daemon sends each DLT message to the client with prepanding the serial header "DLS0x01"\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: 0
-.TP
-.B SendContextRegistration
-If set to 1 each context which is registered from an application in the
-DLT daemon generates a message to inform the DLT client about the new
-context.
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBSendContextRegistration\fR
+.RS 4
+If set to 1 each context which is registered from an application in the DLT daemon generates a message to inform the DLT client about the new context\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: 0
-.TP
-.B SendMessageTime
-If set to 1 DLt daemon sends each second a DLT control message to the
-client with the current timestamp from the system.
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBSendMessageTime\fR
+.RS 4
+If set to 1 DLt daemon sends each second a DLT control message to the client with the current timestamp from the system\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: 0
-.TP
-.B ECUId
-This value sets the ECU Id, which is sent with each DLT message.
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBECUId\fR
+.RS 4
+This value sets the ECU Id, which is sent with each DLT message\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: ECU1
-.TP
-.B SharedMemorySize
-This value sets the size of the shared memory, which is used to exchange
-DLT messages between applications and daemon. This value is defined in
-bytes. If this value is changed the system must be rebooted to take
-effect.
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBSharedMemorySize\fR
+.RS 4
+This value sets the size of the shared memory, which is used to exchange DLT messages between applications and daemon\&. This value is defined in bytes\&. If this value is changed the system must be rebooted to take effect\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: 100000
-.TP
-.B PersistanceStoragePath
-This is the directory path, where the DLT daemon stores its runtime
-configuration. Runtime configuration includes stored log levels, trace
-status and changed logging mode.
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBPersistanceStoragePath\fR
+.RS 4
+This is the directory path, where the DLT daemon stores its runtime configuration\&. Runtime configuration includes stored log levels, trace status and changed logging mode\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: /tmp
-.SH OFFLINE TRACE OPTIONS
-.TP
-.B OfflineTraceDirectory
-If this option is set, offline trace is enabled. This value sets the
-directory path to the offline trace memory. The directory must already
-exist.
-.IP
-Default: Offline tracing is disabled.
-.TP
-.B OfflineTraceFileSize
-This value defines the max size of a offline trace file, if offline trace
-is enabled. This value is defined in bytes. If the files size of the
-current used log file is exceeded, a new log file is created.
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.SH "OFFLINE TRACE OPTIONS"
+.PP
+\fBOfflineTraceDirectory\fR
+.RS 4
+If this option is set, offline trace is enabled\&. This value sets the directory path to the offline trace memory\&. The directory must already exist\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+Default: Offline tracing is disabled\&.
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBOfflineTraceFileSize\fR
+.RS 4
+This value defines the max size of a offline trace file, if offline trace is enabled\&. This value is defined in bytes\&. If the files size of the current used log file is exceeded, a new log file is created\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: 1000000
-.TP
-.B OfflineTraceMaxSize
-This value defines the max offline Trace memory size, if offline trace
-is enabled. This value is defined in bytes. If the overall offline trace
-size is excedded, the oldest log files are deleted, until a new trace
-file fits the overall offline trace max size.
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBOfflineTraceMaxSize\fR
+.RS 4
+This value defines the max offline Trace memory size, if offline trace is enabled\&. This value is defined in bytes\&. If the overall offline trace size is excedded, the oldest log files are deleted, until a new trace file fits the overall offline trace max size\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: 4000000
-.SH LOCAL CONSOLE OUTPUT OPTIONS
-.TP
-.B PrintASCII
-Prints each received DLT message from the application in ASCII to the
-local console.
-This option should only be anabled for debugging purpose.
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.SH "LOCAL CONSOLE OUTPUT OPTIONS"
+.PP
+\fBPrintASCII\fR
+.RS 4
+Prints each received DLT message from the application in ASCII to the local console\&. This option should only be anabled for debugging purpose\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: Function is disabled
-.TP
-.B PrintHex
-Prints each received DLT message from the application in ASCII to the
-local console. The payload is printed in Hex.
-This option should only be anabled for debugging purpose.
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBPrintHex\fR
+.RS 4
+Prints each received DLT message from the application in ASCII to the local console\&. The payload is printed in Hex\&. This option should only be anabled for debugging purpose\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: Function is disabled
-.TP
-.B PrintHeadersOnly
-Prints each received DLT message from the application in ASCII to the
-local console. Only the header is printed.
-This option should only be anabled for debugging purpose.
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBPrintHeadersOnly\fR
+.RS 4
+Prints each received DLT message from the application in ASCII to the local console\&. Only the header is printed\&. This option should only be anabled for debugging purpose\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: Function is disabled
-.SH SERIAL CLIENT OPTIONS
-.TP
-.B RS232DeviceName
-If this value is set to a serial device name, e.g. /dev/ttyS0, a serial
-port is used for logging to a client.
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.SH "SERIAL CLIENT OPTIONS"
+.PP
+\fBRS232DeviceName\fR
+.RS 4
+If this value is set to a serial device name, e\&.g\&. /dev/ttyS0, a serial port is used for logging to a client\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: Serial port for logging is disabled
-.TP
-.B RS232Baudrate
-The used serial baud rate, if serial loggin is enabled. The
-RS232DeviceName must be set to enable serial logging.
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBRS232Baudrate\fR
+.RS 4
+The used serial baud rate, if serial loggin is enabled\&. The RS232DeviceName must be set to enable serial logging\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: 115200
-.TP
-.B RS232SyncSerialHeader
-If serial logging is enabled, each received DLT message is checked to
-contain a serial header. If the DLT message contains no serial header,
-the message is ignored.
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBRS232SyncSerialHeader\fR
+.RS 4
+If serial logging is enabled, each received DLT message is checked to contain a serial header\&. If the DLT message contains no serial header, the message is ignored\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: Function is disabled
-.SH TCP CLIENT OPTIONS
-.TP
-.B TCPSyncSerialHeader
-Each received DLT message on a TCP connection is checked to contain a
-serial header. If the DLT message contains no serial header, the message
-is ignored.
-.SH ECU Software version info
-.TP
-.B SendECUSoftwareVersion
-Send periodic ECU version info. 0=disabled, 1=enabled.
-.IP
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.SH "TCP CLIENT OPTIONS"
+.PP
+\fBTCPSyncSerialHeader\fR
+.RS 4
+Each received DLT message on a TCP connection is checked to contain a serial header\&. If the DLT message contains no serial header, the message is ignored\&.
+.RE
+.SH "ECU SOFTWARE VERSION INFO"
+.PP
+\fBSendECUSoftwareVersion\fR
+.RS 4
+Send periodic ECU version info\&. 0=disabled, 1=enabled\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
Default: 0
-.TP
-.B PathToECUSoftwareVersion
-Absolute path to file storing version information - if disabled the DLT version will be send.
-.SH AUTHOR
-Alexander Wenzel (alexander.aw.wenzel (at) bmw.de)
-.SH SEE ALSO
-dlt(1)
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.PP
+\fBPathToECUSoftwareVersion\fR
+.RS 4
+Absolute path to file storing version information \- if disabled the DLT version will be send\&.
+.RE
+.SH "EXAMPLES"
+.PP
+Start DLT daemon in background mode
+.RS 4
+
+\fBdlt\-daemon \-d\fR
+.RE
+.PP
+Start DLT daemon with own configuration
+.RS 4
+
+\fBdlt\-daemon \-c ~/my\-dlt\-configuration\&.cfg\fR
+.RE
+.SH "AUTHOR"
+.sp
+Alexander Wenzel (alexander\&.aw\&.wenzel (at) bmw\&.de)
+.SH "RESOURCES"
+.sp
+Main web site: http://projects\&.genivi\&.org/diagnostic\-log\-trace Mailinglist: https://lists\&.genivi\&.org/mailman/listinfo/genivi\-diagnostic\-log\-and\-trace
+.SH "SEE ALSO"
+.sp
+dlt\-daemon(1) dlt\-system(1)
diff --git a/doc/dlt.conf.5.txt b/doc/dlt.conf.5.txt
new file mode 100644
index 0000000..b21ab18
--- /dev/null
+++ b/doc/dlt.conf.5.txt
@@ -0,0 +1,183 @@
+DLT.CONF(5)
+=============
+:doctype: manpage
+
+NAME
+----
+dlt.conf - DLT daemon configuration file
+
+DESCRIPTION
+-----------
+The DLT daemon is the central place where logs and traces are gathered
+from different applications, stored temporarily or permanently and
+transferred to a DLT client application, which can run directly on the
+GENIVI system or more likely on a external tester device.
+
+The configuration file dlt.conf allows to configure the different
+runtime behaviour of the dlt-daemon. The configuration file is loaded
+during startup of dlt-daemon.
+
+dlt-daemon loads by default the configuration file /etc/dlt.conf. An
+alternative configuration file can be loaded with the option -c.
+
+GENERAL OPTIONS
+---------------
+
+*Daemonize*::
+ If set to 1 DLT daemon is started in background as daemon. This option
+ is only needed in System V init systems. In systemd based startup
+ systems the daemon is started by spawning own process.
+
+ Default: 0
+
+*SendSerialHeader*::
+ If set to 1 DLT daemon sends each DLT message to the client with
+ prepanding the serial header "DLS0x01".
+
+ Default: 0
+
+*SendContextRegistration*::
+ If set to 1 each context which is registered from an application in the
+ DLT daemon generates a message to inform the DLT client about the new
+ context.
+
+ Default: 0
+
+*SendMessageTime*::
+ If set to 1 DLt daemon sends each second a DLT control message to the
+ client with the current timestamp from the system.
+
+ Default: 0
+
+*ECUId*::
+ This value sets the ECU Id, which is sent with each DLT message.
+
+ Default: ECU1
+
+*SharedMemorySize*::
+ This value sets the size of the shared memory, which is used to exchange
+ DLT messages between applications and daemon. This value is defined in
+ bytes. If this value is changed the system must be rebooted to take
+ effect.
+
+ Default: 100000
+
+*PersistanceStoragePath*::
+ This is the directory path, where the DLT daemon stores its runtime
+ configuration. Runtime configuration includes stored log levels, trace
+ status and changed logging mode.
+
+ Default: /tmp
+
+OFFLINE TRACE OPTIONS
+---------------------
+
+*OfflineTraceDirectory*::
+ If this option is set, offline trace is enabled. This value sets the
+ directory path to the offline trace memory. The directory must already
+ exist.
+
+ Default: Offline tracing is disabled.
+
+*OfflineTraceFileSize*::
+ This value defines the max size of a offline trace file, if offline trace
+ is enabled. This value is defined in bytes. If the files size of the
+ current used log file is exceeded, a new log file is created.
+
+ Default: 1000000
+
+*OfflineTraceMaxSize*::
+ This value defines the max offline Trace memory size, if offline trace
+ is enabled. This value is defined in bytes. If the overall offline trace
+ size is excedded, the oldest log files are deleted, until a new trace
+ file fits the overall offline trace max size.
+
+ Default: 4000000
+
+LOCAL CONSOLE OUTPUT OPTIONS
+----------------------------
+
+*PrintASCII*::
+ Prints each received DLT message from the application in ASCII to the
+ local console.
+ This option should only be anabled for debugging purpose.
+
+ Default: Function is disabled
+
+*PrintHex*::
+ Prints each received DLT message from the application in ASCII to the
+ local console. The payload is printed in Hex.
+ This option should only be anabled for debugging purpose.
+
+ Default: Function is disabled
+
+*PrintHeadersOnly*::
+ Prints each received DLT message from the application in ASCII to the
+ local console. Only the header is printed.
+ This option should only be anabled for debugging purpose.
+
+ Default: Function is disabled
+
+SERIAL CLIENT OPTIONS
+---------------------
+
+*RS232DeviceName*::
+ If this value is set to a serial device name, e.g. /dev/ttyS0, a serial
+ port is used for logging to a client.
+
+ Default: Serial port for logging is disabled
+
+*RS232Baudrate*::
+ The used serial baud rate, if serial loggin is enabled. The
+ RS232DeviceName must be set to enable serial logging.
+
+ Default: 115200
+
+*RS232SyncSerialHeader*::
+ If serial logging is enabled, each received DLT message is checked to
+ contain a serial header. If the DLT message contains no serial header,
+ the message is ignored.
+
+ Default: Function is disabled
+
+TCP CLIENT OPTIONS
+------------------
+
+*TCPSyncSerialHeader*::
+ Each received DLT message on a TCP connection is checked to contain a
+ serial header. If the DLT message contains no serial header, the message
+ is ignored.
+
+ECU Software version info
+-------------------------
+
+*SendECUSoftwareVersion*::
+ Send periodic ECU version info. 0=disabled, 1=enabled.
+
+ Default: 0
+
+*PathToECUSoftwareVersion*::
+ Absolute path to file storing version information - if disabled the DLT version will be send.
+
+EXAMPLES
+--------
+Start DLT daemon in background mode::
+ *dlt-daemon -d*
+
+Start DLT daemon with own configuration::
+ *dlt-daemon -c ~/my-dlt-configuration.cfg*
+
+AUTHOR
+------
+Alexander Wenzel (alexander.aw.wenzel (at) bmw.de)
+
+RESOURCES
+---------
+Main web site: <http://projects.genivi.org/diagnostic-log-trace> +
+Mailinglist: <https://lists.genivi.org/mailman/listinfo/genivi-diagnostic-log-and-trace>
+
+SEE ALSO
+--------
+dlt-daemon(1) +
+dlt-system(1)
+
diff --git a/doc/dlt_book.txt b/doc/dlt_book.txt
new file mode 100644
index 0000000..1c112b4
--- /dev/null
+++ b/doc/dlt_book.txt
@@ -0,0 +1,46 @@
+DLT Documentation
+=================
+Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
+0.0.1, 2012/10/10: Initial version
+
+image::images/genivi_chrome_1_transparent.png[width=128]
+
+Purpose
+-------
+This document combines all DLT documents into a single document.
+
+Information
+-----------
+
+:leveloffset: 2
+
+include::../README.txt[]
+include::../INSTALL.txt[]
+include::../ReleaseNotes.txt[]
+
+:leveloffset: 0
+
+Manpages
+--------
+
+:leveloffset: 2
+
+include::dlt-daemon.1.txt[]
+include::dlt.conf.5.txt[]
+include::dlt-system.1.txt[]
+include::dlt-system.conf.5.txt[]
+include::dlt-convert.1.txt[]
+include::dlt-receive.1.txt[]
+
+:leveloffset: 0
+
+Manuals
+-------
+
+:leveloffset: 2
+
+include::dlt_user_manual.txt[]
+include::dlt_cheatsheet.txt[]
+include::dlt_design_specification.txt[]
+
+
diff --git a/doc/dlt_cheatsheet.txt b/doc/dlt_cheatsheet.txt
new file mode 100644
index 0000000..b101f7f
--- /dev/null
+++ b/doc/dlt_cheatsheet.txt
@@ -0,0 +1,239 @@
+DLT Cheatsheet
+==============
+Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
+0.0.1, 2012/10/11: Initial version
+
+image::images/genivi_chrome_1_transparent.png[width=128]
+
+Overview
+--------
+DLT is quiet easy to use. As an application developer you only need to follow some steps as described in this document.
+
+Initialisation:
+
+- Link your application against the DLT library
+- Include the DLT header file
+- Register your application
+- Define all contexts
+- Register all contexts
+
+Now you are ready to write your logs.
+
+Termination:
+
+- Unregister all contexts
+- Unregister application
+
+Link your application to DLT library
+------------------------------------
+If you compile your application with cmake, you have to add the following lines to your CMakeLists.txt.
+
+----
+pkg_check_modules(DLT REQUIRED automotive-dlt)
+${DLT_INCLUDE_DIRS}
+${DLT_LIBRARIES}
+----
+
+Include the DLT Header
+----------------------
+To use DLT you have to include the DLT header file in each file you want to use DLT.
+
+----
+#include <dlt/dlt.h>
+----
+
+Register your application
+-------------------------
+You have to register your application as early as possible during the initialisation of your application.
+You have to call the DLT_REGISTER_APP().
+It is only allowed to call DLT_REGISTER_APP() *once* in your application.
+You have to provide a application id, which size is maximum four charcters long. In this example we use "MAPP".
+And you can provide also a description for your application, here it is "Test Application for Logging".
+
+----
+int main(int argc, const char\* argv\[\])
+{
+ DLT_REGISTER_APP("MAPP","Test Application for Logging");
+
+}
+----
+
+If your application uses fork(), you may not call DLT_REGISTER_APP() before fork(). And fork() should never be called after DLT_REGISTER_APP. This is because the DLT library must be initialised for each process, which is done by DLT_REGISTER_APP().
+If you are not sure where you are calling DLT_REGISTER_APP() the first time, you can initialise the DLT user library by calling the initialisation routine directly.
+
+----
+dlt_user_init();
+----
+
+Define all contexts
+--------------------
+You can create as many contexts as you like.
+You can declare one or more contexts in a C or CPP file.
+Each context is only allowed to be declared once.
+You have to provide a unique variable name for your context.
+
+----
+#include <dlt/dlt.h>
+
+DLT_DECLARE_CONTEXT(myContext1);
+DLT_DECLARE_CONTEXT(myContext2);
+DLT_DECLARE_CONTEXT(myContext3);
+----
+
+If you want to use a context in another C or CPP file, you can import the context by calling
+
+----
+#include <dlt/dlt.h>
+
+DLT_IMPORT_CONTEXT(myContext1);
+DLT_IMPORT_CONTEXT(myContext2);
+DLT_IMPORT_CONTEXT(myContext3);
+----
+
+Register all contexts
+----------------------
+After you have registered your application you must register your contexts, early during initialisation of your application.
+Do not call DLT_REGISTER_CONTEXT() before DLT_REGISTER_APP().
+During registration of each context, you must provide a context id, which size is maximum four charcters long. In this example we use "TESX".
+And you can provide also a description for your context, here it is "Test Context X for Logging".
+
+----
+int main(int argc, const char\* argv\[\])
+{
+ DLT_REGISTER_APP("MAPP","Test Application for Logging");
+
+ DLT_REGISTER_CONTEXT(myContext1,"TES1","Test Context 1 for Logging");
+ DLT_REGISTER_CONTEXT(mycontext2,"TES2","Test Context 2 for Logging");
+ DLT_REGISTER_CONTEXT(mycontext3,"TES3","Test Context 3 for Logging");
+
+}
+----
+
+Create your logs
+----------------
+Now you can start creating your logs.
+Each log command consist of the context, the log level and a variable number of logging parameters.
+
+Log Level
+~~~~~~~~~
+The log level must be one of the following values:
+
+[options="header"]
+|==================================================================
+| Log level | Description
+| DLT_LOG_FATAL | fatal system error
+| DLT_LOG_ERROR | error with impact to correct functionality
+| DLT_LOG_WARN | warning, correct behaviour could not be ensured
+| DLT_LOG_INFO | informational (default)
+| DLT_LOG_DEBUG | debug
+| DLT_LOG_VERBOSE | highest grade of information
+|==================================================================
+
+DLT_LOG_FATAL, DLT_LOG_ERROR and DLT_LOG_WARN should be used in your application, when something is going wrong.
+DLT_LOG_INFO should be used to send the most important information.
+DLT_LOG_DEBUG and DLT_LOG_VERBOSE should be only used for testing information.
+
+Each context is set by default to DLT_LOG_INFO log level. All log message are send, which use this loglevel or a lower loglevel.
+If you also want to see DLT_LOG_DEBUG and DLT_LOG_VERBOSE log messages, you have to raise the log level with the DLT viewer.
+
+Logging parameters
+~~~~~~~~~~~~~~~~~~
+The following parameter types can be used.
+You can add one or more parameters to a single log message.
+The size of all logging parameters together should not exceed 2kBytes, including the DLT message header.
+
+[options="header"]
+|===============================================================
+| Type | Description
+| DLT_STRING(TEXT) | String
+| DLT_RAW(BUF,LENGTH) | Raw buffer
+| DLT_INT(VAR) | Integer variable, dependent on platform
+| DLT_INT16(VAR) | Integer 16 Bit variable
+| DLT_INT32(VAR) | Integer 32 Bit variable
+| DLT_INT64(VAR) | Integer 64 bit variable
+| DLT_UINT(VAR) | Unsigned integer variable
+| DLT_UINT16(VAR) | Unsigned 16 Bit integer variable
+| DLT_UINT32(VAR) | Unsigned 32 Bit integer variable
+| DLT_UINT64(VAR) | Unsigned 64 bit integer variable
+| DLT_BOOL(VAR) | Boolean variable
+| DLT_FLOAT32(VAR) | Float 32 Bit variable
+| DLT_FLOAT64(VAR) | Float 64 Bitvariable
+|===============================================================
+
+Logging command
+~~~~~~~~~~~~~~~
+Here are some examples for complete log messages.
+The contexts must be registered before.
+
+----
+DLT_LOG(mycontext1,DLT_LOG_ERROR,DLT_INT(5),DLT_STRING("This is a error"));
+DLT_LOG(mycontext2,DLT_LOG_INFO,DLT_INT(5),DLT_STRING("But this only information"));
+DLT_LOG(mycontext3,DLT_LOG_DEBUG,DLT_INT(5),DLT_STRING("But this only information"));
+----
+
+Unregister contexts and applications
+------------------------------------
+Before terminating your application you must unregister all registered contexts and unregister at last your application.
+
+----
+int main(int argc, const char\* argv\[\])
+{
+ DLT_REGISTER_APP("MAPP","Test Application for Logging");
+
+ DLT_REGISTER_CONTEXT(myContext1,"TES1","Test Context 1 for Logging");
+ DLT_REGISTER_CONTEXT(mycontext2,"TES2","Test Context 2 for Logging");
+ DLT_REGISTER_CONTEXT(mycontext3,"TES3","Test Context 3 for Logging");
+
+ DLT_UNREGISTER_CONTEXT(myContext1);
+ DLT_UNREGISTER_CONTEXT(mycontext2);
+ DLT_UNREGISTER_CONTEXT(mycontext3);
+
+ DLT_UNREGISTER_APP();
+
+ return 0;
+}
+----
+
+Example
+-------
+Finally here is a complete example for using DLT:
+
+.dlt_example.c
+----
+#include <stdio.h>
+#include <dlt/dlt.h>
+
+DLT_DECLARE_CONTEXT(myContext1);
+DLT_DECLARE_CONTEXT(myContext2);
+DLT_DECLARE_CONTEXT(myContext3);
+
+int main()
+{
+ /* register application */
+ DLT_REGISTER_APP("MAPP","Test Application for Logging");
+
+ /* register all contexts */
+ DLT_REGISTER_CONTEXT(myContext1,"TES1","Test Context 1 for Logging");
+ DLT_REGISTER_CONTEXT(mycontext2,"TES2","Test Context 2 for Logging");
+ DLT_REGISTER_CONTEXT(mycontext3,"TES3","Test Context 3 for Logging");
+
+ /* Write your logs */
+ DLT_LOG(mycontext1,DLT_LOG_ERROR,DLT_INT(5),DLT_STRING("This is a error"));
+ DLT_LOG(mycontext2,DLT_LOG_INFO,DLT_INT(5),DLT_STRING("But this only information"));
+ DLT_LOG(mycontext3,DLT_LOG_DEBUG,DLT_INT(5),DLT_STRING("But this only information"));
+
+ /* Sleep some time */
+ sleep(3);
+
+ /* unregister your contexts */
+ DLT_UNREGISTER_CONTEXT(myContext1);
+ DLT_UNREGISTER_CONTEXT(mycontext2);
+ DLT_UNREGISTER_CONTEXT(mycontext3);
+
+ /* unregister your application */
+ DLT_UNREGISTER_APP();
+
+ return 0;
+
+}
+----
diff --git a/doc/dlt_design_specification.txt b/doc/dlt_design_specification.txt
new file mode 100644
index 0000000..0fc0cda
--- /dev/null
+++ b/doc/dlt_design_specification.txt
@@ -0,0 +1,629 @@
+DLT Design Specification
+========================
+Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
+0.0.1, 2012/10/10: Initial version
+
+image::images/genivi_chrome_1_transparent.png[width=128]
+
+*This document is not up to date*
+
+== Purpose
+This document specifies the usage of the DLT daemon v2 and also the internal functionality of the DLT daemon v2. The DLT daemon v2 is a complete rework of the DLT daemon v1, which is part of the GENIVI 1.0 release.
+The DLT daemon is the central place where logs and traces are gathered from different applications, stored temporarily or permanently and transferred to a DLT client application, which can run directly on the GENIVI system or more likely on a external tester device.
+The DLT client component is described in an extra document.
+The DLT daemon component is based on the AUTOSAR 4.0 standard DLT.
+
+== Overview
+
+.DLT Architecture
+image::images/dlt_overview.png[]
+
+The DLT daemon is the central component in GENIVI, which gathers all logs and traces from the DLT user applications. The logs and traces are stored optionally directly in a file in the ECU. The DLT daemon forwards all logs and traces to a connected DLT client.
+The DLT client can send control messages to the daemon, e.g. to set individual log levels of applications and contexts or get the list of applications and contexts registered in the DLT daemon.
+
+== Architecture
+
+=== DLT daemon
+The DLT daemon is the central component between the DLT clients and one or more applications using the DLT user library.
+
+==== Overview
+The DLT daemon communicates with the DLT clients over TCP/IP connections or over a serial line (the message format is specified in the DLT AUTOSAR Standard), with the applications using the DLT user library over named pipes (FIFOs). More details concerning the exchanged user messages and their content can be found in chapter chapter 6.3.
+The main time, the DLT daemon executes a main loop, in which file and socket descriptors are watched (via select()). If a message is received, the DLT daemon reacts. Additionally, a thread is implemented, which if enabled sends each second a keep-alive message to all connected DLT clients.
+Here is a rough schematic, how the DLT daemon is structured:
+
+.DLT Overview
+image::images/dlt_architecture.png[]
+
+==== Initialization
+During initialization of the DLT daemon, the following steps occur:
+
+* Option handling
+* Initialization of logging facility for the DLT daemon application. The DLT daemon application by itself prints to screen, if not in daemon mode. In daemon mode, it uses the syslog daemon for log messages of the DLT daemon application.
+* Then the daemon enters initialization phase 1:
+** Enter daemon mode, if started as daemon
+** Initialize output of messages to local file
+** Parse filter file, if specified; then set filters for file storage
+** Setup signal handler
+** Open DLT output file, if specified
+* After phase 1, the daemon initializes the connection handling:
+** Delete, create and open its own named FIFO /tmp/dlt
+** Open, bind and listen to TCP socket for incoming connections
+** Setup and open serial device, if specified
+* Then the daemon enters initialization phase 2:
+** Initialize daemon data structures
+** Initialize ring buffer for client connection
+** Check if a runtime configuration exists, if yes load all stored application and context ids, as well as all log levels and trace statuses. Store this information to a local array.
+** Prepare main loop
+** Initialize receiver objects for socket and serial connection
+** Initialize binary semaphore
+** Create and start thread for timing messages, sending of these messages is disabled at default.
+* Now, the initialization is finished, and the DLT daemon enters the main loop.
+
+==== Main loop
+In the main loop, the following things occur:
+
+* Wait for event on the incoming named pipe, the TCP connections (the one connection for new connections, and all TCP connections from clients), and possibly on the serial device, via select() call.
+* Distinguish from which socket/file descriptor the connection came, and handle them:
+** Event from TCP server socket (New DLT client to DLT daemon):
+*** Create new TCP connection
+*** If the newly created connection is the first TCP connection, send all log messages already stored in ring buffer to DLT client.
+** Event from incoming named pipe (DLT user library to DLT daemon):
+*** Use dlt receiver to read data
+*** As long as there are DLT messages available in received data:
+**** Handle user message:
+***** DLT_USER_MESSAGE_REGISTER_APPLICATION
+***** DLT_USER_MESSAGE_UNREGISTER_APPLICATION
+***** DLT_USER_MESSAGE_REGISTER_CONTEXT
+***** DLT_USER_MESSAGE_UNREGISTER_CONTEXT
+***** DLT_USER_MESSAGE_OVERFLOW
+***** DLT_USER_MESSAGE_LOG
+***** DLT_USER_MESSAGE_APP_LL_TS
+*** Move rest of data in front of buffer for next read attempt
+** Event from serial device (DLT client to DLT daemon via serial device)
+*** Use other dlt receiver to read data
+*** As long as there are DLT messages available in received data:
+**** Check for DLT message type control request, and if yes process the request
+*** Move rest of data in front of buffer for next read attempt
+** Event from TCP socket (DLT client to DLT daemon via TCP connection)
+*** Use other dlt receiver to read data, and check for lost connection
+*** As long as there are DLT messages available in received data:
+**** Check for DLT message type control request, and if yes process the request
+*** Move rest of data in front of buffer for next read attempt
+
+How the received user messages and control messages are handled, is described in the Appendix.
+
+=== DLT user library
+
+==== Overview
+The DLT user library is linked to each application which wants to use DLT. It encapsulates the communication with the DLT daemon, and provides two interfaces: the DLT user macro interface and the DLT user functional interface. All macros from the DLT user macro interface are mapped to functions in the DLT user functional interface. The DLT user library has one additional thread, responsible for receiving messages from the DLT daemon. Parts of functions accessible by the user interface are protected by a semaphore, as well as parts of the function which is called within the thread.
+
+==== Initialization
+During initialization, the following things are done:
+
+* Setup internal structure including Application ID and Description (textual) of application
+* Get value from environment variable "DLT_LOCAL_PRINT_MODE". This variable can be used to control the local printing mode of the DLT user library. If enabled (either via "AUTOMATIC" or via "FORCE_ON"), all messages, which are prepared to be sent to the DLT daemon will also be print out locally (as ASCII string). If the environment variable is set, this value overrides the local print mode which can be set with the API function dlt_enable_local_print() or with dlt_disable_local_print() from within the application using the DLT user library. The following values are allowed:
+*** "AUTOMATIC": Local printing is enabled, if NO DLT daemon is running.
+*** "FORCE_ON": Local printing is always enabled.
+*** "FORCE_OFF": Local printing is always disabled.
+* Clear internal context array (dynamically growing in step size DLT_USER_CONTEXT_ALLOC_SIZE, typically 500). The internal context array is NOT be kept sorted, as the DLT daemon stores for each registered context the offset position within this array, and sends this offset position for faster access of a context within this internal context array). The internal context array contains one entry for each context:
+** Context ID
+** Log level for this context
+** Trace status for this context
+** Initialize table (dynamically growing in step-size 1) with function pointers for callback functions used for injection messages
+** Description (textual) of context
+* Initialize ringbuffer for local storage of not sent messages
+* Setup signal handler and atexit handler
+* Ignore all pipe signals
+* Create and open own named pipe with the name /tmp/dlt<PID>, where <PID> is the process id of the application using the DLT user library.
+* Open named pipe to the DLT daemon
+* Open local file for storage, if specified
+* Initialize receiver object
+* Start receiver thread
+
+==== De-Initialization
+During de-initialization, the following things are done:
+
+* De-register application (and all contexts belonging to this application) from DLT daemon
+* Stop receiver thread
+* Close and remove own named pipe
+* Close named pipe to the DLT daemon
+* De-Initialize receiver object
+* De-Initialize ringbuffer
+
+==== Register application and context
+During register of the application, the following things occur:
+
+* Auto-initialize DLT user library, if necessary
+* Store application id to internal structure
+* Store application description to internal structure
+* Send message DLT_REGISTER_APPLICATION to DLT daemon
+
+During register of a context of the application, the following things occur:
+
+* Auto-initialize DLT user library, if necessary
+* Check, if context was already registered, if not , dynamically increment if required, the context array in step size DLT_USER_CONTEXT_ALLOC_SIZE, typically 500. Then store one entry for the new context to internal context array.
+* Send message DLT_REGISTER_CONTEXT to DLT daemon
+
+==== Unregister context and application
+
+During unregister of context, the following things occur:
+
+* Delete context from internal structures
+* Send message DLT_UNREGISTER_CONTEXT to DLT daemon
+
+During unregister of application, the following things occur:
+
+* Delete application from internal structures
+* Send message DLT_UNREGISTER_APPLICATION to DLT daemon
+
+==== Handling of messages received from DLT daemon
+
+During receiver thread within the DLT user library checks for newly received messages from the DLT daemon, and handles them in the following way:
+
+* DLT_USER_MESSAGE_LOG_LEVEL
+** Store received log level and trace status for the received context to the context array
+* DLT_USER_MESSAGE_INJECTION
+** Check all registered callbacks for this context:
+*** Compare service id of registered callback with received service id, if they matches:
+**** Call registered callback function.
+
+==== Overflow handling
+
+If the named pipe of the DLT daemon is full, an overflow flag is set and the message stored in a ring buffer. The next time, a message could be send to the DLT daemon, an overflow message is send first, then the contents of the ring buffer. If sending of this message was possible, the overflow flag is reset.
+
+==== Send log message
+
+During sending of a log message, the following things occur:
+
+* Auto-initialize DLT user library, if necessary
+* Initialize DLT log structure
+* Store log level of log message in DLT log structure
+* Check if log level is smaller than or equal than the stored log level of the context, under which the message should be sent. If yes continue, else don't send this log message. This is a kind of filtering on the DLT user library side.
+* In non-verbose mode, insert message id
+* Add values (int, string, raw, …) to DLT log structure:
+** Set argument type (only in verbose mode)
+** Copy content of argument to message
+** Set length information of argument
+** Set number of arguments and total length of message
+* Create new message with the help of the DLT log structure and handle this message:
+** Initialize new message
+** Add headers (standard header, extended header, storage header, ...) to this message
+** If logging to a file is enabled, write the log message to file. Finished sending log.
+** Print message locally, if requested by environment variable
+** Check if connection to DLT daemon was lost and try to reattach to daemon.
+** Check for overflow flag and try to send overflow message.
+** Try to send message to DLT daemon, and check for return values. This can be:
+*** data could not be written
+*** handle not open or pipe error
+*** other error condition
+*** no error, all right
+** If sending failed, put this message in the ring buffer for later sending.
+** Handle this error conditions.
+
+==== Send network trace message
+
+During sending of a network trace message, the following things occur:
+
+* Auto-initialize DLT user library, if necessary
+* Check for trace status of network trace message to be send.
+* If Trace status equals on:
+** Initialize DLT log structure
+** Set trace status in DLT log structure to network trace type of message
+** Copy length of network message header to DLT log structure
+** Copy data of network message header to DLT log structure
+** Copy length of network trace payload to DLT log structure
+** Copy data of network trace payload to DLT log structure
+** Create new message with the help of the DLT log structure and handle this message
+
+==== Register callback function for injection message
+
+During registration of a callback function for a injection message, the following steps are executed:
+
+** For the specified context, check if service id is already in the table of the registered callbacks (this table is dynamically growing in steps of one entry).
+*** If yes:
+**** Stored service id is set to service id to be registered
+**** Stored callback function pointer is set to callback function pointer to be registered
+*** If no:
+**** Increase nr of callbacks for this context
+**** Store service id in callback table
+**** Store function pointer in callback table
+
+=== Communication between DLT daemon and DLT user library
+
+The communication mechanism used between DLT daemon and DLT user library are named pipes (FIFOs).
+During startup of the DLT daemon, the DLT daemon creates and opens one named pipe called /tmp/dlt. If a DLT user application using the DLT user library wants to send something to the DLT daemon this pipe is used.
+During startup of the DLT user application using the DLT user library, it creates and opens a named pipe called /tmp/dlt<PID>, where <PID> is the process id of the DLT user application. If the DLT daemon wants to send something to the DLT user application, this specific named pipe is used.
+The exchanged messages are described in the chapter 7.1.
+
+=== Place of message creation
+
+The following table shows, where the DLT messages are created. The message types are described in more detail in the AUTOSAR Specification for Diagnostic Log and Trace.
+
+[options="header"]
+|==============================================================================================
+| Type of message | DLT client | DLT daemon | DLT library
+| Control request | X | X |
+| Control response | | X |
+| Log message | | | X
+| Trace message | | | X
+|==============================================================================================
+
+* "Get log info" request only, if enabled with \-r option in DLT daemon during start-up
+* "File generation" means, that the DLT client creates a file for testing purposes, containing multiple DLT messages. This functionality is only in the "old" DLT viewer (WX widget-based implementation) available.
+
+This table shows, that:
+
+** DLT messages of message type control request (e.g. "Get Log Info"-Request) are created in the DLT client, and then sent to the DLT daemon.
+** DLT messages of message type control response (to a control request) are created in the DLT daemon, and then sent to the DLT client.
+** DLT messages of type log and of type trace are created in the DLT user library, then passed (via the named pipe of the DLT daemon) to the DLT daemon , which forwards them to the connected DLT clients.
+
+=== Message flow
+
+The following figure shows the overall flow of messages.
+
+.DLT Message flow
+image::images/dlt_message_flow.png[]
+
+
+== Appendix
+
+=== Messages exchanged between DLT daemon and DLT user library
+
+There are several user messages (each has its own message identifier DLT_USER_MESSAGE_*) which will are exchanged between DLT daemon and DLT user library, and will be described in the following sub-chapters.
+
+From DLT user library to DLT daemon:
+
+* DLT_USER_MESSAGE_REGISTER_APPLICATION
+* DLT_USER_MESSAGE_UNREGISTER_APPLICATION
+* DLT_USER_MESSAGE_REGISTER_CONTEXT
+* DLT_USER_MESSAGE_UNREGISTER_CONTEXT
+* DLT_USER_MESSAGE_LOG
+* DLT_USER_MESSAGE_OVERFLOW
+* DLT_USER_MESSAGE_APP_LL_TS
+
+From DLT daemon to DLT user library:
+
+* DLT_USER_MESSAGE_LOG_LEVEL
+* DLT_USER_MESSAGE_INJECTION
+
+Each of the following messages has a message header with the following information:
+
+* Pattern: DUH0x01
+* Message identifier
+
+==== User Message: Register Application
+
+This message is send by the DLT user library once per application to register the application to the DLT daemon.
+It contains the following information:
+
+* The application id of the application to be registered
+* The process id of the process using the DLT user library. This information is required, if the DLT daemon wants to send something to the DLT user library.
+* The length of the following description.
+* The application description.
+
+==== User Message: Unregister Application
+
+This message is send by the DLT user library once per application to unregister the application from the DLT daemon.
+It contains the following information:
+
+* The application id of the application to be unregistered
+* The process id of the process using the DLT user library.
+
+==== User Message: Register Context
+
+This message is send by the DLT user library once for each context which should be registered to the DLT daemon.
+It contains the following information:
+
+* The application id of the application to be registered
+* The context id of the application to be registered
+* Each created context is stored with its associated information in a dynamically growing array in the DLT user library. The index in this array is send.
+* The process id of the process using the DLT user library. This information is required, if the DLT daemon wants to send something to the DLT user library.
+* The initial log level of the context
+* The initial trace status of the context
+* The length of the following description.
+* The context description.
+
+==== User Message: Unregister Context
+
+This message is send by the DLT user library once for each context which should be unregistered from the DLT daemon.
+It contains the following information:
+
+* The application id of the application to be unregistered
+* The context id of the application to be unregistered
+* The process id of the process using the DLT user library.
+
+==== User Message: Log
+
+This is the standard log/trace message send by the DLT user library to the DLT daemon.
+It contains the following information:
+
+* A standard DLT message header as specified in the AUTOSAR R4.0 DLT standard.
+* An extended DLT message header as specified in the AUTOSAR R4.0 DLT standard.
+* The payload of the DLT message
+
+==== User Message: Overflow
+
+This message is send from the DLT user library to the DLT daemon, if there was an overflow during writing to the DLT daemon named pipe.
+It contains no further information.
+
+==== User Message: Application Log Level and Trace Status
+
+This message is send from the DLT user library to the DLT daemon, when the overall Log Level and Trace Status for the whole DLT application should be set from within the DLT application.
+It contains the following information:
+
+* The application id
+* The Log Level to be set for the whole application
+* The Trace Status to be set for the whole application
+
+==== User Message: Log Level
+
+If the log level or trace status is changed, or initialized, this message is send from the DLT daemon to the DLT user library to store the current log level and trace status for filtering in the DLT user library.
+
+It contains the following information:
+
+* The new set log level
+* New set trace status.
+* Each created context is stored with its associated information in a dynamically growing array in the DLT user library. The index in this array is send.
+
+==== User Message: Injection
+
+This message is send from the DLT daemon to the DLT user library, if an injection message was received by the DLT daemon from a DLT client. Via the context, the appropriate application and its named pipe can be identified. The injection message is then passed to this named pipe.
+
+It contains the following information:
+
+* Each created context is stored with its associated information in a dynamically growing array in the DLT user library. The index in this array is send.
+* Service ID of the injection message
+* Length of the following injection message
+* The contents of the injection message
+
+=== DLT daemon: User message handling
+
+Following things occur for the received DLT user messages:
+
+* DLT_USER_MESSAGE_REGISTER_APPLICATION
+** Add all information about application to a local application array (dynamically growing in a predefined step size (DLT_DAEMON_APPL_ALLOC_SIZE, typically 500)). The array is always being kept sorted (via qsort()). Finding entries in this array is done by a binary search (via bsearch()).
+** Open named pipe to DLT application using the DLT user library with process id <PID>. The name of the pipe is /tmp/dlt<PID>
+* DLT_USER_MESSAGE_UNREGISTER_APPLICATION
+** Remove all information about this application from local application array, and remove all information of all contexts belonging to this application from local context array. The arrays are always being kept sorted, without empty entries in between. Dynamically shrinking of this array is NOT implemented.
+* DLT_USER_MESSAGE_REGISTER_CONTEXT
+** Add all information about context to local context array (dynamically growing in a predefined step size (DLT_DAEMON_CONTEXT_ALLOC_SIZE, typically 1000)). The array is always being kept sorted (via qsort()). Finding entries in this array is done by a binary search (via bsearch()).
+** Send log level and trace status to DLT user library for this context. Therefore, the DLT_USER_MESSAGE_LOG_LEVEL is used.
+** Create and send DLT control message response "get log info" for this application and context to all connected DLT clients, if requested (-r option during startup of DLT daemon).
+* DLT_USER_MESSAGE_UNREGISTER_CONTEXT
+** Remove all information about this context from local context array. The array is always being kept sorted, without empty entries in between. Dynamically shrinking of this array is NOT implemented.
+* DLT_USER_MESSAGE_OVERFLOW
+** Set internal flag for overflow.
+** Create and send DLT control message response overflow to all connected TCP connections, and optionally to serial device, if connected. If the message was sent, reset the internal flag for overflow.
+* DLT_USER_MESSAGE_LOG
+** Overwrite ECU id, if requested
+** Set storage header
+** Check for filters of message, if no filter is set, or filter is matching:
+*** Possibly display message as specified in the options.
+**** Whole message display in hex
+**** Whole message display in ASCII
+**** Show message headers only
+*** Store message to output file
+*** Set serial header in front of message, if specified.
+*** Create and try to send DLT message to all DLT clients connected via TCP connection, and optionally via serial device.
+*** If the message could not be sent, store the message to a local ring buffer. The ring buffer internally uses a variable length for the buffered elements, and therefore uses the memory available for the buffer the best way possible. If the buffer is full, the oldest messages are silently discarded, until there is enough space for the message to be stored in the ring buffer.
+* DLT_USER_MESSAGE_APP_LL_TS
+** For all contexts belonging to the specified application:
+*** Set specified log level
+*** Set specified trace status
+*** Send specified log level and trace status to DLT client library
+
+=== DLT daemon: Control message handling
+
+If the DLT daemon receives a control message request from a DLT client, it handles it in the following way. First the service id of the message is detected, and if it is no injection message, the following things occur:
+
+* DLT_SERVICE_ID_SET_LOG_LEVEL
+** Check if received log level is other then already set log level. If yes:
+*** Store new log level to local array.
+*** Send new log level to DLT user library for this context. Therefore, the DLT_USER_MESSAGE_LOG_LEVEL is used.
+** Send DLT control response to DLT client, with status of operation.
+* DLT_SERVICE_ID_SET_TRACE_STATUS
+** Check if received trace status is other then already set trace status. If yes:
+*** Store new trace status to local array.
+*** Send new trace status to DLT user library for this context. Therefore, the DLT_USER_MESSAGE_LOG_LEVEL is used.
+** Send DLT control response to DLT client, with status of operation.
+* DLT_SERVICE_ID_GET_LOG_INFO
+** Create answer message for DLT control response. All kinds of requests are supported:
+*** Application/Context:
+**** All applications and all contexts
+**** One application and all of its contexts
+**** One application with one context.
+*** Request type (as specified in the AUTOSAR DLT Standard, 1 and 2 are not specified):
+**** 3: Application ID, Context ID
+**** 4: Application ID, Context ID, Log Level
+**** 5: Application ID, Context ID, Trace Status
+**** 6: Application ID, Context ID, Log Level, Trace Status
+**** 7: Application ID, Context ID, Log Level, Trace Status, Description
+** Answer is of the corresponding type 3-7, or of type 8 (no matching context ids found), or of type 2 (error).
+** Send DLT control response answer to DLT client.
+* DLT_SERVICE_ID_GET_DEFAULT_LOG_LEVEL
+** Send DLT control response with default log level to DLT client.
+* DLT_SERVICE_ID_STORE_CONFIG
+** Store configuration files with currently registered application ids and context ids as well as currently set log levels and trace statuses to configuration files. If these files exists, they will be read in when the DLT daemon is started next time.
+** Send DLT control response to DLT client.
+* DLT_SERVICE_ID_RESET_TO_FACTORY_DEFAULT
+** Delete the stored configuration files, if they exists.
+** Set default log level and trace status to initial values, and inform all applications using the default log level and trace status about the new defaults.
+** Send DLT control response to DLT client.
+* DLT_SERVICE_ID_SET_COM_INTERFACE_STATUS
+** Send DLT control response "Not supported" to DLT client
+* DLT_SERVICE_ID_SET_COM_INTERFACE_MAX_BANDWIDTH
+** Send DLT control response "Not supported" to DLT client
+* DLT_SERVICE_ID_SET_VERBOSE_MODE
+** Send DLT control response "Not supported" to DLT client
+* DLT_SERVICE_ID_SET_MESSAGE_FILTERING
+** Send DLT control response "Not supported" to DLT client
+* DLT_SERVICE_ID_SET_TIMING_PACKETS
+** Set flag to start/stop sending of timing messages in thread.
+** Send DLT control response to DLT client.
+* DLT_SERVICE_ID_GET_LOCAL_TIME
+** Send DLT control response with local time to DLT client.
+* DLT_SERVICE_ID_USE_ECU_ID
+** Send DLT control response "Not supported" to DLT client
+* DLT_SERVICE_ID_USE_SESSION_ID
+** Send DLT control response "Not supported" to DLT client
+* DLT_SERVICE_ID_USE_TIMESTAMP
+** Send DLT control response "Not supported" to DLT client
+* DLT_SERVICE_ID_USE_EXTENDED_HEADER
+** Send DLT control response "Not supported" to DLT client
+* DLT_SERVICE_ID_SET_DEFAULT_LOG_LEVEL
+** Check if received default log level is other than already stored default log level. If yes:
+*** Store new default log level to internal structure.
+*** Send a DLT_USER_MESSAGE_LOG_LEVEL to all DLT clients containing the new default log level, which uses a context which is set to default log level.
+** Send DLT control response to DLT client, with status of operation.
+* DLT_SERVICE_ID_SET_DEFAULT_TRACE_STATUS
+** Check if received default trace status is other than already stored default trace status. If yes:
+*** Store new default trace status to internal structure.
+*** Send a DLT_USER_MESSAGE_LOG_LEVEL to all DLT clients containing the new default trace status, which uses a context which is set to default trace status.
+** Send DLT control response to DLT client, with status of operation.
+* DLT_SERVICE_ID_GET_SOFTWARE_VERSION
+** Send DLT control response containing a software version string to DLT Client.
+** The software version string contains:
+*** the package version of the package dltv2, e.g. "2.0.0"
+*** the package status of the package dltv2, e.g. "alpha, beta, final"
+*** the overall subversion revision number for the package dltv2, e.g. "2300"
+* DLT_SERVICE_ID_MESSAGE_BUFFER_OVERFLOW
+** Try to send DLT control response containing the status of the internal flag for overflow. If the message could be send, reset the internal flag for overflow.
+
+For handling of the injection message, the following steps occur:
+
+* Create new user message DLT_USER_MESSAGE_INJECTION from received DLT control request message, and send this user message to the DLT application using the DLT user library.
+
+=== Mapping to files
+
+Here is a description, how the whole project is structured and which files exists.
+The following table shows a top level view of the available Git repositories:
+
+[options="header"]
+|==============================================================================================
+| Directory | Description
+| dlt | | DLT Daemon and Library implementation; command line utilities, examples and test programs
+| dlt_viewer | | DLT Client GUI (DLT Viewer): QT based implementation
+|==============================================================================================
+
+As this document has the focus on the DLT Daemon and the DLT user library, only the "dlt" directory is introduced in more detail:
+
+[options="header"]
+|==============================================================================================
+| Directory | Description
+| doc | | Documentation
+| include | | Include files, installed on target
+| package | | Packaging support files
+| src | | Source Code
+| src | shared | Shared source code (between DLT daemon and DLT user library)
+| src | adaptor | Adaptors to DLT daemon:dlt-adaptor-stdin (for connection over stdin) dlt-adaptor-udp (for connection over UDP)
+| src | console | Console utilities: dlt-receive and dlt-convert
+| src | daemon | DLT Daemon
+| src | example | Examples for usage of the DLT user library:dlt-example-user (Macro IF) anddlt-example-user-func (Function IF) andwintestclient (MS Windows based test client)
+| src | lib | DLT library functions
+| src | tests | Test programs:dlt-test-client and dlt-test-user for automatic tests, dlt-test-stress for stress tests, dlt-test-internal for internal tests
+| src | winclientlib | MS Windows implementation of a client library
+| testscripts | | Several supporting scripts
+|==============================================================================================
+
+The DLT daemon implementation uses the following files, besides DLT functions from files from the shared directory:
+
+[options="header"]
+|==============================================================================================
+| File | Description
+| dlt-daemon.c | DLT daemon implementation
+| dlt-daemon.h | Header file for dlt-daemon.c
+| dlt-daemon_cfg.h | Compile time configuration for DLT daemon, Part1
+| dlt_daemon_common.c | Supporting functions for a DLT daemon implementation
+| dlt_daemon_common.h | Header file for dlt_daemon_common.c
+| dlt_daemon_common_cfg.h | Compile time configuration for DLT daemon, Part2
+|==============================================================================================
+
+The DLT user library contains the following files:
+
+[options="header"]
+|==============================================================================================
+| File | Description
+| dlt_user.c | Implementation of functions, available via the DLT user library interface.
+| dlt_user_cfg.h | Compile time configuration for dlt_user.c
+| dlt_client.c | Functions required for DLT Client implementations
+| dlt_client_cfg.h | Compile time configuration for dlt_client.c
+|==============================================================================================
+
+The shared directory contains the following files:
+
+[options="header"]
+|==============================================================================================
+| File | Description
+| dlt_common.c | Common helper functions, such as:
+- Print functions for DLT messages
+- Functions for handling DLT Ids
+- Filter functions
+- DLT message handling functions
+- Functions for handling DLT files
+- DLT receiver functions
+- Log handling
+- Ringbuffer functions
+- Setting and checking of storage header
+| dlt_common_cfg.h | Compile time configuration for dlt_common.c
+| dlt_user_shared.c | Shared functions, required by the DLT daemon and the DLT user library, such as:
+- Setting and checking the user header
+- Sending DLT messages over named pipes (FIFOs)
+| dlt_user_shared.h | Header file for dlt_user_shared.c
+| dlt_user_shared_cfg.h | Compile time configuration for dlt_user_shared.c
+|==============================================================================================
+
+The public available include directory contains the following header files:
+
+|==============================================================================================
+| File | Description
+| dlt.h | Overall include file, includes dlt_common.h and dlt_user.h
+| dlt_common.h | Include file for dlt_common.c
+| dlt_user.h | Include file for dlt_user.c, contains the "User API" functions
+| dlt_user_macros.h | Include file for dlt_user.c, contains the "User API" macros
+| dlt_client.h | Include file for dlt_client.c
+| dlt_protocol.h | DLT protocol specfic definitions and macros
+| dlt_types.h | Definition of types, must be adapted to the target architecture and compiler toolchain.
+|==============================================================================================
+
+=== Description of used structures in implementation
+
+The following important structures are used in the DLT Daemon and DLT User Library:
+
+[options="header"]
+|==============================================================================================
+| Structure | Description
+| DltDaemonFlags | Flags and values, set over command line during start-up of DLT daemon
+| DltDaemonLocal | Global variables of the DLT Daemon, grouped together in a struct
+| DltDaemon | Parameters of the DLT daemon
+| DltDaemonApplication | Parameters of an application, used within DLT daemon
+| DltDaemonContext | Parameters of a context, used within DLT daemon
+| DltUserControlMsg... | User control messages
+| DltContext | Each context is represented with this structure
+| DltContextData | Temorary used structure for constructing a log message
+| DltUserInjectionCallback | One entry in dynamic callback table for callback function
+| dlt_ll_ts_type | Table managing all contexts (and loglevels and trce statuses) within DLT user library, contains dynamicly growing array with "DltUserInjectionCallback" entries
+| DltUser | Parameters for DLT user library application, contains dynamically growing array with "dlt_ll_ts_type" entries
+| DltStorageHeader | Storage header
+| DltStandardHeader | Structure for standard header of a DLT message |
+| DltStandardHeaderExtra | Structure for standard header extra fields of a DLT message
+| DltExtendedHeader | Structure for extended header of a DLT message
+| DltService... | Structures for control messages (requests and responses)
+| DltFilter | Structure to store filter parameters
+| DltMessage | Structure to organize a DLT message, includes pointers to DltStorageHeader, DltStandardHeader, DltStandardHeaderExtra, and DltExtendedHeader, data of message is stored within a private buffer within this structure
+| DltFile | Structure to organize access to a DLT File
+| DltReceiver | Structure to organize the receiving of data
+| DltRingbuffer | Structure to organize a ring buffer
+|==============================================================================================
+
+==== Implementation specifics
+
+* The following preconditions were given prior to implementation:
+** C-only implementation for the DLT daemon and the DLT user library
+** Implementation of common functions, which can be used in a command line utility as well as in an Graphical UI
+** Implementation of C+\+ like classes in C, see dlt_common.c and dlt_common.h
+* The current implementation of the DLT daemon and DLT user library is only tested with gcc under Ubuntu 9.10/10.04 on Intel HW.
+* It is assumed that packed structs are always stored in memory in the order specified within the packed struct.
+* The implementation is multithread safe.
+* Initialize DLT application and contexts, then forking and using the forked process, will lead to unclear behavior (or in worst case to a crash), as the forked process uses another process id as the parent process. Instead, initialize the DLT application and contexts in the forked process.
+* Calling of DLT logging and tracing functions within a callback function for injections is not supported, and will lead to an unclear behavior.
+
diff --git a/doc/dlt_user_manual.txt b/doc/dlt_user_manual.txt
new file mode 100644
index 0000000..d6f02a4
--- /dev/null
+++ b/doc/dlt_user_manual.txt
@@ -0,0 +1,327 @@
+DLT User Manual
+===============
+Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
+0.0.1, 2012/10/10: Initial version
+
+image::images/genivi_chrome_1_transparent.png[width=128]
+
+== Purpose
+This document specifies the usage of the DLT daemon.
+The DLT daemon is the central place where logs and traces are gathered from different applications, stored temporarily or permanently and transferred to a DLT client application, which can run directly on the GENIVI system or more likely on a external tester device.
+The DLT daemon component is based on the AUTOSAR 4.0 standard DLT.
+
+== Overview
+The DLT daemon is the central component in GENIVI, which gathers all logs and traces from the DLT user applications. The logs and traces are stored optionally directly in a file in the ECU. The DLT daemon forwards all logs and traces to a connected DLT client.
+The DLT client can send control messages to the daemon, e.g. to set individual log levels of applications and contexts or get the list of applications and contexts registered in the DLT daemon.
+
+The SW components of DLT:
+
+* dlt-daemon
+* dlt-system
+* dlt-adaptor-stdin
+* dlt-adaptor-udp
+* dlt-convert
+* dlt-receive
+
+The SW components of DLT for testing:
+
+* dlt-example-user
+* dlt-example-user-func
+* dlt-example-filetransfer
+* dlt-test-filetransfer
+* dlt-test-stress-user
+* dlt-test-client
+* dlt-test-stress-client
+* dlt-test-multi-process-client
+* dlt-test-stress
+* dlt-test-multi-process
+* dlt-test-user
+
+== DLT daemon
+
+=== Features
+
+* Message injection callback
+** The Viewer can send a message to an application. The application has to register an injection callback.
+* Support for multiple applications and multiple contexts organized in a hierarchy
+* Support for different interfaces between daemon and viewer (
+* Binary transport of messages (TCP/IP, Serial)
+* Verbose and none-verbose mode support
+* System log-level and individual log-levels for contexts
+* Adapters to connect Linux log facilities, e.g. syslog (planned journal)
+* User library and Daemon has a temporary internal buffer
+* Trace message (network message) support
+* The viewer writes messages from several sources into a single trace file
+* File transfer + compression for small files, e.g., screenshots of HMI
+* Many configuration options
+* Viewer supports plug-ins\* \*(SDK + example code) e.g. MOST message formatting
+* Daemon or application mode
+** The DLT daemon can be started in daemon mode, which is the normal use case. For testing purpose it can also be started in a standard application mode. In application mode all output is displayed in the console. In daemon mode output is done to the syslog daemon.The daemon mode is needed specially in System V init start-up system.
+* Offline Trace
+** Optional an offline trace memory can be configured in the DLT daemon configuration. The offline trace is stored locally in the file system. The directory of the offline trace can be configured.
+* Trace Mode
+** A API is provided in the DLT library to change the trace mode. If the trace mode is changed, the trace mode is stored persistently in the runtime configuration.
+The following modes are possible:
+*** trace off
+*** online trace only (Default)
+*** offline trace only
+*** online and offline trace
+* Start-up Trace
+** During star-up the logging data is stored in a temporary buffer, until the first client is connected. This feature is only available, if no serial connection is configured and the trace mode is "online trace only".
+
+=== Command line interface
+See Manpage dlt-daemon(1).
+
+=== Configuration
+See Manpage dlt.conf(5).
+
+== DLT system logger
+
+=== Overview
+The dlt-system application provides the following features:
+
+* DLT file-transfer manager
+* Syslog Adapter over UDP
+* Logging of file content from filesystem
+* Logging of files from proc filesystem of processes
+
+All the configuration is done in the file /etc/dlt-system.conf.
+
+=== DLT Filetransfer
+The DLT file-transfer manager can control up to two directories, if they contain any files. When a new file is detected in theses directories, the file transfer over DLT is started for this file. When the file transfer is finished, a configurable time is waited, until the file is deleted and the transfer of the next file is started. The first file transfer starts after a configurable time after dlt-system is started.
+
+Flow control is used to control the amount of data which is sent at once over DLT. Currently the fill level of the shared memory is checked. When 50% of fill level is reached no new data is sent again, until the level falls under 50% again.
+
+Typical Use cases are file transfer of screenshots or core dump files.
+
+=== Syslog adapter
+The syslog adapter provides a UDP port, to which the syslog daemon can send each syslog message. The syslog configuration must be changed to do this. The used UDP port can be configured.
+
+=== Logging of files
+Every file in the filesystem can be logged over DLT. The files can be logged only once during start-up or periodically after a defined time. Several files can be configured to be logged.
+
+=== Logging of files from proc filesystem
+Every file in the proc filesystem of a process can be logged. Theses files can be logged only once during start-up or periodically after a defined time. A specific process can be selected or all processes at once.
+
+=== Command line interface
+See Manpage dlt-system(1).
+
+=== Configuration
+See Manpage dlt-system.conf(5).
+
+== DLT command line tools
+Three command line tools are provided together with DLT daemon implementation.
+
+These tools are:
+
+* Data logger: dlt-receive
+* Converter: dlt-convert
+* Configuration: dlt-control (planned)
+
+
+=== dlt-receive
+
+==== Overview
+dlt-receive is a command line tool to connect to the dlt-daemon and receive logs and display them in the console or store them in a file.
+
+==== Command line interface
+See Manpage dlt-receive(1).
+
+=== dlt-convert
+
+==== Overview
+The dlt-convert console utility is used to read DLT files, print DLT messages in different formats (ASCII, hex, mixed, headers only) and store the messages again. Filters can be used to filter messages. Ranges and output file can be used to cut DLT files. Two files and output file can be used to join DLT files.
+
+==== Command line interface
+See Manpage dlt-convert(1).
+
+== DLT adaptors
+The DLT adaptors are used to interface legacy linux applications with the DLT daemon. Therefore, there are two adaptors:
+
+* dlt-adaptor-stdin for input received from stdin
+* dlt-adaptor-udp for input received from a specific udp port
+
+As command line parameters, the application id and context id can be specified individually for each instance of these programs. These id's are a character string consisting of up to 4 characters. Empty ids are not allowed and will be replaced with a default id. If not specified, the default id's will also be taken.
+
+=== dlt-adaptor-stdin
+The dlt-adaptor-stdin is a small external program for forwarding input from stdin to DLT daemon, and can be used for e.g. sending DBUS messages to the dlt daemon using the program dbus-monitor:
+
+$ dbus-monitor | dlt-adaptor-stdin
+
+=== dlt-adaptor-udp
+The dlt-adaptor-udp is a small external program for forwarding received UDP messages to DLT daemon, and can be used for e.g. sending syslog messages to the DLT daemon. Therefore a syslog daemon called syslog-ng is necessary. This syslog daemon must be configured to send the syslog messages to a specific UDP port. For configuration of this syslog daemon, see the documentation for syslog-ng.
+
+This tool is already integrated into dlt-system.
+
+== DLT library
+To use DLT from an application, the application has to link again the DLT library. When the DLT daemon is installed on the system , there will a shared library with the name
+libdlt.so which provides the interface for applications to get a connection to the DLT daemon.
+The library path and include path must be set in the build environment prior to building a program using the shared dlt library. By default, the include file "dlt.h" is located in a directory called "dlt/" within the standard include directory.
+
+=== Using DLT with cmake
+To use DLT with cmake, the following lines are the important ones:
+
+----
+pkg_check_modules(DLT REQUIRED automotive-dlt)
+----
+
+to INCLUDE_DIRECTORIES, add
+
+----
+${DLT_INCLUDE_DIRS}
+----
+
+and to TARGET_LINK_LIBRARIES:
+
+----
+${DLT_LIBRARIES}
+----
+
+=== Logging instruction
+
+==== Include the dlt header file:
+
+----
+#include <dlt/dlt.h>
+----
+
+==== Create logging context (place it beneath the define section):
+
+----
+DLT_DECLARE_CONTEXT(myContext);
+----
+
+==== Register the application and the context in main:
+
+----
+int main(int argc, const char\* argv\[\])
+{
+DLT_REGISTER_APP("LOG","Test Application for Logging");
+
+DLT_REGISTER_CONTEXT(mycontext,"TEST","Test Context for Logging");
+...
+
+}
+----
+
+Important note: If your application uses fork(), you may not call DLT_REGISTER_APP before fork(). And fork() should never be called after DLT_REGISTER_APP. This is because of state information and inter process communication channel to daemon would be copied to new process, but threads would be not.
+
+==== Use one of the DLT macros or the DLT function interface:
+Here we use the macro interface of DLT
+
+----
+DLT_LOG(mycontext,DLT_LOG_WARN,DLT_INT(5),DLT_STRING("This is a warning"));
+DLT_LOG(mycontext,DLT_LOG_INFO,DLT_INT(5),DLT_STRING("But this only information"));
+----
+
+==== Unregister the application and the context which are registered
+
+----
+DLT_UNREGISTER_CONTEXT(mycontext);
+DLT_UNREGISTER_APP();
+----
+
+=== Logging example
+
+* gedit dltdemo.c &
+* Copy the example code below into dltdemo.c
+* gcc -o dltdemo -ldlt dltdemo.c
+* rolf.haimerl|./dltdemo
+
+.DLT - Hello world
+----
+#include <stdio.h>
+#include <dlt/dlt.h>
+DLT_DECLARE_CONTEXT(mycontext);
+int main()
+{
+ int num;
+
+ DLT_REGISTER_APP("MYAP","My Application");
+ DLT_REGISTER_CONTEXT(mycontext,"MYCT", "My Context");
+
+ printf("Hello world");
+
+ for(num=0;num<10;num++) {
+ DLT_LOG(mycontext,DLT_LOG_INFO,DLT_STRING("Hello world"),DLT_INT(num));
+ sleep(1);
+ }
+
+ DLT_UNREGISTER_CONTEXT(mycontext);
+ DLT_UNREGISTER_APP();
+ return 0;
+}
+----
+
+=== API
+Two types of DLT user interfaces are provided to applications. The first interface is a macro based interface, which makes it very easy and very pretty coding to use DLT. The second interface is a functional interface, which provides an object oriented C interface for applications.
+
+The doxygen documentation of the dlt-daemon contains more informations about functional/macro based interfaces.
+
+See INSTALL.txt how to generate doxygen documentation.
+
+=== DLT macro interface
+The DLT macro interface provides a very easy to use interface. It is very easy to log a flexible size of parameters into a single log in a single source code line.
+
+[options="header"]
+|==============================================================================================
+| Command | Description
+| #include <dlt/dlt.h> | The first thing to do is to include the standard header file of DLT
+| DLT_DECLARE_CONTEXT(mycontext); | The next thing is to create instances of each used context of an application. This has to be done outside of the source code before using any context.
+| DLT_IMPORT_CONTEXT(mycontext); | If a context is used a second time in another software module, the following macro has to be called to get access to the context.
+| DLT_REGISTER_APP("LOG","Test Application for Logging"); | In the next step in the initialization of the application the application must be registered in the DLT daemon. The identifier of the application, here "LOG", has a maximum of four characters.
+| DLT_REGISTER_CONTEXT(mycontext,"TEST","Test Context for Logging"); | Then each context has to be registered in the DLT daemon. The call of this macro is a must, so that the DLT daemon and client are able to set the log level of the context in the application. The identifier of the context, here "TEST", has a maximum of four characters. A default log level and default trace status is used for this context.
+| DLT_REGISTER_CONTEXT(mycontext,"TEST","Test Context for Logging",DLT_LOG_VERBOSE,DLT_TRACE_STATUS_ON); | As an alternative, a specific log level and trace status can be provided during registration of the context.
+| | Choose now between verbose mode and non-verbose mode:
+| DLT_LOG(mycontext ,DLT_LOG_WARN, DLT_INT(num),DLT_STRING(text)); | For verbose mode (default): After registration a context can be used to send log messages to the DLT daemon. The DLT_LOG macro has to be called with the used log level of the log messages and a variable list of parameters. A complete list of parameters you will find in the Addendum API specification.
+| DLT_LOG_INT(mycontext ,DLT_LOG_WARN, num); DLT_LOG_STRING_INT(mycontext ,DLT_LOG_WARN, text, num); | As an alternative, the high level logging macros can be used which exists for special combination of parameters. A complete list you will find in the Addendum API specification.
+| DLT_LOG_ID(mycontext,DLT_LOG_WARN,msgid,DLT_INT(num),DLT_STRING(text)); | For non-verbose mode: After registration a context can be used to send log messages to the DLT daemon. The DLT_LOG_ID macro has to be called with the used log level of the log messages, the message id and a variable list of parameters. A complete list of parameters you will find in the API specification.
+| int injection_callback(uint32_t service_id, void \*data, uint32_t length) | The high-level logging macros are not available in non-verbose mode. An optional feature to use is the message injection feature. The DLT client can send user defined messages to an application, identified by a service id (e.g., 0xfff). If such a message is received by the application, a callback is called. The callback has the format:
+| DLT_REGISTER_INJECTION_CALLBACK(mycontext, 0xFFF, injection_callback); | To register the callback within the application, the following call must be made:
+| DLT_TRACE_NETWORK(mycontext, DLT_NW_TRACE_CAN, headerlen, header, payloadlen, payload); | Furthermore, it is also possible to trace network messages. The interface, here DLT_NW_TRACE_CAN, the length of the header data and a pointer to the header data, the length of the payload data and a pointer to the payload data, must be specified. If no header or payload is available, the corresponding length must be set to 0, and the corresponding pointer must be set to NULL.
+| DLT_UNREGISTER_CONTEXT(mycontext); DLT_UNREGISTER_APP(); | After using the application and contexts, they must be unregistered from the DLT daemon. First all contexts, then the application must be unregistered.
+|==============================================================================================
+
+=== DLT functional interface and example
+The DLT functional interface provides a very easy to use interface. The C interface has an object oriented style.
+
+[options="header"]
+|==============================================================================================
+| Command | Description
+| #include <dlt/dlt.h> | The first thing to do is to include the standard header file of DLT:
+| DltContext mycontext; | The next thing is to create an instance of each used context of an application. This has to be done outside of the source code before using any context. The name of the instance can be defined by the user.
+| DltContextData mycontextdata; | Additionally, a data buffer used to construct the DLT log messages must be created:
+| dlt_register_app("LOG","Test Application for Logging"); | In the next step in the initialization of the application the application must be registered in the DLT daemon. The identifier of the application, here "LOG", has a maximum of four characters.
+| dlt_register_context(&mycontext,"TEST","Test Context for Logging"); | Then each context has to be registered in the DLT daemon. The call of this function is a must, so that the DLT daemon and the client are able to set the log level of the context in the application. The identifier of the context, here "TEST", has a maximum of four characters. A default log level and default trace status is used for this context.
+| dlt_register_context(&mycontext,"TEST","Test Context for Logging",DLT_LOG_VERBOSE,DLT_TRACE_STATUS_ON); | As an alternative, a specific log level and trace status can be provided during registration of the context.
+| | Choose now between verbose mode and non-verbose mode:
+| dlt_verbose_mode(); | For verbose mode (default): Optionally switch to verbose mode by calling the function dlt_verbose_mode:
+| if (dlt_user_log_write_start(&mycontext,&mycontextdata,DLT_LOG_WARN))
+{
+ dlt_user_log_write_int(&mycontextdata,num);
+ dlt_user_log_write_string(&mycontextdata,text);
+ dlt_user_log_write_finish(&mycontextdata);
+} | After registration a context can be used to send log messages to the DLT daemon. The dlt_user_log_write function has to be called first with a pointer to the context, a pointer to the data buffer and the used log level of the log messages. For each parameter added to the DLT log message a call to dlt_user_log_write_xxx has to be done. A complete list of parameters you will find in the Addendum API specification. Sending of the DLT message is done by calling dlt_user_log_write_finish.
+| dlt_log_int(&mycontext, DLT_LOG_WARN, num); dlt_log_string_int(&mycontext, DLT_LOG_WARN, text, num); | As an alternative, the high level logging functions can be used which exists for special combination of parameters. A complete list you will find in the Addendum API specification.
+| dlt_nonverbose_mode(); | For non-verbose mode : Switch to non-verbose mode by calling the function dlt_nonverbose_mode:
+| if (dlt_user_log_write_start_id(&mycontext,&mycontextdata,DLT_LOG_WARN,msgid))
+{
+ dlt_user_log_write_int(&mycontextdata,num);
+ dlt_user_log_write_string(&mycontextdata,text);
+ dlt_user_log_write_finish(&mycontextdata);
+} | After registration a context can be used to send log messages to the DLT daemon. The dlt_user_log_write_start_id function has to be called first with a pointer to the context, a pointer to the context data, the used log level of the log messages and the message id. For each parameter added to the DLT log message a call to dlt_user_log_write_xxx has to be done. A complete list of parameters you will find in the Addendum API specification. Sending of the DLT message is done by calling dlt_user_log_write_finish.
+| | The high-level logging functions are not available in non-verbose mode.
+| int injection_callback(uint32_t service_id, void \*data, uint32_t length) | An optional feature to use is the message injection feature. The DLT client can send user defined messages to an application, identified by a service id (e.g. 0xfff). If such a message is received by the application, a callback is called. The callback has the format: |
+| dlt_register_injection_callback(&mycontext, 0xFFF, injection_callback); | To register the callback within the application, the following call must be made: |
+| dlt_user_trace_network(&mycontext, DLT_NW_TRACE_CAN, headerlen, header, payloadlen, payload); | Furthermore, it is also possible to trace network messages. The interface, here DLT_NW_TRACE_CAN, the length of the header data and a pointer to the header data, the length of the payload data and a pointer to the payload data, must be specified. If no header or payload is available, the corresponding length must be set to 0, and the corresponding pointer must be set to NULL.
+| dlt_unregister_context(&mycontext);
+dlt_unregister_app();
+dlt_free(); | After using the application and contexts, they must be unregistered from the DLT daemon. First all contexts, then the application must be unregistered.
+|==============================================================================================
+
+== Addendum
+Implementation specifics
+
+* The implementation is multithread safe.
+* Initialize DLT application and contexts, then forking and using the forked process, will lead to unclear behavior (or in worst case to a crash), as the forked process uses another process id as the parent process. Instead, initialize the DLT application and contexts in the forked process.
+
diff --git a/doc/images/dlt_architecture.png b/doc/images/dlt_architecture.png
new file mode 100755
index 0000000..2b00645
--- /dev/null
+++ b/doc/images/dlt_architecture.png
Binary files differ
diff --git a/doc/images/dlt_message_flow.png b/doc/images/dlt_message_flow.png
new file mode 100755
index 0000000..00ac81f
--- /dev/null
+++ b/doc/images/dlt_message_flow.png
Binary files differ
diff --git a/doc/images/dlt_overview.png b/doc/images/dlt_overview.png
new file mode 100755
index 0000000..46437af
--- /dev/null
+++ b/doc/images/dlt_overview.png
Binary files differ
diff --git a/doc/images/genivi_chrome_1_transparent.png b/doc/images/genivi_chrome_1_transparent.png
new file mode 100755
index 0000000..4594235
--- /dev/null
+++ b/doc/images/genivi_chrome_1_transparent.png
Binary files differ