automotive-dlt
dlt_user_cfg.h
Go to the documentation of this file.
1 /*
2  * @licence app begin@
3  * SPDX license identifier: MPL-2.0
4  *
5  * Copyright (C) 2011-2015, BMW AG
6  *
7  * This file is part of GENIVI Project DLT - Diagnostic Log and Trace.
8  *
9  * This Source Code Form is subject to the terms of the
10  * Mozilla Public License (MPL), v. 2.0.
11  * If a copy of the MPL was not distributed with this file,
12  * You can obtain one at http://mozilla.org/MPL/2.0/.
13  *
14  * For further information see http://www.genivi.org/.
15  * @licence end@
16  */
17 
27 /*******************************************************************************
28 ** **
29 ** SRC-MODULE: dlt_user_cfg.h **
30 ** **
31 ** TARGET : linux **
32 ** **
33 ** PROJECT : DLT **
34 ** **
35 ** AUTHOR : Alexander Wenzel Alexander.AW.Wenzel@bmw.de **
36 ** Markus Klein **
37 ** **
38 ** PURPOSE : **
39 ** **
40 ** REMARKS : **
41 ** **
42 ** PLATFORM DEPENDANT [yes/no]: yes **
43 ** **
44 ** TO BE CHANGED BY USER [yes/no]: no **
45 ** **
46 *******************************************************************************/
47 
48 /*******************************************************************************
49 ** Author Identity **
50 ********************************************************************************
51 ** **
52 ** Initials Name Company **
53 ** -------- ------------------------- ---------------------------------- **
54 ** aw Alexander Wenzel BMW **
55 ** mk Markus Klein Fraunhofer ESK **
56 *******************************************************************************/
57 
58 /*******************************************************************************
59 ** Author Identity **
60 ********************************************************************************
61 ** **
62 ** Initials Name Company **
63 ** -------- ------------------------- ---------------------------------- **
64 ** aw Alexander Wenzel BMW **
65 ** mk Markus Klein Fraunhofer ESK **
66 *******************************************************************************/
67 
68 #ifndef DLT_USER_CFG_H
69 #define DLT_USER_CFG_H
70 
71 /*************/
72 /* Changable */
73 /*************/
74 
75 /* Size of receive buffer */
76 #define DLT_USER_RCVBUF_MAX_SIZE 10024
77 
78 /* Size of ring buffer */
79 #define DLT_USER_RINGBUFFER_MIN_SIZE 50000
80 #define DLT_USER_RINGBUFFER_MAX_SIZE 500000
81 #define DLT_USER_RINGBUFFER_STEP_SIZE 50000
82 
83 /* Name of environment variable for ringbuffer configuration */
84 #define DLT_USER_ENV_BUFFER_MIN_SIZE "DLT_USER_BUFFER_MIN"
85 #define DLT_USER_ENV_BUFFER_MAX_SIZE "DLT_USER_BUFFER_MAX"
86 #define DLT_USER_ENV_BUFFER_STEP_SIZE "DLT_USER_BUFFER_STEP"
87 
88 /* Temporary buffer length */
89 #define DLT_USER_BUFFER_LENGTH 255
90 
91 /* Number of context entries, which will be allocated,
92  if no more context entries are available */
93 #define DLT_USER_CONTEXT_ALLOC_SIZE 500
94 
95 /* Maximu length of a filename string */
96 #define DLT_USER_MAX_FILENAME_LENGTH 255
97 
98 /* Maximum length of a single version number */
99 #define DLT_USER_MAX_LIB_VERSION_LENGTH 3
100 
101 /* Length of buffer for constructing text output */
102 #define DLT_USER_TEXT_LENGTH 10024
103 
104 /* Stack size of receiver thread */
105 #define DLT_USER_RECEIVERTHREAD_STACKSIZE 100000
106 
107 /* default value for storage to file, not used in daemon connection */
108 #define DLT_USER_DEFAULT_ECU_ID "ECU1"
109 
110 /* Initial log level */
111 #define DLT_USER_INITIAL_LOG_LEVEL DLT_LOG_INFO
112 
113 /* Initial trace status */
114 #define DLT_USER_INITIAL_TRACE_STATUS DLT_TRACE_STATUS_OFF
115 
116 /* use extended header for non-verbose mode: 0 - don't use, 1 - use */
117 #define DLT_USER_USE_EXTENDED_HEADER_FOR_NONVERBOSE 1
118 
119 /* send always session id: 0 - don't use, 1 - use */
120 #define DLT_USER_WITH_SESSION_ID 1
121 
122 /* send always timestamp: 0 - don't use, 1 - use */
123 #define DLT_USER_WITH_TIMESTAMP 1
124 
125 /* send always ecu id: 0 - don't use, 1 - use */
126 #define DLT_USER_WITH_ECU_ID 1
127 
128 /* default message id for non-verbose mode, if no message id was provided */
129 #define DLT_USER_DEFAULT_MSGID 0xffff
130 
131 /* delay in receiver routine in usec (100000 usec = 100ms) */
132 #define DLT_USER_RECEIVE_DELAY 100000
133 
134 /* Name of environment variable for local print mode */
135 #define DLT_USER_ENV_LOCAL_PRINT_MODE "DLT_LOCAL_PRINT_MODE"
136 
137 /* Timeout offset for resending user buffer at exit in 10th milliseconds (10000 = 1s)*/
138 #define DLT_USER_ATEXIT_RESEND_BUFFER_EXIT_TIMEOUT 100000
139 
140 /* Sleeps between resending user buffer at exit in usec (1000 usec = 1ms)*/
141 #define DLT_USER_ATEXIT_RESEND_BUFFER_SLEEP 100000
142 
143 
144 /************************/
145 /* Don't change please! */
146 /************************/
147 
148 /* Minimum valid ID of an injection message */
149 #define DLT_USER_INJECTION_MIN 0xFFF
150 
151 /* Defines of the different local print modes */
152 #define DLT_PM_UNSET 0
153 #define DLT_PM_AUTOMATIC 1
154 #define DLT_PM_FORCE_ON 2
155 #define DLT_PM_FORCE_OFF 3
156 
157 #endif /* DLT_USER_CFG_H */