automotive-dlt
DLT Daemon API

Data Structures

struct  DltDaemonApplication
 
struct  DltDaemonContext
 
struct  DltDaemon
 

Macros

#define DLT_DAEMON_RINGBUFFER_MIN_SIZE   500000
 
#define DLT_DAEMON_RINGBUFFER_MAX_SIZE   10000000
 
#define DLT_DAEMON_RINGBUFFER_STEP_SIZE   500000
 
#define DLT_DAEMON_SEND_TO_ALL   -3
 
#define DLT_DAEMON_SEND_FORCE   -4
 
#define DLT_DAEMON_SEM_LOCK()   { sem_wait(&dlt_daemon_mutex); }
 
#define DLT_DAEMON_SEM_FREE()   { sem_post(&dlt_daemon_mutex); }
 

Enumerations

enum  DltDaemonState {
  DLT_DAEMON_STATE_INIT = 0, DLT_DAEMON_STATE_BUFFER = 1, DLT_DAEMON_STATE_BUFFER_FULL = 2, DLT_DAEMON_STATE_SEND_BUFFER = 3,
  DLT_DAEMON_STATE_SEND_DIRECT = 4
}
 

Functions

int dlt_daemon_init (DltDaemon *daemon, unsigned long RingbufferMinSize, unsigned long RingbufferMaxSize, unsigned long RingbufferStepSize, const char *runtime_directory, int InitialContextLogLevel, int InitialContextTraceStatus, int ForceLLTS, int verbose)
 
int dlt_daemon_free (DltDaemon *daemon, int verbose)
 
DltDaemonApplicationdlt_daemon_application_add (DltDaemon *daemon, char *apid, pid_t pid, char *description, int verbose)
 
int dlt_daemon_application_del (DltDaemon *daemon, DltDaemonApplication *application, int verbose)
 
DltDaemonApplicationdlt_daemon_application_find (DltDaemon *daemon, char *apid, int verbose)
 
int dlt_daemon_applications_load (DltDaemon *daemon, const char *filename, int verbose)
 
int dlt_daemon_applications_save (DltDaemon *daemon, const char *filename, int verbose)
 
int dlt_daemon_applications_invalidate_fd (DltDaemon *daemon, int fd, int verbose)
 
int dlt_daemon_applications_clear (DltDaemon *daemon, int verbose)
 
DltDaemonContextdlt_daemon_context_add (DltDaemon *daemon, char *apid, char *ctid, int8_t log_level, int8_t trace_status, int log_level_pos, int user_handle, char *description, int verbose)
 
int dlt_daemon_context_del (DltDaemon *daemon, DltDaemonContext *context, int verbose)
 
DltDaemonContextdlt_daemon_context_find (DltDaemon *daemon, char *apid, char *ctid, int verbose)
 
int dlt_daemon_contexts_invalidate_fd (DltDaemon *daemon, int fd, int verbose)
 
int dlt_daemon_contexts_clear (DltDaemon *daemon, int verbose)
 
int dlt_daemon_contexts_load (DltDaemon *daemon, const char *filename, int verbose)
 
int dlt_daemon_contexts_save (DltDaemon *daemon, const char *filename, int verbose)
 
int dlt_daemon_configuration_load (DltDaemon *daemon, const char *filename, int verbose)
 
int dlt_daemon_configuration_save (DltDaemon *daemon, const char *filename, int verbose)
 
int dlt_daemon_user_send_log_level (DltDaemon *daemon, DltDaemonContext *context, int verbose)
 
int dlt_daemon_user_send_log_state (DltDaemon *daemon, DltDaemonApplication *app, int verbose)
 
void dlt_daemon_user_send_default_update (DltDaemon *daemon, int verbose)
 
void dlt_daemon_user_send_all_update (DltDaemon *daemon, int8_t log_level, int verbose)
 
void dlt_daemon_user_send_all_log_state (DltDaemon *daemon, int verbose)
 
void dlt_daemon_control_reset_to_factory_default (DltDaemon *daemon, const char *filename, const char *filename1, int InitialContextLogLevel, int InitialContextTraceStatus, int InitialEnforceLlTsStatus, int verbose)
 
void dlt_daemon_change_state (DltDaemon *daemon, DltDaemonState newState)
 

Variables

sem_t dlt_daemon_mutex
 

Detailed Description

Macro Definition Documentation

#define DLT_DAEMON_RINGBUFFER_MAX_SIZE   10000000

