GDLT-38, Update license in internal headers.
[profile/ivi/dlt-daemon.git] / src / system / dlt-system.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.wenzel@bmw.de> BMW 2011-2012
17  *
18  * \file <FILE>
19  * For further information see http://www.genivi.org/.
20  * @licence end@
21  */
22
23
24 /*******************************************************************************
25 **                                                                            **
26 **  SRC-MODULE: dlt-system.h                                                  **
27 **                                                                            **
28 **  TARGET    : linux                                                         **
29 **                                                                            **
30 **  PROJECT   : DLT                                                           **
31 **                                                                            **
32 **  AUTHOR    : Alexander Wenzel Alexander.AW.Wenzel@bmw.de                   **
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 *******************************************************************************/
52
53 /*******************************************************************************
54 **                      Revision Control History                              **
55 *******************************************************************************/
56
57 #ifndef DLT_SYSTEM_H
58 #define DLT_SYSTEM_H
59
60 #define DLT_SYSTEM_MODE_OFF 0
61 #define DLT_SYSTEM_MODE_STARTUP 1
62 #define DLT_SYSTEM_MODE_REGULAR 2
63
64 #define DLT_SYSTEM_LOG_FILE_MAX 32
65 #define DLT_SYSTEM_LOG_PROCESSES_MAX 32
66
67 typedef struct {
68         char ConfigurationFile[256];
69         char ApplicationId[256];
70         int  daemonise;
71
72         int  SyslogEnable;                                      /*# Enable the Syslog Adapter (Default: 0)*/
73         char SyslogContextId[256];                      /*# The Context Id of the syslog adapter (Default: SYSL)*/
74         int  SyslogPort;                                        /*# The UDP port opened by DLT system mamager to receive system logs (Default: 47111)*/
75         
76         int  FiletransferEnable;                        /*# Enable the Filetransfer (Default: 0)*/
77         char FiletransferDirectory1[256];       /*# Directory which contains files to be transfered over DLT (Default: /tmp/filetransfer)# Files are deleted after Filetransfer is finished and after TimeDelay expired*/
78         char FiletransferDirectory2[256];
79         char FiletransferContextId[256];        /*# The Context Id of the filetransfer (Default: FILE)*/
80         int  FiletransferTimeStartup;           /*# Time after startup of dlt-system when first file is transfered (Default: 30)# Time in seconds*/
81         int  FiletransferTimeDelay;                     /*# Time to wait when transfered file is deleted and next file transfer starts (Default: 10)# Time in seconds*/
82         int  FiletransferTimeoutBetweenLogs;/*# Waits a period of time between two file transfer logs of a single file to DLT to ensure that the FIFO of DLT is not flooded.*/
83
84         /*# Log different files
85         # Mode: 0 = off, 1 = startup only, 2 = regular
86         # TimeDelay: If mode regular is set, time delay is the number of seconds for next sent
87         */
88         int  LogFileEnable;                                     /*# Enable the logging of files (Default: 0)*/
89         int  LogFileNumber;
90         char LogFileFilename[DLT_SYSTEM_LOG_FILE_MAX][256];
91         int  LogFileMode[DLT_SYSTEM_LOG_FILE_MAX];
92         int  LogFileTimeDelay[DLT_SYSTEM_LOG_FILE_MAX];
93         char LogFileContextId[DLT_SYSTEM_LOG_FILE_MAX][256];
94
95         int  LogProcessesEnable;                        /*# Enable the logging of processes (Default: 0)*/
96         char LogProcessesContextId[256];        /*# The Context Id of the kernel version (Default: PROC)*/
97
98         /*# Log different processes
99         # Name: * = all process, X=alternative name (must correspind to /proc/X/cmdline
100         # Filename: the filename in the subdirectory /proc/processid/
101         # Mode: 0 = off, 1 = startup only, 2 = regular
102         # TimeDelay: If mode regular is set, time delay is the number of seconds for next sent
103         */
104         int  LogProcessNumber;
105         char LogProcessName[DLT_SYSTEM_LOG_PROCESSES_MAX][256];
106         char LogProcessFilename[DLT_SYSTEM_LOG_PROCESSES_MAX][256];
107         int  LogProcessMode[DLT_SYSTEM_LOG_PROCESSES_MAX];
108         int  LogProcessTimeDelay[DLT_SYSTEM_LOG_PROCESSES_MAX];
109 } DltSystemOptions;
110
111 typedef struct {
112         int  timeStartup;       /* time in seconds since startup of dlt-system */
113         int  timeFiletransferDelay;     /* time in seconds to start next filetransfer */
114         char filetransferFile[256];
115         long int filetransferFilesize;
116         int  timeLogFileDelay[DLT_SYSTEM_LOG_FILE_MAX]; /* time in seconds to start next file log */
117         int  timeLogProcessDelay[DLT_SYSTEM_LOG_PROCESSES_MAX]; /* time in seconds to start next process log */
118         int      filetransferRunning;   /* 0 = stooped, 1 = running */
119         int  filetransferCountPackages; /* number of packets to be transfered */
120         int  filetransferLastSentPackage; /* last packet sent starting from 1 */
121 } DltSystemRuntime;
122
123 #endif /* DLT_SYSTEM_H */