summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorChristoph Lipka <clipka@de.adit-jv.com>2018-12-20 14:58:19 +0100
committerChristoph Lipka <clipka@de.adit-jv.com>2018-12-21 10:23:41 +0100
commitdca8ab254aa0a687c32009079d85e4d8f960b213 (patch)
treee63b6a552fd9f61873892110a56a89ef354864cd /examples
parent0d0c74640c8b792db37cb9f884f89f7561ea551f (diff)
downloadDLT-daemon-dca8ab254aa0a687c32009079d85e4d8f960b213.tar.gz
Code beautification using uncrustify
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/example1/example1.c12
-rw-r--r--examples/example2/dlt_id.h2
-rw-r--r--examples/example2/example2.c27
-rw-r--r--examples/example3/dlt_id.h2
-rw-r--r--examples/example3/example3.c27
-rw-r--r--examples/example4/example4.c72
6 files changed, 69 insertions, 73 deletions
diff --git a/examples/example1/example1.c b/examples/example1/example1.c
index e6fea9f..2784a82 100644
--- a/examples/example1/example1.c
+++ b/examples/example1/example1.c
@@ -22,7 +22,7 @@
* License MPL-2.0: Mozilla Public License version 2.0 http://mozilla.org/MPL/2.0/.
*
* \file example1.c
-*/
+ */
/*******************************************************************************
@@ -54,15 +54,15 @@ DLT_DECLARE_CONTEXT(con_exa1);
int main()
{
- DLT_REGISTER_APP("EXA1","First Example");
+ DLT_REGISTER_APP("EXA1", "First Example");
- DLT_REGISTER_CONTEXT(con_exa1,"CON","First context");
+ DLT_REGISTER_CONTEXT(con_exa1, "CON", "First context");
- DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_STRING("Hello world!"));
+ DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_STRING("Hello world!"));
usleep(1000);
- DLT_UNREGISTER_CONTEXT(con_exa1);
+ DLT_UNREGISTER_CONTEXT(con_exa1);
- DLT_UNREGISTER_APP();
+ DLT_UNREGISTER_APP();
}
diff --git a/examples/example2/dlt_id.h b/examples/example2/dlt_id.h
index 7bfa4c7..488bf4a 100644
--- a/examples/example2/dlt_id.h
+++ b/examples/example2/dlt_id.h
@@ -15,7 +15,7 @@
* @licence end@
*/
-// generated file, do not edit
+/* generated file, do not edit */
#ifndef DLT_ID_H
#define DLT_ID_H
diff --git a/examples/example2/example2.c b/examples/example2/example2.c
index ccd4ff5..445f60a 100644
--- a/examples/example2/example2.c
+++ b/examples/example2/example2.c
@@ -22,7 +22,7 @@
* License MPL-2.0: Mozilla Public License version 2.0 http://mozilla.org/MPL/2.0/.
*
* \file example2.c
-*/
+ */
/*******************************************************************************
@@ -56,22 +56,21 @@ DLT_DECLARE_CONTEXT(con_exa2);
int main()
{
- int num;
+ int num;
- DLT_REGISTER_APP("EXA2","Third Example");
- DLT_REGISTER_CONTEXT(con_exa2,"CON","First context");
+ DLT_REGISTER_APP("EXA2", "Third Example");
+ DLT_REGISTER_CONTEXT(con_exa2, "CON", "First context");
- DLT_NONVERBOSE_MODE();
+ DLT_NONVERBOSE_MODE();
- for(num=0;num<10;num++)
- {
- DLT_LOG_ID(con_exa2,DLT_LOG_INFO,DLT_EXA2_CON_EXA2_ID1,DLT_INT32(12345678),DLT_STRING("Hello world 1!"));
- DLT_LOG_ID(con_exa2,DLT_LOG_ERROR,DLT_EXA2_CON_EXA2_ID2,DLT_INT32(87654321),DLT_STRING("Hello world 2!"));
- DLT_LOG_ID(con_exa2,DLT_LOG_WARN,DLT_EXA2_CON_EXA2_ID3,DLT_INT32(11223344),DLT_STRING("Hello world 3!"));
- usleep(1000);
- }
+ for (num = 0; num < 10; num++) {
+ DLT_LOG_ID(con_exa2, DLT_LOG_INFO, DLT_EXA2_CON_EXA2_ID1, DLT_INT32(12345678), DLT_STRING("Hello world 1!"));
+ DLT_LOG_ID(con_exa2, DLT_LOG_ERROR, DLT_EXA2_CON_EXA2_ID2, DLT_INT32(87654321), DLT_STRING("Hello world 2!"));
+ DLT_LOG_ID(con_exa2, DLT_LOG_WARN, DLT_EXA2_CON_EXA2_ID3, DLT_INT32(11223344), DLT_STRING("Hello world 3!"));
+ usleep(1000);
+ }
- DLT_UNREGISTER_CONTEXT(con_exa2);
+ DLT_UNREGISTER_CONTEXT(con_exa2);
- DLT_UNREGISTER_APP();
+ DLT_UNREGISTER_APP();
}
diff --git a/examples/example3/dlt_id.h b/examples/example3/dlt_id.h
index 149e22d..66f0684 100644
--- a/examples/example3/dlt_id.h
+++ b/examples/example3/dlt_id.h
@@ -15,7 +15,7 @@
* @licence end@
*/
-// generated file, do not edit
+/* generated file, do not edit */
#ifndef DLT_ID_H
#define DLT_ID_H
diff --git a/examples/example3/example3.c b/examples/example3/example3.c
index ced6632..d686ec1 100644
--- a/examples/example3/example3.c
+++ b/examples/example3/example3.c
@@ -22,7 +22,7 @@
* License MPL-2.0: Mozilla Public License version 2.0 http://mozilla.org/MPL/2.0/.
*
* \file example3.c
-*/
+ */
/*******************************************************************************
@@ -56,22 +56,21 @@ DLT_DECLARE_CONTEXT(con_exa3);
int main()
{
- int num;
+ int num;
- DLT_REGISTER_APP("EXA3","Third Example");
- DLT_REGISTER_CONTEXT(con_exa3,"CON","First context");
+ DLT_REGISTER_APP("EXA3", "Third Example");
+ DLT_REGISTER_CONTEXT(con_exa3, "CON", "First context");
- DLT_NONVERBOSE_MODE();
+ DLT_NONVERBOSE_MODE();
- for(num=0;num<10;num++)
- {
- DLT_LOG_ID(con_exa3,DLT_LOG_INFO,DLT_EXA3_CON_EXA3_ID1,DLT_INT32(12345678),DLT_CSTRING("Hello world 1!"));
- DLT_LOG_ID(con_exa3,DLT_LOG_ERROR,DLT_EXA3_CON_EXA3_ID2,DLT_INT32(87654321),DLT_CSTRING("Hello world 2!"));
- DLT_LOG_ID(con_exa3,DLT_LOG_WARN,DLT_EXA3_CON_EXA3_ID3,DLT_INT32(11223344),DLT_CSTRING("Hello world 3!"));
- usleep(1000);
- }
+ for (num = 0; num < 10; num++) {
+ DLT_LOG_ID(con_exa3, DLT_LOG_INFO, DLT_EXA3_CON_EXA3_ID1, DLT_INT32(12345678), DLT_CSTRING("Hello world 1!"));
+ DLT_LOG_ID(con_exa3, DLT_LOG_ERROR, DLT_EXA3_CON_EXA3_ID2, DLT_INT32(87654321), DLT_CSTRING("Hello world 2!"));
+ DLT_LOG_ID(con_exa3, DLT_LOG_WARN, DLT_EXA3_CON_EXA3_ID3, DLT_INT32(11223344), DLT_CSTRING("Hello world 3!"));
+ usleep(1000);
+ }
- DLT_UNREGISTER_CONTEXT(con_exa3);
+ DLT_UNREGISTER_CONTEXT(con_exa3);
- DLT_UNREGISTER_APP();
+ DLT_UNREGISTER_APP();
}
diff --git a/examples/example4/example4.c b/examples/example4/example4.c
index f4b1da0..59aef18 100644
--- a/examples/example4/example4.c
+++ b/examples/example4/example4.c
@@ -22,7 +22,7 @@
* License MPL-2.0: Mozilla Public License version 2.0 http://mozilla.org/MPL/2.0/.
*
* \file example4.c
-*/
+ */
/*******************************************************************************
@@ -54,55 +54,53 @@ DLT_DECLARE_CONTEXT(con_exa1);
int main()
{
- unsigned char buffer[256];
- int num;
+ unsigned char buffer[256];
+ int num;
- DLT_REGISTER_APP("EXA4","Fourth Example");
+ DLT_REGISTER_APP("EXA4", "Fourth Example");
- DLT_REGISTER_CONTEXT(con_exa1,"CON","First context");
+ DLT_REGISTER_CONTEXT(con_exa1, "CON", "First context");
- for(num=0;num<256;num++)
- {
- buffer[num] = num;
- }
+ for (num = 0; num < 256; num++)
+ buffer[num] = num;
- DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_STRING("DLT_RAW"));
- DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_RAW(buffer,256));
+ DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_STRING("DLT_RAW"));
+ DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_RAW(buffer, 256));
- uint8_t uint8data = 0x2a;
- DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_STRING("DLT_UINT8"));
- DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_UINT8(uint8data));
+ uint8_t uint8data = 0x2a;
+ DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_STRING("DLT_UINT8"));
+ DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_UINT8(uint8data));
- uint8_t hex8data = 0x1a;
- DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_STRING("DLT_HEX8"));
- DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_HEX8(hex8data));
+ uint8_t hex8data = 0x1a;
+ DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_STRING("DLT_HEX8"));
+ DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_HEX8(hex8data));
- uint16_t hex16data = 0x1ad3;
- DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_STRING("DLT_HEX16"));
- DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_HEX16(hex16data));
+ uint16_t hex16data = 0x1ad3;
+ DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_STRING("DLT_HEX16"));
+ DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_HEX16(hex16data));
- uint32_t hex32data = 0x1abcd3e4;
- DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_STRING("DLT_HEX32"));
- DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_HEX32(hex32data));
+ uint32_t hex32data = 0x1abcd3e4;
+ DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_STRING("DLT_HEX32"));
+ DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_HEX32(hex32data));
- uint64_t hex64data = 0x17b4ddcf34eabb2a;
- DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_STRING("DLT_HEX64"));
- DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_HEX64(hex64data));
+ uint64_t hex64data = 0x17b4ddcf34eabb2a;
+ DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_STRING("DLT_HEX64"));
+ DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_HEX64(hex64data));
- uint8_t bin8data = 0xe2;
- DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_STRING("DLT_BIN8"));
- DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_BIN8(bin8data));
- bin8data = 0x01;
- DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_STRING("DLT_BIN8"));
- DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_BIN8(bin8data));
+ uint8_t bin8data = 0xe2;
+ DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_STRING("DLT_BIN8"));
+ DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_BIN8(bin8data));
+ bin8data = 0x01;
+ DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_STRING("DLT_BIN8"));
+ DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_BIN8(bin8data));
- uint16_t bin16data = 0x1234;
- DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_STRING("DLT_BIN16"));
- DLT_LOG(con_exa1,DLT_LOG_INFO,DLT_BIN16(bin16data));
+ uint16_t bin16data = 0x1234;
+ DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_STRING("DLT_BIN16"));
+ DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_BIN16(bin16data));
usleep(1000);
- DLT_UNREGISTER_CONTEXT(con_exa1);
+ DLT_UNREGISTER_CONTEXT(con_exa1);
- DLT_UNREGISTER_APP();
+ DLT_UNREGISTER_APP();
}