Ring buffer size for storing log messages while no client is connected

Definition at line 91 of file dlt_daemon_common.h.

Referenced by option_file_parser().

#define DLT_DAEMON_RINGBUFFER_MIN_SIZE   500000

Ring buffer size for storing log messages while no client is connected

Definition at line 90 of file dlt_daemon_common.h.

Referenced by option_file_parser().

#define DLT_DAEMON_RINGBUFFER_STEP_SIZE   500000

Ring buffer size for storing log messages while no client is connected

Definition at line 92 of file dlt_daemon_common.h.

Referenced by option_file_parser().

#define DLT_DAEMON_SEM_FREE ( )    { sem_post(&dlt_daemon_mutex); }
#define DLT_DAEMON_SEM_LOCK ( )    { sem_wait(&dlt_daemon_mutex); }
#define DLT_DAEMON_SEND_FORCE   -4

Constant value to identify the command "send force to all"

Definition at line 95 of file dlt_daemon_common.h.

Referenced by dlt_daemon_client_send(), and dlt_daemon_send_ringbuffer_to_client().

Enumeration Type Documentation

Definitions of DLT daemon logging states

Enumerator
DLT_DAEMON_STATE_INIT 

Initial state

DLT_DAEMON_STATE_BUFFER 

logging is buffered until external logger is connected or internal logging is activated

DLT_DAEMON_STATE_BUFFER_FULL 

then internal buffer is full, wait for connect from client

DLT_DAEMON_STATE_SEND_BUFFER 

external logger is connected, but buffer is still not empty or external logger queue is full

DLT_DAEMON_STATE_SEND_DIRECT 

External logger is connected or internal logging is active, and buffer is empty

Definition at line 106 of file dlt_daemon_common.h.

Function Documentation

DltDaemonApplication* dlt_daemon_application_add ( DltDaemon daemon,
char *  apid,
pid_t  pid,
char *  description,
int  verbose 
)

Add (new) application to internal application management

Parameters
daemonpointer to dlt daemon structure
apidpointer to application id
pidprocess id of user application
descriptiondescription of application
verboseif set to true verbose information is printed out.
Returns
Pointer to added context, null pointer on error

Definition at line 298 of file dlt_daemon_common.c.

References DltDaemonApplication::apid, DltDaemonApplication::application_description, DltDaemon::applications, DLT_DAEMON_APPL_ALLOC_SIZE, dlt_daemon_application_find(), dlt_daemon_applications_invalidate_fd(), dlt_daemon_cmp_apid(), DLT_DAEMON_COMMON_TEXTBUFSIZE, dlt_daemon_contexts_invalidate_fd(), DLT_FD_INIT, dlt_log(), dlt_set_id(), dltFifoBaseDir, NULL, DltDaemon::num_applications, DltDaemonApplication::num_contexts, DltDaemonApplication::pid, str, and DltDaemonApplication::user_handle.

Referenced by dlt_daemon_applications_load(), and dlt_daemon_process_user_message_register_application().

int dlt_daemon_application_del ( DltDaemon daemon,
DltDaemonApplication application,
int  verbose 
)

Delete application from internal application management

Parameters
daemonpointer to dlt daemon structure
applicationpointer to application to be deleted
verboseif set to true verbose information is printed out.
Returns
negative value if there was an error

Definition at line 429 of file dlt_daemon_common.c.

References DltDaemonApplication::application_description, DltDaemon::applications, DLT_FD_INIT, DLT_FD_MINIMUM, NULL, DltDaemon::num_applications, PRINT_FUNCTION_VERBOSE, and DltDaemonApplication::user_handle.

Referenced by dlt_daemon_process_user_message_unregister_application().

DltDaemonApplication* dlt_daemon_application_find ( DltDaemon daemon,
char *  apid,
int  verbose 
)

Find application with specific application id

Parameters
daemonpointer to dlt daemon structure
apidpointer to application id
verboseif set to true verbose information is printed out.
Returns
Pointer to application, null pointer on error or not found

Definition at line 471 of file dlt_daemon_common.c.

References DltDaemonApplication::apid, DltDaemon::applications, dlt_daemon_cmp_apid(), DLT_ID_SIZE, dlt_set_id(), NULL, DltDaemon::num_applications, and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_application_add(), dlt_daemon_context_add(), dlt_daemon_context_del(), dlt_daemon_control_get_log_info(), dlt_daemon_process_user_message_register_context(), dlt_daemon_process_user_message_set_app_ll_ts(), and dlt_daemon_process_user_message_unregister_application().

