automotive-dlt
|
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) |
Definition in file dlt-system.h.
#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 | ) |
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().
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 | ( | ) |
Definition at line 121 of file dlt-system-shell.c.
References DLT_LOG, DLT_LOG_DEBUG, DLT_REGISTER_CONTEXT, DLT_REGISTER_INJECTION_CALLBACK, and DLT_STRING.
Referenced by start_threads().
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().
int read_configuration_file | ( | DltSystemConfiguration * | config, |
char * | file_name | ||
) |
Read options from the configuration file
Definition at line 196 of file dlt-system-options.c.
References DltSystemConfiguration::ApplicationId, FiletransferOptions::Compression, FiletransferOptions::CompressionLevel, SyslogOptions::ContextId, JournalOptions::ContextId, FiletransferOptions::ContextId, LogFileOptions::ContextId, LogProcessOptions::ContextId, FiletransferOptions::Count, LogFileOptions::Count, LogProcessOptions::Count, JournalOptions::CurrentBoot, FiletransferOptions::Directory, DLT_SYSTEM_LOG_DIRS_MAX, DLT_SYSTEM_LOG_FILE_MAX, DLT_SYSTEM_LOG_PROCESSES_MAX, ShellOptions::Enable, SyslogOptions::Enable, JournalOptions::Enable, FiletransferOptions::Enable, LogFileOptions::Enable, LogProcessOptions::Enable, LogFileOptions::Filename, LogProcessOptions::Filename, DltSystemConfiguration::Filetransfer, JournalOptions::Follow, init_configuration(), DltSystemConfiguration::Journal, DltSystemConfiguration::LogFile, DltSystemConfiguration::LogProcesses, MALLOC_ASSERT, JournalOptions::MapLogLevels, MAX_LINE, LogFileOptions::Mode, LogProcessOptions::Mode, LogProcessOptions::Name, NULL, SyslogOptions::Port, DltSystemConfiguration::Shell, DltSystemConfiguration::Syslog, FiletransferOptions::TempDir, FiletransferOptions::TimeDelay, LogFileOptions::TimeDelay, LogProcessOptions::TimeDelay, FiletransferOptions::TimeoutBetweenLogs, and FiletransferOptions::TimeStartup.
void register_with_dlt | ( | DltSystemConfiguration * | config | ) |
void start_filetransfer | ( | DltSystemConfiguration * | conf | ) |
Definition at line 744 of file dlt-system-filetransfer.c.
References DltSystemThreads::count, DLT_LOG, DLT_LOG_DEBUG, DLT_STRING, filetransfer_thread(), and DltSystemThreads::threads.
Referenced by start_threads().
void start_logfile | ( | DltSystemConfiguration * | conf | ) |
Definition at line 150 of file dlt-system-logfile.c.
References DltSystemThreads::count, DLT_LOG, DLT_LOG_DEBUG, DLT_STRING, logfile_thread(), threads, and DltSystemThreads::threads.
Referenced by start_threads().
void start_logprocess | ( | DltSystemConfiguration * | conf | ) |
Definition at line 168 of file dlt-system-processes.c.
References DltSystemThreads::count, DLT_LOG, DLT_LOG_DEBUG, DLT_STRING, logprocess_thread(), and DltSystemThreads::threads.
Referenced by start_threads().
void start_syslog | ( | ) |
void start_threads | ( | DltSystemConfiguration * | config | ) |
Definition at line 111 of file dlt-system-process-handling.c.
References DltSystemThreads::count, DLT_LOG, DLT_LOG_DEBUG, DLT_STRING, ShellOptions::Enable, SyslogOptions::Enable, JournalOptions::Enable, FiletransferOptions::Enable, LogFileOptions::Enable, LogProcessOptions::Enable, DltSystemConfiguration::Filetransfer, init_shell(), DltSystemConfiguration::Journal, DltSystemConfiguration::LogFile, DltSystemConfiguration::LogProcesses, MAX_THREADS, DltSystemConfiguration::Shell, DltSystemThreads::shutdown, start_filetransfer(), start_logfile(), start_logprocess(), start_syslog(), DltSystemConfiguration::Syslog, and DltSystemThreads::threads.
Referenced by DLT_DECLARE_CONTEXT().