diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2015-07-13 14:05:05 +0200 |
---|---|---|
committer | Dominik Holland <dominik.holland@pelagicore.com> | 2015-07-13 14:05:05 +0200 |
commit | e9ae177621d4cd005c92e16b50e03c9fd2d7d8b9 (patch) | |
tree | d65633f41734c66d9aadd058c9829e1db932ad60 /README.md | |
parent | e35ce70574d1f4e5b59ea1e2b69c88697f68e89a (diff) |
Added build instructions and a short example into the README file
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 00000000..24b933c5 --- /dev/null +++ b/README.md @@ -0,0 +1,44 @@ +# Qt Genivi Extras: Platform specific components for Genivi + +This repository is similar to qtwinextras or qtmacextras and contains specific components for Genivi based linux systems. + +Currently the only component it contains is a Qt Categorized Logging Binding towards Genivi DLT (Diagnostic Log and Trace) + +## How to build + + qmake + make + make install + + +## Depedencies + +This module has a dependency towards **dlt-daemon** (http://projects.genivi.org/diagnostic-log-trace/about) + +The dlt-daemon needs to be installed into the system and needs to be detectable by pkg-config. + +## Example Usage + +As QDlt is a binding for Qt Categorized Logging you first need to create you logging categories in the header: + + #include <QLoggingCategory> + + Q_DECLARE_LOGGING_CATEGORY(FOO) + Q_DECLARE_LOGGING_CATEGORY(BAR) + +In the source file you need to define your logging categories, but instead of using the normal Q_LOGGING_CATEGORY() macro you can use QDLT_LOGGING_CATEGORY() instead. + + #include <QtGeniviExtras/QtDlt> + + QDLT_REGISTER_APPLICATION("APP1", "Description for APP") + + QDLT_LOGGING_CATEGORY(FOO, "com.pelagicore.foo", "FOO", "FOO CATEGORY") + QDLT_LOGGING_CATEGORY(BAR, "com.pelagicore.bar", "BAR", "BAR CATEGORY") + + QDLT_FALLBACK_CATEGORY(FOO) + +As DLT works for the whole system it needs to know also a little bit more about your application, which can be done by using QDLT_REGISTER_APPLICATION() + +DLT is using 4 character based idenifiers, this identifier needs to be assigned to your application, as well as to every category you define. + +By using QDLT_FALLBACK_CATEGORY() you can define which DLT category is used when no Qt Category was set for loogging a message e.g. when qWarning(), qDebug() or qCritical() was used |