int dlt_daemon_applications_clear ( DltDaemon daemon,
int  verbose 
)

Clear all applications in internal application management

Parameters
daemonpointer to dlt daemon structure
verboseif set to true verbose information is printed out.
Returns
negative value if there was an error

Definition at line 269 of file dlt_daemon_common.c.

References DltDaemonApplication::application_description, DltDaemon::applications, NULL, DltDaemon::num_applications, and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_free().

int dlt_daemon_applications_invalidate_fd ( DltDaemon daemon,
int  fd,
int  verbose 
)

Invalidate all applications fd, if fd is reused

Parameters
daemonpointer to dlt daemon structure
fdfile descriptor
verboseif set to true verbose information is printed out.
Returns
negative value if there was an error

Definition at line 249 of file dlt_daemon_common.c.

References DltDaemon::applications, DLT_FD_INIT, NULL, DltDaemon::num_applications, PRINT_FUNCTION_VERBOSE, and DltDaemonApplication::user_handle.

Referenced by dlt_daemon_application_add(), dlt_daemon_process_client_connect(), and dlt_daemon_process_control_connect().

int dlt_daemon_applications_load ( DltDaemon daemon,
const char *  filename,
int  verbose 
)

Load applications from file to internal context management

Parameters
daemonpointer to dlt daemon structure
filenamename of file to be used for loading
verboseif set to true verbose information is printed out.
Returns
negative value if there was an error

Definition at line 493 of file dlt_daemon_common.c.

References dlt_daemon_application_add(), DLT_DAEMON_COMMON_TEXTBUFSIZE, dlt_log(), dlt_set_id(), NULL, PRINT_FUNCTION_VERBOSE, and str.

Referenced by dlt_daemon_init().

int dlt_daemon_applications_save ( DltDaemon daemon,
const char *  filename,
int  verbose 
)

Save applications from internal context management to file

Parameters
daemonpointer to dlt daemon structure
filenamename of file to be used for saving
verboseif set to true verbose information is printed out.
Returns
negative value if there was an error

Definition at line 575 of file dlt_daemon_common.c.

References DltDaemonApplication::apid, DltDaemonApplication::application_description, DltDaemon::applications, DLT_ID_SIZE, dlt_set_id(), NULL, DltDaemon::num_applications, and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_client_process_control().

void dlt_daemon_change_state ( DltDaemon daemon,
DltDaemonState  newState 
)

Change the logging state of dlt daemon

Parameters
daemonpointer to dlt daemon structure
newStatethe requested new state

Definition at line 1352 of file dlt_daemon_common.c.

References DLT_DAEMON_STATE_BUFFER, DLT_DAEMON_STATE_BUFFER_FULL, DLT_DAEMON_STATE_INIT, DLT_DAEMON_STATE_SEND_BUFFER, DLT_DAEMON_STATE_SEND_DIRECT, dlt_log(), and DltDaemon::state.

Referenced by dlt_daemon_client_send(), dlt_daemon_close_socket(), dlt_daemon_process_client_connect(), dlt_daemon_send_ringbuffer_to_client(), and main().

int dlt_daemon_configuration_load ( DltDaemon daemon,
const char *  filename,
int  verbose 
)

Load persistant configuration

Parameters
daemonpointer to dlt daemon structure
filenamename of file to be used for loading
verboseif set to true verbose information is printed out.
Returns
negative value if there was an error

Definition at line 1035 of file dlt_daemon_common.c.

References DLT_DAEMON_COMMON_TEXTBUFSIZE, dlt_log(), DltDaemon::mode, NULL, PRINT_FUNCTION_VERBOSE, and str.

Referenced by dlt_daemon_init().

int dlt_daemon_configuration_save ( DltDaemon daemon,
const char *  filename,
int  verbose 
)

Save configuration persistantly

Parameters
daemonpointer to dlt daemon structure
filenamename of file to be used for saving
verboseif set to true verbose information is printed out.
Returns
negative value if there was an error

Definition at line 1014 of file dlt_daemon_common.c.

References DltDaemon::mode, NULL, and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_process_user_message_log_mode().

DltDaemonContext* dlt_daemon_context_add ( DltDaemon daemon,
char *  apid,
char *  ctid,
int8_t  log_level,
int8_t  trace_status,
int  log_level_pos,
int  user_handle,
char *  description,
int  verbose 
)

