4fb9cff37dd773ef63b6fa070904f97590b620b0
[profile/ivi/dlt-daemon.git] / include / dlt / dlt_common.h
1 /**
2  * @licence app begin@
3  * Copyright (C) 2012  BMW AG
4  *
5  * This file is part of GENIVI Project Dlt - Diagnostic Log and Trace console apps.
6  *
7  * Contributions are licensed to the GENIVI Alliance under one or more
8  * Contribution License Agreements.
9  *
10  * \copyright
11  * This Source Code Form is subject to the terms of the
12  * Mozilla Public License, v. 2.0. If a  copy of the MPL was not distributed with
13  * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
14  *
15  *
16  * \author Alexander Wenzel <alexander.aw.wenzel@bmw.de> BMW 2011-2012
17  *
18  * \file dlt_common.h
19  * For further information see http://www.genivi.org/.
20  * @licence end@
21  */
22
23 /*******************************************************************************
24 **                                                                            **
25 **  SRC-MODULE: dlt_common.h                                                  **
26 **                                                                            **
27 **  TARGET    : linux                                                         **
28 **                                                                            **
29 **  PROJECT   : DLT                                                           **
30 **                                                                            **
31 **  AUTHOR    : Alexander Wenzel Alexander.AW.Wenzel@bmw.de                   **
32 **              Markus Klein                                                  **
33 **                                                                            **
34 **  PURPOSE   :                                                               **
35 **                                                                            **
36 **  REMARKS   :                                                               **
37 **                                                                            **
38 **  PLATFORM DEPENDANT [yes/no]: yes                                          **
39 **                                                                            **
40 **  TO BE CHANGED BY USER [yes/no]: no                                        **
41 **                                                                            **
42 *******************************************************************************/
43
44 /*******************************************************************************
45 **                      Author Identity                                       **
46 ********************************************************************************
47 **                                                                            **
48 ** Initials     Name                       Company                            **
49 ** --------     -------------------------  ---------------------------------- **
50 **  aw          Alexander Wenzel           BMW                                **
51 **  mk          Markus Klein               Fraunhofer ESK                     **
52 *******************************************************************************/
53
54 /*******************************************************************************
55 **                      Revision Control History                              **
56 *******************************************************************************/
57
58 /*
59  * $LastChangedRevision: 1670 $
60  * $LastChangedDate: 2011-04-08 15:12:06 +0200 (Fr, 08. Apr 2011) $
61  * $LastChangedBy$
62  Initials    Date         Comment
63  aw          13.01.2010   initial
64  */
65 #ifndef DLT_COMMON_H
66 #define DLT_COMMON_H
67
68 /**
69   \defgroup commonapi DLT Common API
70   \addtogroup commonapi
71   \{
72 */
73
74 #include <stdio.h>
75
76 #if !defined(_MSC_VER)
77 #include <unistd.h>
78 #include <time.h>
79 #endif
80
81 #if !defined (__WIN32__) && !defined(_MSC_VER)
82 #include <termios.h>
83 #endif
84
85 #include "dlt_types.h"
86 #include "dlt_protocol.h"
87
88 #if !defined (PACKED)
89 #define PACKED __attribute__((aligned(1),packed))
90 #endif
91
92 #if defined (__MSDOS__) || defined (_MSC_VER)
93 /* set instead /Zp8 flag in Visual C++ configuration */
94 #undef PACKED
95 #define PACKED
96 #endif
97
98 /*
99  * Macros to swap the byte order.
100  */
101 #define DLT_SWAP_64(value) ((((uint64_t)DLT_SWAP_32((value)&0xffffffffull))<<32) | (DLT_SWAP_32((value)>>32)))
102
103 #define DLT_SWAP_16(value) ((((value) >> 8)&0xff) | (((value) << 8)&0xff00))
104 #define DLT_SWAP_32(value) ((((value) >> 24)&0xff) | (((value) << 8)&0xff0000) | (((value) >> 8)&0xff00) | (((value) << 24)&0xff000000))
105
106 /* Set Big Endian and Little Endian to a initial value, if not defined */
107 #if !defined __USE_BSD
108 #ifndef LITTLE_ENDIAN
109 #define LITTLE_ENDIAN 1234
110 #endif
111
112 #ifndef BIG_ENDIAN
113 #define BIG_ENDIAN    4321
114 #endif
115 #endif /* __USE_BSD */
116
117 /* If byte order is not defined, default to little endian */
118 #if !defined __USE_BSD
119 #ifndef BYTE_ORDER
120 #define BYTE_ORDER LITTLE_ENDIAN
121 #endif
122 #endif /* __USE_BSD */
123
124 /* Check for byte-order */
125 #if (BYTE_ORDER==BIG_ENDIAN)
126 /* #warning "Big Endian Architecture!" */
127 #define DLT_HTOBE_16(x) ((x))
128 #define DLT_HTOLE_16(x) DLT_SWAP_16((x))
129 #define DLT_BETOH_16(x) ((x))
130 #define DLT_LETOH_16(x) DLT_SWAP_16((x))
131
132 #define DLT_HTOBE_32(x) ((x))
133 #define DLT_HTOLE_32(x) DLT_SWAP_32((x))
134 #define DLT_BETOH_32(x) ((x))
135 #define DLT_LETOH_32(x) DLT_SWAP_32((x))
136
137 #define DLT_HTOBE_64(x) ((x))
138 #define DLT_HTOLE_64(x) DLT_SWAP_64((x))
139 #define DLT_BETOH_64(x) ((x))
140 #define DLT_LETOH_64(x) DLT_SWAP_64((x))
141 #else
142 /* #warning "Litte Endian Architecture!" */
143 #define DLT_HTOBE_16(x) DLT_SWAP_16((x))
144 #define DLT_HTOLE_16(x) ((x))
145 #define DLT_BETOH_16(x) DLT_SWAP_16((x))
146 #define DLT_LETOH_16(x) ((x))
147
148 #define DLT_HTOBE_32(x) DLT_SWAP_32((x))
149 #define DLT_HTOLE_32(x) ((x))
150 #define DLT_BETOH_32(x) DLT_SWAP_32((x))
151 #define DLT_LETOH_32(x) ((x))
152
153 #define DLT_HTOBE_64(x) DLT_SWAP_64((x))
154 #define DLT_HTOLE_64(x) ((x))
155 #define DLT_BETOH_64(x) DLT_SWAP_64((x))
156 #define DLT_LETOH_64(x) ((x))
157 #endif
158
159 #define DLT_ENDIAN_GET_16(htyp,x) ((((htyp) & DLT_HTYP_MSBF)>0)?DLT_BETOH_16(x):DLT_LETOH_16(x))
160 #define DLT_ENDIAN_GET_32(htyp,x) ((((htyp) & DLT_HTYP_MSBF)>0)?DLT_BETOH_32(x):DLT_LETOH_32(x))
161 #define DLT_ENDIAN_GET_64(htyp,x) ((((htyp) & DLT_HTYP_MSBF)>0)?DLT_BETOH_64(x):DLT_LETOH_64(x))
162
163 #if defined (__WIN32__) || defined (_MSC_VER)
164 #define LOG_EMERG       0
165 #define LOG_ALERT       1
166 #define LOG_CRIT        2
167 #define LOG_ERR         3
168 #define LOG_WARNING     4
169 #define LOG_NOTICE      5
170 #define LOG_INFO        6
171 #define LOG_DEBUG       7
172
173 #define LOG_PID         0x01
174 #define LOG_DAEMON      (3<<3)
175 #endif
176
177 /**
178  * The standard TCP Port used for DLT daemon
179  */
180 #define DLT_DAEMON_TCP_PORT 3490
181
182
183 /* Initi value for file descritpor */
184 #define DLT_FD_INIT -1
185
186 /* Minimum value for a file descriptor except the POSIX Standards: stdin=0, stdout=1, stderr=2 */
187 #define DLT_FD_MINIMUM 3
188
189 /**
190  * The size of a DLT ID
191  */
192 #define DLT_ID_SIZE 4
193
194 #define DLT_SIZE_WEID DLT_ID_SIZE
195 #define DLT_SIZE_WSID (sizeof(uint32_t))
196 #define DLT_SIZE_WTMS (sizeof(uint32_t))
197
198 /**
199  * Get the size of extra header parameters, depends on htyp.
200  */
201 #define DLT_STANDARD_HEADER_EXTRA_SIZE(htyp) ( (DLT_IS_HTYP_WEID(htyp) ? DLT_SIZE_WEID : 0) + (DLT_IS_HTYP_WSID(htyp) ? DLT_SIZE_WSID : 0) + (DLT_IS_HTYP_WTMS(htyp) ? DLT_SIZE_WTMS : 0) )
202
203
204 #if defined (__MSDOS__) || defined (_MSC_VER)
205 #define __func__ __FUNCTION__
206 #endif
207
208 #define PRINT_FUNCTION_VERBOSE(_verbose)  \
209 { \
210         static char _strbuf[255]; \
211     \
212     if(_verbose) \
213     { \
214                 snprintf(_strbuf, 255, "%s()\n",__func__); \
215                 dlt_log(LOG_INFO, _strbuf); \
216     } \
217 }
218
219 #ifndef NULL
220 #define NULL (char*)0
221 #endif
222
223 #define DLT_MSG_IS_CONTROL(MSG)          ((DLT_IS_HTYP_UEH((MSG)->standardheader->htyp)) && \
224                                           (DLT_GET_MSIN_MSTP((MSG)->extendedheader->msin)==DLT_TYPE_CONTROL))
225
226 #define DLT_MSG_IS_CONTROL_REQUEST(MSG)  ((DLT_IS_HTYP_UEH((MSG)->standardheader->htyp)) && \
227                                           (DLT_GET_MSIN_MSTP((MSG)->extendedheader->msin)==DLT_TYPE_CONTROL) && \
228                                           (DLT_GET_MSIN_MTIN((MSG)->extendedheader->msin)==DLT_CONTROL_REQUEST))
229
230 #define DLT_MSG_IS_CONTROL_RESPONSE(MSG) ((DLT_IS_HTYP_UEH((MSG)->standardheader->htyp)) && \
231                                           (DLT_GET_MSIN_MSTP((MSG)->extendedheader->msin)==DLT_TYPE_CONTROL) && \
232                                           (DLT_GET_MSIN_MTIN((MSG)->extendedheader->msin)==DLT_CONTROL_RESPONSE))
233
234 #define DLT_MSG_IS_CONTROL_TIME(MSG)     ((DLT_IS_HTYP_UEH((MSG)->standardheader->htyp)) && \
235                                           (DLT_GET_MSIN_MSTP((MSG)->extendedheader->msin)==DLT_TYPE_CONTROL) && \
236                                           (DLT_GET_MSIN_MTIN((MSG)->extendedheader->msin)==DLT_CONTROL_TIME))
237
238 #define DLT_MSG_IS_NW_TRACE(MSG)         ((DLT_IS_HTYP_UEH((MSG)->standardheader->htyp)) && \
239                                                                               (DLT_GET_MSIN_MSTP((MSG)->extendedheader->msin)==DLT_TYPE_NW_TRACE))
240
241 #define DLT_MSG_IS_TRACE_MOST(MSG)       ((DLT_IS_HTYP_UEH((MSG)->standardheader->htyp)) && \
242                                                                               (DLT_GET_MSIN_MSTP((MSG)->extendedheader->msin)==DLT_TYPE_NW_TRACE) && \
243                                                                               (DLT_GET_MSIN_MTIN((MSG)->extendedheader->msin)==DLT_NW_TRACE_MOST))
244
245 #define DLT_MSG_IS_NONVERBOSE(MSG)       (!(DLT_IS_HTYP_UEH((MSG)->standardheader->htyp)) || \
246                                           ((DLT_IS_HTYP_UEH((MSG)->standardheader->htyp)) && (!(DLT_IS_MSIN_VERB((MSG)->extendedheader->msin)))))
247
248 /*
249
250  * Definitions of DLT message buffer overflow
251  */
252 #define DLT_MESSAGE_BUFFER_NO_OVERFLOW     0x00 /**< Buffer overflow has not occured */
253 #define DLT_MESSAGE_BUFFER_OVERFLOW        0x01 /**< Buffer overflow has occured */
254
255 /*
256  * Definition of DLT output variants
257  */
258 #define DLT_OUTPUT_HEX              1
259 #define DLT_OUTPUT_ASCII            2
260 #define DLT_OUTPUT_MIXED_FOR_PLAIN  3
261 #define DLT_OUTPUT_MIXED_FOR_HTML   4
262 #define DLT_OUTPUT_ASCII_LIMITED    5
263
264 #define DLT_FILTER_MAX 30 /**< Maximum number of filters */
265
266 #define DLT_MSG_READ_VALUE(dst,src,length,type) \
267     { \
268     if((length<0) || ((length)<((int32_t)sizeof(type)))) \
269         { length = -1; } \
270     else \
271         { dst = *((type*)src);src+=sizeof(type);length-=sizeof(type); } \
272     }
273
274 #define DLT_MSG_READ_ID(dst,src,length) \
275     { \
276     if((length<0) || ((length)<DLT_ID_SIZE)) \
277         { length = -1; } \
278     else \
279         { memcpy(dst,src,DLT_ID_SIZE);src+=DLT_ID_SIZE;length-=DLT_ID_SIZE; } \
280     }
281
282 #define DLT_MSG_READ_STRING(dst,src,maxlength,length) \
283     { \
284     if(((maxlength)<0) || ((length)<0) || ((maxlength)<(length))) \
285         { maxlength = -1; } \
286     else \
287         { memcpy(dst,src,length);dlt_clean_string(dst,length);dst[length]=0; \
288           src+=length;maxlength-=length; } \
289     }
290
291 #define DLT_MSG_READ_NULL(src,maxlength,length) \
292     { \
293     if(((maxlength)<0) || ((length)<0) || ((maxlength)<(length))) \
294         { length = -1; } \
295     else \
296         { src+=length;maxlength-=length; } \
297     }
298
299 #define DLT_HEADER_SHOW_NONE       0x0000
300 #define DLT_HEADER_SHOW_TIME       0x0001
301 #define DLT_HEADER_SHOW_TMSTP      0x0002
302 #define DLT_HEADER_SHOW_MSGCNT     0x0004
303 #define DLT_HEADER_SHOW_ECUID      0x0008
304 #define DLT_HEADER_SHOW_APID       0x0010
305 #define DLT_HEADER_SHOW_CTID       0x0020
306 #define DLT_HEADER_SHOW_MSGTYPE    0x0040
307 #define DLT_HEADER_SHOW_MSGSUBTYPE 0x0080
308 #define DLT_HEADER_SHOW_VNVSTATUS  0x0100
309 #define DLT_HEADER_SHOW_NOARG      0x0200
310 #define DLT_HEADER_SHOW_ALL        0xFFFF
311
312 /**
313  * The definition of the serial header containing the characters "DLS" + 0x01.
314  */
315 extern const char dltSerialHeader[DLT_ID_SIZE];
316
317 /**
318  * The definition of the serial header containing the characters "DLS" + 0x01 as char.
319  */
320 extern char dltSerialHeaderChar[DLT_ID_SIZE];
321
322 /**
323
324  * The type of a DLT ID (context id, application id, etc.)
325  */
326 typedef char ID4[DLT_ID_SIZE];
327
328 /**
329  * The structure of the DLT file storage header. This header is used before each stored DLT message.
330  */
331 typedef struct
332 {
333     char pattern[DLT_ID_SIZE];          /**< This pattern should be DLT0x01 */
334     uint32_t seconds;                               /**< seconds since 1.1.1970 */
335     int32_t microseconds;                       /**< Microseconds */
336     char ecu[DLT_ID_SIZE];                      /**< The ECU id is added, if it is not already in the DLT message itself */
337 } PACKED DltStorageHeader;
338
339 /**
340  * The structure of the DLT standard header. This header is used in each DLT message.
341  */
342 typedef struct
343 {
344     uint8_t htyp;           /**< This parameter contains several informations, see definitions below */
345     uint8_t mcnt;           /**< The message counter is increased with each sent DLT message */
346     uint16_t len;           /**< Length of the complete message, without storage header */
347 } PACKED DltStandardHeader;
348
349 /**
350  * The structure of the DLT extra header parameters. Each parameter is sent only if enabled in htyp.
351  */
352 typedef struct
353 {
354     char ecu[DLT_ID_SIZE];       /**< ECU id */
355     uint32_t seid;     /**< Session number */
356     uint32_t tmsp;     /**< Timestamp since system start in 0.1 milliseconds */
357 } PACKED DltStandardHeaderExtra;
358
359 /**
360  * The structure of the DLT extended header. This header is only sent if enabled in htyp parameter.
361  */
362 typedef struct
363 {
364     uint8_t msin;          /**< messsage info */
365     uint8_t noar;          /**< number of arguments */
366     char apid[DLT_ID_SIZE];          /**< application id */
367     char ctid[DLT_ID_SIZE];          /**< context id */
368 } PACKED DltExtendedHeader;
369
370 /**
371  * The structure to organise the DLT messages.
372  * This structure is used by the corresponding functions.
373  */
374 typedef struct sDltMessage
375 {
376     /* flags */
377     int8_t found_serialheader;
378
379     /* offsets */
380     int32_t resync_offset;
381
382     /* size parameters */
383     int32_t headersize;    /**< size of complete header including storage header */
384     int32_t datasize;      /**< size of complete payload */
385
386     /* buffer for current loaded message */
387     uint8_t headerbuffer[sizeof(DltStorageHeader)+
388                          sizeof(DltStandardHeader)+sizeof(DltStandardHeaderExtra)+sizeof(DltExtendedHeader)]; /**< buffer for loading complete header */
389     uint8_t *databuffer;         /**< buffer for loading payload */
390         int32_t databuffersize;
391
392     /* header values of current loaded message */
393     DltStorageHeader       *storageheader;  /**< pointer to storage header of current loaded header */
394     DltStandardHeader      *standardheader; /**< pointer to standard header of current loaded header */
395     DltStandardHeaderExtra headerextra;     /**< extra parameters of current loaded header */
396     DltExtendedHeader      *extendedheader; /**< pointer to extended of current loaded header */
397 } DltMessage;
398
399 /**
400  * The structure of the DLT Service Get Log Info.
401  */
402 typedef struct
403 {
404     uint32_t service_id;            /**< service ID */
405     uint8_t options;                /**< type of request */
406     char apid[DLT_ID_SIZE];                   /**< application id */
407     char ctid[DLT_ID_SIZE];                   /**< context id */
408     char com[DLT_ID_SIZE];                    /**< communication interface */
409 } PACKED DltServiceGetLogInfoRequest;
410
411 /**
412  * The structure of the DLT Service Set Log Level.
413  */
414 typedef struct
415 {
416
417     uint32_t service_id;            /**< service ID */
418     char apid[DLT_ID_SIZE];                   /**< application id */
419     char ctid[DLT_ID_SIZE];                   /**< context id */
420     uint8_t log_level;              /**< log level to be set */
421     char com[DLT_ID_SIZE];                    /**< communication interface */
422 } PACKED DltServiceSetLogLevel;
423
424 /**
425  * The structure of the DLT Service Set Default Log Level.
426  */
427 typedef struct
428 {
429     uint32_t service_id;            /**< service ID */
430     uint8_t log_level;              /**< default log level to be set */
431     char com[DLT_ID_SIZE];                    /**< communication interface */
432 } PACKED DltServiceSetDefaultLogLevel;
433
434 /**
435  * The structure of the DLT Service Set Verbose Mode
436  */
437 typedef struct
438 {
439     uint32_t service_id;            /**< service ID */
440     uint8_t new_status;             /**< new status to be set */
441 } PACKED DltServiceSetVerboseMode;
442
443 /**
444  * The structure of the DLT Service Set Communication Interface Status
445  */
446 typedef struct
447 {
448     uint32_t service_id;            /**< service ID */
449     char com[DLT_ID_SIZE];                    /**< communication interface */
450     uint8_t new_status;             /**< new status to be set */
451 } PACKED DltServiceSetCommunicationInterfaceStatus;
452
453 /**
454  * The structure of the DLT Service Set Communication Maximum Bandwidth
455  */
456 typedef struct
457 {
458     uint32_t service_id;            /**< service ID */
459     char com[DLT_ID_SIZE];                    /**< communication interface */
460     uint32_t max_bandwidth;         /**< maximum bandwith */
461 } PACKED DltServiceSetCommunicationMaximumBandwidth;
462
463 typedef struct
464 {
465     uint32_t service_id;            /**< service ID */
466     uint8_t status;                 /**< reponse status */
467 } PACKED DltServiceResponse;
468
469 typedef struct
470 {
471     uint32_t service_id;            /**< service ID */
472     uint8_t status;                 /**< reponse status */
473     uint8_t log_level;              /**< log level */
474 } PACKED DltServiceGetDefaultLogLevelResponse;
475
476 typedef struct
477 {
478     uint32_t service_id;            /**< service ID */
479     uint8_t status;                 /**< reponse status */
480     uint8_t overflow;               /**< overflow status */
481 } PACKED DltServiceMessageBufferOverflowResponse;
482
483 typedef struct
484 {
485     uint32_t service_id;            /**< service ID */
486     uint8_t  status;                /**< reponse status */
487     uint32_t length;                /**< length of following payload */
488     /*char [] payload;*/
489 } PACKED DltServiceGetSoftwareVersionResponse;
490
491 /**
492  * Structure to store filter parameters.
493  * ID are maximal four characters. Unused values are filled with zeros.
494  * If every value as filter is valid, the id should be empty by having only zero values.
495  */
496 typedef struct
497 {
498     char apid[DLT_FILTER_MAX][DLT_ID_SIZE]; /**< application id */
499     char ctid[DLT_FILTER_MAX][DLT_ID_SIZE]; /**< context id */
500     int  counter;                           /**< number of filters */
501 } DltFilter;
502
503 /**
504  * The structure to organise the access to DLT files.
505  * This structure is used by the corresponding functions.
506  */
507 typedef struct sDltFile
508 {
509     /* file handle and index for fast access */
510     FILE *handle;      /**< file handle of opened DLT file */
511     long *index;       /**< file positions of all DLT messages for fast access to file, only filtered messages */
512
513     /* size parameters */
514     int32_t counter;       /**< number of messages in DLT file with filter */
515     int32_t counter_total; /**< number of messages in DLT file without filter */
516     int32_t position;      /**< current index to message parsed in DLT file starting at 0 */
517     long file_length;  /**< length of the file */
518     long file_position; /**< current position in the file */
519
520     /* error counters */
521     int32_t error_messages; /**< number of incomplete DLT messages found during file parsing */
522
523     /* filter parameters */
524     DltFilter *filter;  /**< pointer to filter list. Zero if no filter is set. */
525     int32_t filter_counter; /**< number of filter set */
526
527     /* current loaded message */
528     DltMessage msg;     /**< pointer to message */
529
530 } DltFile;
531
532 /**
533  * The structure is used to organise the receiving of data
534  * including buffer handling.
535  * This structure is used by the corresponding functions.
536  */
537 typedef struct
538 {
539     int32_t lastBytesRcvd;    /**< bytes received in last receive call */
540     int32_t bytesRcvd;        /**< received bytes */
541     int32_t totalBytesRcvd;   /**< total number of received bytes */
542     char *buffer;         /**< pointer to receiver buffer */
543     char *buf;            /**< pointer to position within receiver buffer */
544     int fd;               /**< connection handle */
545     int32_t buffersize;       /**< size of receiver buffer */
546 } DltReceiver;
547
548 typedef struct
549 {
550         unsigned char* shm;     /* pointer to beginning of shared memory */
551         int size;       /* size of data area in shared memory */
552         unsigned char* mem;     /* pointer to data area in shared memory */     
553         
554     uint32_t    min_size;  /**< Minimum size of buffer */
555     uint32_t    max_size;  /**< Maximum size of buffer */
556     uint32_t    step_size; /**< Step size of buffer */
557 } DltBuffer;
558
559 typedef struct
560 {
561         int write;
562         int read;
563         int count;      
564 } DltBufferHead;
565
566 #define DLT_BUFFER_HEAD         "SHM"
567
568 typedef struct
569 {
570         char head[4];
571         unsigned char status;
572         int size;       
573 } DltBufferBlockHead;
574
575 #ifdef __cplusplus
576 extern "C"
577 {
578 #endif
579
580     /**
581      * Helper function to print a byte array in hex.
582      * @param ptr pointer to the byte array.
583      * @param size number of bytes to be printed.
584      */
585     void dlt_print_hex(uint8_t *ptr,int size);
586     /**
587      * Helper function to print a byte array in hex into a string.
588      * @param text pointer to a ASCII string, in which the text is written
589      * @param textlength maximal size of text buffer
590      * @param ptr pointer to the byte array.
591      * @param size number of bytes to be printed.
592      * @return negative value if there was an error
593      */
594     int dlt_print_hex_string(char *text,int textlength,uint8_t *ptr,int size);
595     /**
596      * Helper function to print a byte array in hex and ascii into a string.
597      * @param text pointer to a ASCII string, in which the text is written
598      * @param textlength maximal size of text buffer
599      * @param ptr pointer to the byte array.
600      * @param size number of bytes to be printed.
601      * @param html output is html? 0 - false, 1 - true
602      * @return negative value if there was an error
603      */
604     int dlt_print_mixed_string(char *text,int textlength,uint8_t *ptr,int size,int html);
605     /**
606      * Helper function to print a byte array in ascii into a string.
607      * @param text pointer to a ASCII string, in which the text is written
608      * @param textlength maximal size of text buffer
609      * @param ptr pointer to the byte array.
610      * @param size number of bytes to be printed.
611      * @return negative value if there was an error
612      */
613     int dlt_print_char_string(char **text,int textlength,uint8_t *ptr,int size);
614
615     /**
616      * Helper function to print an id.
617      * @param text pointer to ASCII string where to write the id
618      * @param id four byte char array as used in DLT mesages as IDs.
619      */
620     void dlt_print_id(char *text,const char *id);
621
622     /**
623      * Helper function to set an ID parameter.
624      * @param id four byte char array as used in DLT mesages as IDs.
625      * @param text string to be copied into char array.
626      */
627     void dlt_set_id(char *id,const char *text);
628
629     /**
630      * Helper function to remove not nice to print characters, e.g. NULL or carage return.
631      * @param text pointer to string to be cleaned.
632      * @param length length of string excluding terminating zero.
633      */
634     void dlt_clean_string(char *text,int length);
635
636     /**
637      * Initialise the filter list.
638      * This function must be called before using further dlt filter.
639      * @param filter pointer to structure of organising DLT filter
640      * @param verbose if set to true verbose information is printed out.
641      * @return negative value if there was an error
642      */
643     int dlt_filter_init(DltFilter *filter,int verbose);
644     /**
645      * Free the used memory by the organising structure of filter.
646      * @param filter pointer to structure of organising DLT filter
647      * @param verbose if set to true verbose information is printed out.
648      * @return negative value if there was an error
649      */
650     int dlt_filter_free(DltFilter *filter,int verbose);
651     /**
652      * Load filter list from file.
653      * @param filter pointer to structure of organising DLT filter
654      * @param filename filename to load filters from
655      * @param verbose if set to true verbose information is printed out.
656      * @return negative value if there was an error
657      */
658     int dlt_filter_load(DltFilter *filter,const char *filename,int verbose);
659     /**
660      * Save filter list to file.
661      * @param filter pointer to structure of organising DLT filter
662      * @param filename filename to load filters from
663      * @param verbose if set to true verbose information is printed out.
664      * @return negative value if there was an error
665      */
666     int dlt_filter_save(DltFilter *filter,const char *filename,int verbose);
667     /**
668      * Find index of filter in filter list
669      * @param filter pointer to structure of organising DLT filter
670      * @param apid application id to be found in filter list
671      * @param ctid context id to be found in filter list
672      * @param verbose if set to true verbose information is printed out.
673      * @return negative value if there was an error (or not found), else return index of filter
674      */
675     int dlt_filter_find(DltFilter *filter,const char *apid,const char *ctid, int verbose);
676     /**
677      * Add new filter to filter list.
678      * @param filter pointer to structure of organising DLT filter
679      * @param apid application id to be added to filter list (must always be set).
680      * @param ctid context id to be added to filter list. empty equals don't care.
681      * @param verbose if set to true verbose information is printed out.
682      * @return negative value if there was an error
683      */
684     int dlt_filter_add(DltFilter *filter,const char *apid,const char *ctid,int verbose);
685     /**
686      * Delete filter from filter list
687      * @param filter pointer to structure of organising DLT filter
688      * @param apid application id to be deleted from filter list
689      * @param ctid context id to be deleted from filter list
690      * @param verbose if set to true verbose information is printed out.
691      * @return negative value if there was an error
692      */
693     int dlt_filter_delete(DltFilter *filter,const char *apid,const char *ctid,int verbose);
694
695     /**
696      * Initialise the structure used to access a DLT message.
697      * This function must be called before using further dlt_message functions.
698      * @param msg pointer to structure of organising access to DLT messages
699      * @param verbose if set to true verbose information is printed out.
700      * @return negative value if there was an error
701      */
702     int dlt_message_init(DltMessage *msg,int verbose);
703     /**
704      * Free the used memory by the organising structure of file.
705      * @param msg pointer to structure of organising access to DLT messages
706      * @param verbose if set to true verbose information is printed out.
707      * @return negative value if there was an error
708      */
709     int dlt_message_free(DltMessage *msg,int verbose);
710     /**
711      * Print Header into an ASCII string.
712      * This function calls dlt_message_header_flags() with flags=DLT_HEADER_SHOW_ALL
713      * @param msg pointer to structure of organising access to DLT messages
714      * @param text pointer to a ASCII string, in which the header is written
715      * @param textlength maximal size of text buffer
716      * @param verbose if set to true verbose information is printed out.
717      * @return negative value if there was an error
718      */
719     int dlt_message_header(DltMessage *msg,char *text,int textlength,int verbose);
720     /**
721      * Print Header into an ASCII string, selective.
722      * @param msg pointer to structure of organising access to DLT messages
723      * @param text pointer to a ASCII string, in which the header is written
724      * @param textlength maximal size of text buffer
725      * @param flags select, bit-field to select, what should be printed (DLT_HEADER_SHOW_...)
726      * @param verbose if set to true verbose information is printed out.
727      * @return negative value if there was an error
728      */
729     int dlt_message_header_flags(DltMessage *msg,char *text,int textlength,int flags, int verbose);
730     /**
731      * Print Payload into an ASCII string.
732      * @param msg pointer to structure of organising access to DLT messages
733      * @param text pointer to a ASCII string, in which the header is written
734      * @param textlength maximal size of text buffer
735      * @param type 1 = payload as hex, 2 = payload as ASCII.
736      * @param verbose if set to true verbose information is printed out.
737      * @return negative value if there was an error
738      */
739     int dlt_message_payload(DltMessage *msg,char *text,int textlength,int type,int verbose);
740     /**
741      * Check if message is filtered or not. All filters are applied (logical OR).
742      * @param msg pointer to structure of organising access to DLT messages
743      * @param filter pointer to filter
744      * @param verbose if set to true verbose information is printed out.
745      * @return 1 = filter matches, 0 = filter does not match, negative value if there was an error
746      */
747     int dlt_message_filter_check(DltMessage *msg,DltFilter *filter,int verbose);
748
749     /**
750      * Read message from memory buffer.
751      * Message in buffer has no storage header.
752      * @param msg pointer to structure of organising access to DLT messages
753      * @param buffer pointer to memory buffer
754      * @param length length of message in buffer
755      * @param resync if set to true resync to serial header is enforced
756      * @param verbose if set to true verbose information is printed out.
757      * @return negative value if there was an error
758      */
759     int dlt_message_read(DltMessage *msg,uint8_t *buffer,unsigned int length,int resync,int verbose);
760
761     /**
762      * Get standard header extra parameters
763      * @param msg pointer to structure of organising access to DLT messages
764      * @param verbose if set to true verbose information is printed out.
765      * @return negative value if there was an error
766      */
767     int dlt_message_get_extraparameters(DltMessage *msg,int verbose);
768
769     /**
770      * Set standard header extra parameters
771      * @param msg pointer to structure of organising access to DLT messages
772      * @param verbose if set to true verbose information is printed out.
773      * @return negative value if there was an error
774      */
775     int dlt_message_set_extraparameters(DltMessage *msg,int verbose);
776
777     /**
778      * Initialise the structure used to access a DLT file.
779      * This function must be called before using further dlt_file functions.
780      * @param file pointer to structure of organising access to DLT file
781      * @param verbose if set to true verbose information is printed out.
782      * @return negative value if there was an error
783      */
784     int dlt_file_init(DltFile *file,int verbose);
785     /**
786      * Set a list to filters.
787      * This function should be called before loading a DLT file, if filters should be used.
788      * A filter list is an array of filters. Several filters are combined logically by or operation.
789      * The filter list is not copied, so take care to keep list in memory.
790      * @param file pointer to structure of organising access to DLT file
791      * @param filter pointer to filter list array
792      * @param verbose if set to true verbose information is printed out.
793      * @return negative value if there was an error
794      */
795     int dlt_file_set_filter(DltFile *file,DltFilter *filter,int verbose);
796     /**
797      * Initialising loading a DLT file.
798      * @param file pointer to structure of organising access to DLT file
799      * @param filename filename of DLT file
800      * @param verbose if set to true verbose information is printed out.
801      * @return negative value if there was an error
802      */
803     int dlt_file_open(DltFile *file,const char *filename,int verbose);
804     /**
805      * Find next message in the DLT file and parse them.
806      * This function finds the next message in the DLT file.
807      * If a filter is set, the filter list is used.
808      * @param file pointer to structure of organising access to DLT file
809      * @param verbose if set to true verbose information is printed out.
810      * @return 0 = message does not match filter, 1 = message was read, negative value if there was an error
811      */
812     int dlt_file_read(DltFile *file,int verbose);
813     /**
814      * Find next message in the DLT file in RAW format (without storage header) and parse them.
815      * This function finds the next message in the DLT file.
816      * If a filter is set, the filter list is used.
817      * @param file pointer to structure of organising access to DLT file
818      * @param resync Resync to serial header when set to true
819      * @param verbose if set to true verbose information is printed out.
820      * @return 0 = message does not match filter, 1 = message was read, negative value if there was an error
821      */
822     int dlt_file_read_raw(DltFile *file,int resync,int verbose);
823     /**
824      * Closing loading a DLT file.
825      * @param file pointer to structure of organising access to DLT file
826      * @param verbose if set to true verbose information is printed out.
827      * @return negative value if there was an error
828      */
829     int dlt_file_close(DltFile *file,int verbose);
830     /**
831      * Load standard header of a message from file
832      * @param file pointer to structure of organising access to DLT file
833      * @param verbose if set to true verbose information is printed out.
834      * @return negative value if there was an error
835      */
836     int dlt_file_read_header(DltFile *file,int verbose);
837     /**
838      * Load standard header of a message from file in RAW format (without storage header)
839      * @param file pointer to structure of organising access to DLT file
840      * @param resync Resync to serial header when set to true
841      * @param verbose if set to true verbose information is printed out.
842      * @return negative value if there was an error
843      */
844     int dlt_file_read_header_raw(DltFile *file,int resync,int verbose);
845     /**
846      * Load, if available in message, extra standard header fields and
847      * extended header of a message from file
848      * (dlt_file_read_header() must have been called before this call!)
849      * @param file pointer to structure of organising access to DLT file
850      * @param verbose if set to true verbose information is printed out.
851      * @return negative value if there was an error
852      */
853     int dlt_file_read_header_extended(DltFile *file, int verbose);
854     /**
855      * Load payload of a message from file
856      * (dlt_file_read_header() must have been called before this call!)
857      * @param file pointer to structure of organising access to DLT file
858      * @param verbose if set to true verbose information is printed out.
859      * @return negative value if there was an error
860      */
861     int dlt_file_read_data(DltFile *file, int verbose);
862     /**
863      * Load headers and payload of a message selected by the index.
864      * If filters are set, index is based on the filtered list.
865      * @param file pointer to structure of organising access to DLT file
866      * @param index position of message in the files beginning from zero
867      * @param verbose if set to true verbose information is printed out.
868      * @return number of messages loaded, negative value if there was an error
869      */
870     int dlt_file_message(DltFile *file,int index,int verbose);
871     /**
872      * Free the used memory by the organising structure of file.
873      * @param file pointer to structure of organising access to DLT file
874      * @param verbose if set to true verbose information is printed out.
875      * @return negative value if there was an error
876      */
877     int dlt_file_free(DltFile *file,int verbose);
878
879     /**
880      * Set internal logging filename if mode 2
881      * @param filename the filename
882      */
883     void dlt_log_set_filename(const char *filename);
884     /**
885      * Set internal logging level
886      * @param level the level
887      */
888     void dlt_log_set_level(int level);
889     /**
890      * Initialize (external) logging facility
891      * @param mode positive, 0 = log to stdout, 1 = log to syslog, 2 = log to file
892      */
893     void dlt_log_init(int mode);
894     /**
895      * Log ASCII string with null-termination to (external) logging facility
896      * @param prio priority (see syslog() call)
897      * @param s Pointer to ASCII string with null-termination
898      * @return negative value if there was an error
899      */
900     int dlt_log(int prio, char *s);
901     /**
902      * De-Initialize (external) logging facility
903      */
904     void dlt_log_free(void);
905
906     /**
907      * Initialising a dlt receiver structure
908      * @param receiver pointer to dlt receiver structure
909      * @param _fd handle to file/socket/fifo, fram which the data should be received
910      * @param _buffersize size of data buffer for storing the received data
911      * @return negative value if there was an error
912      */
913     int dlt_receiver_init(DltReceiver *receiver,int _fd, int _buffersize);
914     /**
915      * De-Initialize a dlt receiver structure
916      * @param receiver pointer to dlt receiver structure
917      * @return negative value if there was an error
918      */
919     int dlt_receiver_free(DltReceiver *receiver);
920     /**
921      * Receive data from socket using the dlt receiver structure
922      * @param receiver pointer to dlt receiver structure
923      * @return negative value if there was an error
924      */
925     int dlt_receiver_receive_socket(DltReceiver *receiver);
926     /**
927      * Receive data from file/fifo using the dlt receiver structure
928      * @param receiver pointer to dlt receiver structure
929      * @return negative value if there was an error
930      */
931     int dlt_receiver_receive_fd(DltReceiver *receiver);
932     /**
933      * Remove a specific size of bytes from the received data
934      * @param receiver pointer to dlt receiver structure
935      * @param size amount of bytes to be removed
936      * @return negative value if there was an error
937      */
938     int dlt_receiver_remove(DltReceiver *receiver,int size);
939     /**
940      * Move data from last receive call to front of receive buffer
941      * @param receiver pointer to dlt receiver structure
942      * @return negative value if there was an error
943      */
944     int dlt_receiver_move_to_begin(DltReceiver *receiver);
945
946     /**
947      * Fill out storage header of a dlt message
948      * @param storageheader pointer to storage header of a dlt message
949      * @param ecu name of ecu to be set in storage header
950      * @return negative value if there was an error
951      */
952     int dlt_set_storageheader(DltStorageHeader *storageheader, const char *ecu);
953     /**
954      * Check if a storage header contains its marker
955      * @param storageheader pointer to storage header of a dlt message
956      * @return 0 no, 1 yes, negative value if there was an error
957      */
958     int dlt_check_storageheader(DltStorageHeader *storageheader);
959
960
961     /**
962      * Initialise static ringbuffer with a size of size.
963      * Initialise as server. Init counters. 
964      * Memory is already allocated.
965      * @param buf Pointer to ringbuffer structure
966      * @param ptr Ptr to ringbuffer memory
967      * @param size Maximum size of buffer in bytes
968      * @return negative value if there was an error
969      */
970     int dlt_buffer_init_static_server(DltBuffer *buf, const unsigned char *ptr, uint32_t size);
971
972     /**
973      * Initialize static ringbuffer with a size of size.
974      * Initialise as a client. Do not change counters.
975      * Memory is already allocated.
976      * @param buf Pointer to ringbuffer structure
977      * @param ptr Ptr to ringbuffer memory
978      * @param size Maximum size of buffer in bytes
979      * @return negative value if there was an error
980      */
981     int dlt_buffer_init_static_client(DltBuffer *buf, const unsigned char *ptr, uint32_t size);
982
983     /**
984      * Initialize dynamic ringbuffer with a size of size.
985      * Initialise as a client. Do not change counters.
986      * Memory will be allocated starting with min_size.
987      * If more memory is needed size is increased wit step_size.
988      * The maximum size is max_size.
989      * @param buf Pointer to ringbuffer structure
990      * @param min_size Minimum size of buffer in bytes
991      * @param max_size Maximum size of buffer in bytes
992      * @param step_size size of which ringbuffer is increased
993      * @return negative value if there was an error
994      */
995     int dlt_buffer_init_dynamic(DltBuffer *buf, uint32_t min_size, uint32_t max_size,uint32_t step_size);
996
997     /**
998      * Deinitilaise usage of static ringbuffer
999      * @param buf Pointer to ringbuffer structure
1000      * @return negative value if there was an error
1001      */
1002     int dlt_buffer_free_static(DltBuffer *buf);
1003
1004     /**
1005      * Release and free memory used by dynamic ringbuffer
1006      * @param buf Pointer to ringbuffer structure
1007      * @return negative value if there was an error
1008      */
1009     int dlt_buffer_free_dynamic(DltBuffer *buf);
1010
1011     /**
1012      * Write one entry to ringbuffer
1013      * @param buf Pointer to ringbuffer structure
1014      * @param data Pointer to data to be written to ringbuffer
1015      * @param size Size of data in bytes to be written to ringbuffer
1016      * @return negative value if there was an error
1017      */
1018         int dlt_buffer_push(DltBuffer *buf,const unsigned char *data,unsigned int size);
1019
1020     /**
1021      * Write up to three entries to ringbuffer.
1022      * Entries are joined to one block.
1023      * @param dlt Pointer to ringbuffer structure
1024      * @param data1 Pointer to data to be written to ringbuffer
1025      * @param size1 Size of data in bytes to be written to ringbuffer
1026      * @param data2 Pointer to data to be written to ringbuffer
1027      * @param size2 Size of data in bytes to be written to ringbuffer
1028      * @param data3 Pointer to data to be written to ringbuffer
1029      * @param size3 Size of data in bytes to be written to ringbuffer
1030      * @return negative value if there was an error
1031      */
1032         int dlt_buffer_push3(DltBuffer *buf,const unsigned char *data1,unsigned int size1,const unsigned char *data2,unsigned int size2,const unsigned char *data3,unsigned int size3);
1033
1034     /**
1035      * Read one entry from ringbuffer.
1036      * Remove it from ringbuffer.
1037      * @param buf Pointer to ringbuffer structure
1038      * @param data Pointer to data read from ringbuffer
1039      * @param max_size Max size of read data in bytes from ringbuffer
1040      * @return size of read data, zero if no data available, negative value if there was an error
1041      */
1042         int dlt_buffer_pull(DltBuffer *buf,unsigned char *data, int max_size);
1043
1044     /**
1045      * Read one entry from ringbuffer.
1046      * Do not remove it from ringbuffer.
1047      * @param buf Pointer to ringbuffer structure
1048      * @param data Pointer to data read from ringbuffer
1049      * @param max_size Max size of read data in bytes from ringbuffer
1050      * @return size of read data, zero if no data available, negative value if there was an error
1051      */
1052         int dlt_buffer_copy(DltBuffer *buf,unsigned char *data, int max_size);
1053
1054     /**
1055      * Remove entry from ringbuffer.
1056      * @param buf Pointer to ringbuffer structure
1057      * @return size of read data, zero if no data available, negative value if there was an error
1058      */
1059         int dlt_buffer_remove(DltBuffer *buf);
1060
1061     /**
1062      * Print information about buffer and log to internal DLT log.
1063      * @param buf Pointer to ringbuffer structure
1064      */
1065         void dlt_buffer_info(DltBuffer *buf);
1066
1067     /**
1068      * Print status of buffer and log to internal DLT log.
1069      * @param buf Pointer to ringbuffer structure
1070      */
1071         void dlt_buffer_status(DltBuffer *buf);
1072
1073     /**
1074      * Get total size in bytes of ringbuffer.
1075      * If buffer is dynamic, max size is returned.
1076      * @param buf Pointer to ringbuffer structure
1077      * @return total size of buffer
1078      */
1079         int dlt_buffer_get_total_size(DltBuffer *buf);
1080
1081     /**
1082      * Get used size in bytes of ringbuffer.
1083      * @param buf Pointer to ringbuffer structure
1084      * @return used size of buffer
1085      */
1086         int dlt_buffer_get_used_size(DltBuffer *buf);
1087
1088     /**
1089      * Get number of entries in ringbuffer.
1090      * @param buf Pointer to ringbuffer structure
1091      * @return number of entries
1092      */
1093         int dlt_buffer_get_message_count(DltBuffer *buf);
1094
1095 #if !defined (__WIN32__)
1096
1097     /**
1098      * Helper function: Setup serial connection
1099      * @param fd File descriptor of serial tty device
1100      * @param speed Serial line speed, as defined in termios.h
1101      * @return negative value if there was an error
1102      */
1103     int dlt_setup_serial(int fd, speed_t speed);
1104
1105     /**
1106      * Helper function: Convert serial line baudrate (as number) to line speed (as defined in termios.h)
1107      * @param baudrate Serial line baudrate (as number)
1108      * @return Serial line speed, as defined in termios.h
1109      */
1110     speed_t dlt_convert_serial_speed(int baudrate);
1111
1112     /**
1113      * Print dlt version and dlt svn version to buffer
1114      * @param buf Pointer to buffer
1115      */
1116     void dlt_get_version(char *buf);
1117
1118     /**
1119     * Print dlt major version to buffer
1120     * @param buf Pointer to buffer
1121     */
1122     void dlt_get_major_version(char *buf);
1123
1124     /**
1125     * Print dlt minor version to buffer
1126     * @param buf Pointer to buffer
1127     */
1128     void dlt_get_minor_version(char *buf);
1129
1130 #endif
1131
1132     /* Function prototypes which should be used only internally */
1133     /*                                                          */
1134
1135     /**
1136      * Common part of initialisation
1137      * @return negative value if there was an error
1138      */
1139     int dlt_init_common(void);
1140
1141     /**
1142      * Return the uptime of the system in 0.1 ms resolution
1143      * @return 0 if there was an error
1144      */
1145     uint32_t dlt_uptime(void);
1146
1147     /**
1148      * Print header of a DLT message
1149      * @param message pointer to structure of organising access to DLT messages
1150      * @param text pointer to a ASCII string, in which the header is written
1151      * @param size maximal size of text buffer
1152      * @param verbose if set to true verbose information is printed out.
1153      * @return negative value if there was an error
1154      */
1155     int dlt_message_print_header(DltMessage *message, char *text, uint32_t size, int verbose);
1156
1157     /**
1158      * Print payload of a DLT message as Hex-Output
1159      * @param message pointer to structure of organising access to DLT messages
1160      * @param text pointer to a ASCII string, in which the output is written
1161      * @param size maximal size of text buffer
1162      * @param verbose if set to true verbose information is printed out.
1163      * @return negative value if there was an error
1164      */
1165     int dlt_message_print_hex(DltMessage *message, char *text, uint32_t size, int verbose);
1166
1167     /**
1168      * Print payload of a DLT message as ASCII-Output
1169      * @param message pointer to structure of organising access to DLT messages
1170      * @param text pointer to a ASCII string, in which the output is written
1171      * @param size maximal size of text buffer
1172      * @param verbose if set to true verbose information is printed out.
1173      * @return negative value if there was an error
1174      */
1175     int dlt_message_print_ascii(DltMessage *message, char *text, uint32_t size, int verbose);
1176
1177     /**
1178      * Print payload of a DLT message as Mixed-Ouput (Hex and ASCII), for plain text output
1179      * @param message pointer to structure of organising access to DLT messages
1180      * @param text pointer to a ASCII string, in which the output is written
1181      * @param size maximal size of text buffer
1182      * @param verbose if set to true verbose information is printed out.
1183      * @return negative value if there was an error
1184      */
1185     int dlt_message_print_mixed_plain(DltMessage *message, char *text, uint32_t size, int verbose);
1186
1187     /**
1188      * Print payload of a DLT message as Mixed-Ouput (Hex and ASCII), for HTML text output
1189      * @param message pointer to structure of organising access to DLT messages
1190      * @param text pointer to a ASCII string, in which the output is written
1191      * @param size maximal size of text buffer
1192      * @param verbose if set to true verbose information is printed out.
1193      * @return negative value if there was an error
1194      */
1195     int dlt_message_print_mixed_html(DltMessage *message, char *text, uint32_t size, int verbose);
1196
1197     /**
1198      * Decode and print a argument of a DLT message
1199      * @param msg pointer to structure of organising access to DLT messages
1200      * @param type_info Type of argument
1201      * @param ptr pointer to pointer to data (pointer to data is changed within this function)
1202      * @param datalength pointer to datalength (datalength is changed within this function)
1203      * @param text pointer to a ASCII string, in which the output is written
1204      * @param textlength maximal size of text buffer
1205      * @param byteLength If argument is a string, and this value is 0 or greater, this value will be taken as string length
1206      * @param verbose if set to true verbose information is printed out.
1207      * @return negative value if there was an error
1208      */
1209     int dlt_message_argument_print(DltMessage *msg,uint32_t type_info,uint8_t **ptr,int32_t *datalength,char *text,int textlength,int byteLength,int verbose);
1210
1211 #ifdef __cplusplus
1212 }
1213 #endif
1214
1215 /**
1216   \}
1217 */
1218
1219 #endif /* DLT_COMMON_H */