automotive-dlt
dlt-system.h File Reference
#include "dlt.h"
#include "dlt_common.h"
Include dependency graph for dlt-system.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  DltSystemCliOptions
 
struct  ShellOptions
 
struct  SyslogOptions
 
struct  JournalOptions
 
struct  FiletransferOptions
 
struct  LogFileOptions
 
struct  LogProcessOptions
 
struct  DltSystemConfiguration
 
struct  DltSystemThreads
 

Macros

#define DEFAULT_CONF_FILE   ( CONFIGURATION_FILES_DIR "/dlt-system.conf")
 
#define DLT_SYSTEM_LOG_FILE_MAX   32
 
#define DLT_SYSTEM_LOG_DIRS_MAX   32
 
#define DLT_SYSTEM_LOG_PROCESSES_MAX   32
 
#define DLT_SYSTEM_MODE_OFF   0
 
#define DLT_SYSTEM_MODE_STARTUP   1
 
#define DLT_SYSTEM_MODE_REGULAR   2
 
#define MAX_LINE   1024
 
#define MAX_THREADS   8
 
#define MALLOC_ASSERT(x)
 

Functions

int read_command_line (DltSystemCliOptions *options, int argc, char *argv[])
 
int read_configuration_file (DltSystemConfiguration *config, char *file_name)
 
int daemonize ()
 
void start_threads (DltSystemConfiguration *config)
 
void join_threads ()
 
void dlt_system_signal_handler (int sig)
 
void register_with_dlt (DltSystemConfiguration *config)
 
void init_shell ()
 
void start_syslog ()
 
void start_filetransfer (DltSystemConfiguration *conf)
 
void start_logfile (DltSystemConfiguration *conf)
 
void start_logprocess (DltSystemConfiguration *conf)
 

Detailed Description

Author
Lassi Marttala lassi.nosp@m..lm..nosp@m.martt.nosp@m.ala@.nosp@m.partn.nosp@m.er.b.nosp@m.mw.de

Definition in file dlt-system.h.

Macro Definition Documentation

#define DEFAULT_CONF_FILE   ( CONFIGURATION_FILES_DIR "/dlt-system.conf")

Definition at line 64 of file dlt-system.h.

#define DLT_SYSTEM_LOG_DIRS_MAX   32

Definition at line 66 of file dlt-system.h.

Referenced by DLT_IMPORT_CONTEXT(), init_configuration(), and read_configuration_file().

#define DLT_SYSTEM_LOG_FILE_MAX   32

Definition at line 65 of file dlt-system.h.

Referenced by init_configuration(), logfile_thread(), and read_configuration_file().

#define DLT_SYSTEM_LOG_PROCESSES_MAX   32

Definition at line 67 of file dlt-system.h.

Referenced by init_configuration(), logprocess_thread(), and read_configuration_file().

#define DLT_SYSTEM_MODE_OFF   0

Definition at line 69 of file dlt-system.h.

#define DLT_SYSTEM_MODE_REGULAR   2

Definition at line 71 of file dlt-system.h.

#define DLT_SYSTEM_MODE_STARTUP   1

Definition at line 70 of file dlt-system.h.

#define MALLOC_ASSERT (   x)
Value:
if(x == NULL) {\
fprintf(stderr, "Out of memory\n");\
abort();}
#define NULL
Definition: dlt_common.h:232

Definition at line 78 of file dlt-system.h.

#define MAX_LINE   1024

Definition at line 73 of file dlt-system.h.

#define MAX_THREADS   8

Definition at line 75 of file dlt-system.h.

Referenced by start_threads().

Function Documentation

int daemonize ( )

Referenced by DLT_DECLARE_CONTEXT().

void dlt_system_signal_handler ( int  sig)

Definition at line 182 of file dlt-system-process-handling.c.

References DLT_INT, DLT_LOG, DLT_LOG_DEBUG, DLT_LOG_WARN, and DLT_STRING.

Referenced by DLT_DECLARE_CONTEXT().

void init_shell ( )
void join_threads ( )

Wait for threads to exit. There's not actually a condition currently to bail out of file transfer without a signal.

Definition at line 154 of file dlt-system-process-handling.c.

References DltSystemThreads::count, DLT_INT, DLT_LOG, DLT_LOG_DEBUG, DLT_STRING, NULL, and DltSystemThreads::threads.

Referenced by DLT_DECLARE_CONTEXT().

int read_command_line ( DltSystemCliOptions options,
int  argc,
char *  argv[] 
)

Forward declarations for the whole application

Read command line options and set the values in provided structure

Definition at line 93 of file dlt-system-options.c.

References DltSystemCliOptions::ConfigurationFileName, DltSystemCliOptions::Daemonize, init_cli_options(), MALLOC_ASSERT, and usage().

void register_with_dlt ( DltSystemConfiguration config)
void start_filetransfer ( DltSystemConfiguration conf)
void start_logfile ( DltSystemConfiguration conf)
void start_logprocess ( DltSystemConfiguration conf)
void start_syslog ( )