Add (new) context to internal context management

Parameters
daemonpointer to dlt daemon structure
apidpointer to application id
ctidpointer to context id
log_levellog level of context
trace_statustrace status of context
log_level_posoffset of context in context field on user application
user_handleconnection handle for connection to user application
descriptiondescription of context
verboseif set to true verbose information is printed out.
Returns
Pointer to added context, null pointer on error

Definition at line 615 of file dlt_daemon_common.c.

References DltDaemonContext::apid, DltDaemonContext::context_description, DltDaemon::contexts, DltDaemonContext::ctid, DltDaemon::default_log_level, DltDaemon::default_trace_status, dlt_daemon_application_find(), dlt_daemon_cmp_apid_ctid(), DLT_DAEMON_COMMON_TEXTBUFSIZE, DLT_DAEMON_CONTEXT_ALLOC_SIZE, dlt_daemon_context_find(), dlt_log(), DLT_LOG_DEFAULT, DLT_LOG_VERBOSE, dlt_set_id(), DLT_TRACE_STATUS_DEFAULT, DLT_TRACE_STATUS_ON, DltDaemon::force_ll_ts, DltDaemonContext::log_level, DltDaemonContext::log_level_pos, NULL, DltDaemonApplication::num_contexts, DltDaemon::num_contexts, PRINT_FUNCTION_VERBOSE, DltDaemon::runtime_context_cfg_loaded, str, DltDaemonContext::trace_status, and DltDaemonContext::user_handle.

Referenced by dlt_daemon_contexts_load(), and dlt_daemon_process_user_message_register_context().

int dlt_daemon_context_del ( DltDaemon daemon,
DltDaemonContext context,
int  verbose 
)

Delete context from internal context management

Parameters
daemonpointer to dlt daemon structure
contextpointer to context to be deleted
verboseif set to true verbose information is printed out.
Returns
negative value if there was an error

Definition at line 748 of file dlt_daemon_common.c.

References DltDaemonContext::apid, DltDaemonContext::context_description, DltDaemon::contexts, dlt_daemon_application_find(), NULL, DltDaemonApplication::num_contexts, DltDaemon::num_contexts, and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_process_user_message_unregister_application(), and dlt_daemon_process_user_message_unregister_context().

DltDaemonContext* dlt_daemon_context_find ( DltDaemon daemon,
char *  apid,
char *  ctid,
int  verbose 
)

Find context with specific application id and context id

Parameters
daemonpointer to dlt daemon structure
apidpointer to application id
ctidpointer to context id
verboseif set to true verbose information is printed out.
Returns
Pointer to context, null pointer on error or not found

Definition at line 789 of file dlt_daemon_common.c.

References DltDaemonContext::apid, DltDaemon::contexts, DltDaemonContext::ctid, dlt_daemon_cmp_apid_ctid(), DLT_ID_SIZE, dlt_set_id(), NULL, DltDaemon::num_contexts, and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_context_add(), dlt_daemon_control_callsw_cinjection(), dlt_daemon_control_get_log_info(), dlt_daemon_control_set_log_level(), dlt_daemon_control_set_trace_status(), dlt_daemon_process_user_message_unregister_context(), and dlt_logstorage_update_context().

int dlt_daemon_contexts_clear ( DltDaemon daemon,
int  verbose 
)

Clear all contexts in internal context management

Parameters
daemonpointer to dlt daemon structure
verboseif set to true verbose information is printed out.
Returns
negative value if there was an error

Definition at line 833 of file dlt_daemon_common.c.

References DltDaemon::applications, DltDaemonContext::context_description, DltDaemon::contexts, NULL, DltDaemon::num_applications, DltDaemonApplication::num_contexts, DltDaemon::num_contexts, and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_free().

int dlt_daemon_contexts_invalidate_fd ( DltDaemon daemon,
int  fd,
int  verbose 
)

Invalidate all contexts fd, if fd is reused

Parameters
daemonpointer to dlt daemon structure
fdfile descriptor
verboseif set to true verbose information is printed out.
Returns
negative value if there was an error

Definition at line 813 of file dlt_daemon_common.c.

References DltDaemon::contexts, DLT_FD_INIT, NULL, DltDaemon::num_contexts, PRINT_FUNCTION_VERBOSE, and DltDaemonContext::user_handle.

