Skip to content

Commit

Permalink
Code beautification using uncrustify
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Lipka <[email protected]>
  • Loading branch information
Christoph Lipka committed Dec 21, 2018
1 parent 0d0c746 commit dca8ab2
Show file tree
Hide file tree
Showing 131 changed files with 23,503 additions and 22,767 deletions.
12 changes: 6 additions & 6 deletions examples/example1/example1.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* License MPL-2.0: Mozilla Public License version 2.0 http://mozilla.org/MPL/2.0/.
*
* \file example1.c
*/
*/


/*******************************************************************************
Expand Down Expand Up @@ -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();
}
2 changes: 1 addition & 1 deletion examples/example2/dlt_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @licence end@
*/

// generated file, do not edit
/* generated file, do not edit */

#ifndef DLT_ID_H
#define DLT_ID_H
Expand Down
27 changes: 13 additions & 14 deletions examples/example2/example2.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* License MPL-2.0: Mozilla Public License version 2.0 http://mozilla.org/MPL/2.0/.
*
* \file example2.c
*/
*/


/*******************************************************************************
Expand Down Expand Up @@ -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();
}
2 changes: 1 addition & 1 deletion examples/example3/dlt_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @licence end@
*/

// generated file, do not edit
/* generated file, do not edit */

#ifndef DLT_ID_H
#define DLT_ID_H
Expand Down
27 changes: 13 additions & 14 deletions examples/example3/example3.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* License MPL-2.0: Mozilla Public License version 2.0 http://mozilla.org/MPL/2.0/.
*
* \file example3.c
*/
*/


/*******************************************************************************
Expand Down Expand Up @@ -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();
}
72 changes: 35 additions & 37 deletions examples/example4/example4.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* License MPL-2.0: Mozilla Public License version 2.0 http://mozilla.org/MPL/2.0/.
*
* \file example4.c
*/
*/


/*******************************************************************************
Expand Down Expand Up @@ -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();
}
6 changes: 3 additions & 3 deletions include/dlt/dlt.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* License MPL-2.0: Mozilla Public License version 2.0 http://mozilla.org/MPL/2.0/.
*
* \file dlt.h
*/
*/

/*******************************************************************************
** **
Expand Down Expand Up @@ -63,8 +63,8 @@
* $LastChangedRevision: 1670 $
* $LastChangedDate: 2011-04-08 15:12:06 +0200 (Fr, 08. Apr 2011) $
* $LastChangedBy$
Initials Date Comment
aw 13.01.2010 initial
* Initials Date Comment
* aw 13.01.2010 initial
*/

#ifndef DLT_H
Expand Down
43 changes: 24 additions & 19 deletions include/dlt/dlt_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* License MPL-2.0: Mozilla Public License version 2.0 http://mozilla.org/MPL/2.0/.
*
* \file dlt_client.h
*/
*/


/*******************************************************************************
Expand Down Expand Up @@ -67,16 +67,16 @@
*/

#ifndef DLT_CLIENT_H
#define DLT_CLIENT_H
# define DLT_CLIENT_H

/**
\defgroup clientapi DLT Client API
\addtogroup clientapi
\{
*/
* \defgroup clientapi DLT Client API
* \addtogroup clientapi
\{
*/

#include "dlt_types.h"
#include "dlt_common.h"
# include "dlt_types.h"
# include "dlt_common.h"

typedef enum
{
Expand All @@ -99,11 +99,11 @@ typedef struct
DltClientMode mode; /**< mode DltClientMode */
} DltClient;

#ifdef __cplusplus
# ifdef __cplusplus
extern "C" {
#endif
# endif

void dlt_client_register_message_callback(int (*registerd_callback) (DltMessage *message, void *data));
void dlt_client_register_message_callback(int (*registerd_callback)(DltMessage *message, void *data));

/**
* Initialising dlt client structure with a specific port
Expand Down Expand Up @@ -163,7 +163,12 @@ DltReturnValue dlt_client_send_ctrl_msg(DltClient *client, char *apid, char *cti
* @param size Size of injection data within buffer
* @return Value from DltReturnValue enum
*/
DltReturnValue dlt_client_send_inject_msg(DltClient *client, char *apid, char *ctid, uint32_t serviceID, uint8_t *buffer, uint32_t size);
DltReturnValue dlt_client_send_inject_msg(DltClient *client,
char *apid,
char *ctid,
uint32_t serviceID,
uint8_t *buffer,
uint32_t size);
/**
* Send an set log level message to the dlt daemon
* @param client pointer to dlt client structure
Expand Down Expand Up @@ -196,13 +201,13 @@ int dlt_client_get_software_version(DltClient *client);
* @param void
* @return void
*/
void dlt_getloginfo_init( void );
void dlt_getloginfo_init(void);
/**
* To free the memory allocated for app description in get log info
* @param void
* @return void
*/
void dlt_getloginfo_free( void );
void dlt_getloginfo_free(void);
/**
* Send a set trace status message to the dlt daemon
* @param client pointer to dlt client structure
Expand Down Expand Up @@ -299,20 +304,20 @@ int dlt_client_set_socket_path(DltClient *client, char *socket_path);
* @return Value from DltReturnValue enum
*/
DltReturnValue dlt_client_parse_get_log_info_resp_text(DltServiceGetLogInfoResponse *resp,
char *resp_text);
char *resp_text);

/**
* Free memory allocated for get log info message
* @param resp response
* @return 0 on success, -1 otherwise
*/
int dlt_client_cleanup_get_log_info(DltServiceGetLogInfoResponse *resp);
#ifdef __cplusplus
# ifdef __cplusplus
}
#endif
# endif

/**
\}
*/
\}
*/

#endif /* DLT_CLIENT_H */
Loading

0 comments on commit dca8ab2

Please sign in to comment.