Referenced by dlt_daemon_application_add(), dlt_daemon_process_client_connect(), and dlt_daemon_process_control_connect().

int dlt_daemon_contexts_load ( DltDaemon daemon,
const char *  filename,
int  verbose 
)

Load contexts from file to internal context management

Parameters
daemonpointer to dlt daemon structure
filenamename of file to be used for loading
verboseif set to true verbose information is printed out.
Returns
negative value if there was an error

Definition at line 868 of file dlt_daemon_common.c.

References DLT_DAEMON_COMMON_TEXTBUFSIZE, dlt_daemon_context_add(), dlt_log(), dlt_set_id(), NULL, PRINT_FUNCTION_VERBOSE, and str.

Referenced by dlt_daemon_init().

int dlt_daemon_contexts_save ( DltDaemon daemon,
const char *  filename,
int  verbose 
)

Save contexts from internal context management to file

Parameters
daemonpointer to dlt daemon structure
filenamename of file to be used for saving
verboseif set to true verbose information is printed out.
Returns
negative value if there was an error

Definition at line 967 of file dlt_daemon_common.c.

References DltDaemonContext::apid, DltDaemonContext::context_description, DltDaemon::contexts, DltDaemonContext::ctid, DLT_ID_SIZE, dlt_set_id(), DltDaemonContext::log_level, NULL, DltDaemon::num_contexts, PRINT_FUNCTION_VERBOSE, and DltDaemonContext::trace_status.

Referenced by dlt_daemon_client_process_control().

void dlt_daemon_control_reset_to_factory_default ( DltDaemon daemon,
const char *  filename,
const char *  filename1,
int  InitialContextLogLevel,
int  InitialContextTraceStatus,
int  InitialEnforceLlTsStatus,
int  verbose 
)

Process reset to factory default control message

Parameters
daemonpointer to dlt daemon structure
filenamename of file containing the runtime defaults for applications
filename1name of file containing the runtime defaults for contexts
InitialContextLogLevelloglevel to be sent to context when those register with loglevel default, read from dlt.conf
InitialContextTraceStatustracestatus to be sent to context when those register with tracestatus default, read from dlt.conf
ForceLLTSforce default log-level
verboseif set to true verbose information is printed out.

Definition at line 1211 of file dlt_daemon_common.c.

References DltDaemon::default_log_level, DltDaemon::default_trace_status, dlt_daemon_user_send_default_update(), dlt_log(), DltDaemon::force_ll_ts, NULL, and PRINT_FUNCTION_VERBOSE.

Referenced by dlt_daemon_client_process_control().

int dlt_daemon_free ( DltDaemon daemon,
int  verbose 
)

De-Initialise the dlt daemon structure

Parameters
daemonpointer to dlt daemon structure
verboseif set to true verbose information is printed out.
Returns
negative value if there was an error

Definition at line 228 of file dlt_daemon_common.c.

References DltDaemon::client_ringbuffer, dlt_buffer_free_dynamic(), dlt_daemon_applications_clear(), dlt_daemon_contexts_clear(), NULL, and PRINT_FUNCTION_VERBOSE.

Referenced by main().

int dlt_daemon_init ( DltDaemon daemon,
unsigned long  RingbufferMinSize,
unsigned long  RingbufferMaxSize,
unsigned long  RingbufferStepSize,
const char *  runtime_directory,
int  InitialContextLogLevel,
int  InitialContextTraceStatus,
int  ForceLLTS,
int  verbose 
)

Initialise the dlt daemon structure This function must be called before using further dlt daemon structure

Parameters
daemonpointer to dlt daemon structure
RingbufferMinSizeringbuffer size
RingbufferMaxSizeringbuffer size
RingbufferStepSizeringbuffer size
runtime_directoryDirectory of persistent configuration
InitialContextLogLevelloglevel to be sent to context when those register with loglevel default, read from dlt.conf
InitialContextTraceStatustracestatus to be sent to context when those register with tracestatus default, read from dlt.conf
ForceLLTSforce default log-level
verboseif set to true verbose information is printed out.
Returns
negative value if there was an error

Definition at line 132 of file dlt_daemon_common.c.

References DltDaemon::applications, DltDaemon::client_ringbuffer, DltDaemon::connectionState, DltDaemon::contexts, DltDaemon::default_log_level, DltDaemon::default_trace_status, dlt_buffer_init_dynamic(), dlt_daemon_applications_load(), DLT_DAEMON_COMMON_TEXTBUFSIZE, dlt_daemon_configuration_load(), dlt_daemon_contexts_load(), DLT_DAEMON_STATE_INIT, dlt_log(), DLT_RETURN_ERROR, DLT_RUNTIME_APPLICATION_CFG, DLT_RUNTIME_CONFIGURATION, DLT_RUNTIME_CONTEXT_CFG, DLT_RUNTIME_DEFAULT_DIRECTORY, dlt_set_id(), DLT_USER_MODE_EXTERNAL, DltDaemon::ecuid, DltDaemon::force_ll_ts, DltDaemon::mode, NULL, DltDaemon::num_applications, DltDaemon::num_contexts, DltDaemon::overflow_counter, PRINT_FUNCTION_VERBOSE, DltDaemon::runtime_application_cfg, DltDaemon::runtime_configuration, DltDaemon::runtime_context_cfg, DltDaemon::runtime_context_cfg_loaded, DltDaemon::sendserialheader, DltDaemon::state, DltDaemon::storage_handle, str, and DltDaemon::timingpackets.

Referenced by dlt_daemon_local_init_p2().

void dlt_daemon_user_send_all_log_state ( DltDaemon daemon,
int  verbose 
)

Send user messages to all user applications the log status everytime the client is connected or disconnected.

Parameters
daemonpointer to dlt daemon structure
verboseif set to true verbose information is printed out.

Definition at line 1322 of file dlt_daemon_common.c.

References DltDaemon::applications, dlt_daemon_user_send_log_state(), DLT_FD_MINIMUM, dlt_log(), NULL, DltDaemon::num_applications, PRINT_FUNCTION_VERBOSE, and DltDaemonApplication::user_handle.

Referenced by dlt_daemon_close_socket(), and dlt_daemon_process_client_connect().

void dlt_daemon_user_send_all_update ( DltDaemon daemon,
int8_t  log_level,
int  verbose 
)

Send user messages to all user applications context, or trace status to update with the new log level

Parameters
daemonpointer to dlt daemon structure
loglevel to be set
verboseif set to true verbose information is printed out.

Definition at line 1293 of file dlt_daemon_common.c.

References DltDaemon::contexts, dlt_daemon_user_send_log_level(), DLT_FD_MINIMUM, DltDaemonContext::log_level, NULL, DltDaemon::num_contexts, PRINT_FUNCTION_VERBOSE, and DltDaemonContext::user_handle.

Referenced by dlt_daemon_control_set_all_log_level().

void dlt_daemon_user_send_default_update ( DltDaemon daemon,
int  verbose 
)

Send user messages to all user applications using default context, or trace status to update those values

Parameters
daemonpointer to dlt daemon structure
verboseif set to true verbose information is printed out.

Definition at line 1259 of file dlt_daemon_common.c.

References DltDaemon::contexts, dlt_daemon_user_send_log_level(), DLT_FD_MINIMUM, dlt_log(), DLT_LOG_DEFAULT, DLT_TRACE_STATUS_DEFAULT, DltDaemonContext::log_level, NULL, DltDaemon::num_contexts, PRINT_FUNCTION_VERBOSE, DltDaemonContext::trace_status, and DltDaemonContext::user_handle.

Referenced by dlt_daemon_control_reset_to_factory_default(), dlt_daemon_control_set_default_log_level(), and dlt_daemon_control_set_default_trace_status().

int dlt_daemon_user_send_log_state ( DltDaemon daemon,
DltDaemonApplication app,
int  verbose 
)

Send user message DLT_USER_MESSAGE_LOG_STATE to user application

Parameters
daemonpointer to dlt daemon structure
apppointer to application for response
verboseif set to true verbose information is printed out.
Returns
negative value if there was an error

Definition at line 1177 of file dlt_daemon_common.c.

References DltDaemon::connectionState, DLT_FD_INIT, DLT_RETURN_ERROR, DLT_RETURN_OK, dlt_user_log_out2(), DLT_USER_MESSAGE_LOG_STATE, dlt_user_set_userheader(), NULL, PRINT_FUNCTION_VERBOSE, and DltDaemonApplication::user_handle.

Referenced by dlt_daemon_process_user_message_register_application(), and dlt_daemon_user_send_all_log_state().

Variable Documentation

sem_t dlt_daemon_mutex

Definition at line 93 of file dlt_daemon_common.c.

Referenced by dlt_daemon_local_init_p2().