automotive-dlt
|
Go to the source code of this file.
Macros | |
#define | DLT_DAEMON_LOGSTORAGE_RESET_LOGLEVEL -1 |
#define | DLT_DAEMON_LOGSTORAGE_RESET_SEND_LOGLEVEL 0 |
Functions | |
int | dlt_daemon_logstorage_get_loglevel (DltDaemon *daemon, int max_device, char *apid, char *ctid) |
void | dlt_daemon_logstorage_reset_application_loglevel (DltDaemon *daemon, int dev_num, int max_device, int verbose) |
void | dlt_daemon_logstorage_update_application_loglevel (DltDaemon *daemon, int dev_num, int verbose) |
void | dlt_daemon_logstorage_write (DltDaemon *daemon, DltDaemonFlags *user_config, unsigned char *data1, int size1, unsigned char *data2, int size2, unsigned char *data3, int size3) |
int | dlt_daemon_logstorage_setup_internal_storage (DltDaemon *daemon, char *path, int verbose) |
void | dlt_daemon_logstorage_set_logstorage_cache_size (unsigned int size) |
int | dlt_daemon_logstorage_cleanup (DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose) |
int | dlt_daemon_logstorage_sync_cache (DltDaemon *daemon, DltDaemonLocal *daemon_local, char *mnt_point, int verbose) |
DltLogStorage * | dlt_daemon_logstorage_get_device (DltDaemon *daemon, DltDaemonLocal *daemon_local, char *mnt_point, int verbose) |
app begin@ Copyright (C) 2013 - 2015 Advanced Driver Information Technology. This code is developed by Advanced Driver Information Technology. Copyright of Advanced Driver Information Technology, Bosch and DENSO.
DLT offline log storage functionality header file.
For further information see http://www.genivi.org/. end@
Definition in file dlt_daemon_offline_logstorage.h.
#define DLT_DAEMON_LOGSTORAGE_RESET_LOGLEVEL -1 |
Definition at line 60 of file dlt_daemon_offline_logstorage.h.
Referenced by dlt_daemon_logstorage_reset_application_loglevel().
#define DLT_DAEMON_LOGSTORAGE_RESET_SEND_LOGLEVEL 0 |
Definition at line 61 of file dlt_daemon_offline_logstorage.h.
Referenced by dlt_daemon_logstorage_reset_application_loglevel(), dlt_logstorage_update_all_contexts(), and dlt_logstorage_update_context().
int dlt_daemon_logstorage_cleanup | ( | DltDaemon * | daemon, |
DltDaemonLocal * | daemon_local, | ||
int | verbose | ||
) |
Cleanup dlt logstorage
daemon | Pointer to Dlt Daemon structure |
daemon_local | Pointer to Dlt Daemon Local structure |
verbose | If set to true verbose information is printed out |
Definition at line 579 of file dlt_daemon_offline_logstorage.c.
References DltLogStorage::connection_type, dlt_logstorage_device_disconnected(), DLT_LOGSTORAGE_SYNC_ON_DAEMON_EXIT, DLT_OFFLINE_LOGSTORAGE_DEVICE_CONNECTED, DltDaemonLocal::flags, NULL, DltDaemonFlags::offlineLogstorageMaxDevices, PRINT_FUNCTION_VERBOSE, and DltDaemon::storage_handle.
Referenced by dlt_daemon_local_cleanup().
DltLogStorage* dlt_daemon_logstorage_get_device | ( | DltDaemon * | daemon, |
DltDaemonLocal * | daemon_local, | ||
char * | mnt_point, | ||
int | verbose | ||
) |
dlt_logstorage_get_device
Get a Logstorage device handle for given the mount point.
daemon | Pointer to Dlt Daemon structure |
daemon_local | Pointer to Dlt Daemon Local structure |
mount_point | Logstorage device mount point |
verbose | If set to true verbose information is printed out |
Definition at line 658 of file dlt_daemon_offline_logstorage.c.
References DltLogStorage::device_mount_point, DltDaemonLocal::flags, NULL, DltDaemonFlags::offlineLogstorageMaxDevices, PRINT_FUNCTION_VERBOSE, and DltDaemon::storage_handle.
Referenced by dlt_daemon_logstorage_sync_cache().
int dlt_daemon_logstorage_get_loglevel | ( | DltDaemon * | daemon, |
int | max_device, | ||
char * | apid, | ||
char * | ctid | ||
) |
dlt_daemon_logstorage_get_loglevel
Obtain log level as a union of all configured storage devices and filters for the provided application id and context id
daemon | Pointer to DLT Daemon structure |
max_device | Maximum storage devices setup by the daemon |
apid | Application ID |
ctid | Context ID |
Definition at line 431 of file dlt_daemon_offline_logstorage.c.
References config, DltLogStorage::config_status, dlt_logstorage_get_config(), DLT_OFFLINE_LOGSTORAGE_CONFIG_DONE, DLT_OFFLINE_LOGSTORAGE_MAX, DltLogStorageConfigData::log_level, NULL, and DltDaemon::storage_handle.
Referenced by dlt_daemon_process_user_message_register_context().
void dlt_daemon_logstorage_reset_application_loglevel | ( | DltDaemon * | daemon, |
int | dev_num, | ||
int | max_device, | ||
int | verbose | ||
) |
dlt_daemon_logstorage_reset_application_loglevel
Reset storage log level of all running applications with -1
daemon | Pointer to DLT Daemon structure |
dev_num | Number of attached DLT Logstorage device |
verbose | If set to true verbose information is printed out |
dlt_daemon_logstorage_reset_application_loglevel
Reset storage log level of all running applications 2 steps for resetting
daemon | Pointer to DLT Daemon structure |
dev_num | Number of attached DLT Logstorage device |
max_device | Maximum storage devices setup by the daemon |
verbose | If set to true verbose information is printed out |
Definition at line 303 of file dlt_daemon_offline_logstorage.c.
References DltLogStorage::config_status, DltLogStorage::connection_type, DLT_DAEMON_LOGSTORAGE_RESET_LOGLEVEL, DLT_DAEMON_LOGSTORAGE_RESET_SEND_LOGLEVEL, dlt_daemon_logstorage_update_application_loglevel(), dlt_log(), dlt_logstorage_update_context_loglevel(), DLT_OFFLINE_LOGSTORAGE_CONFIG_DONE, DLT_OFFLINE_LOGSTORAGE_DEVICE_CONNECTED, DLT_OFFLINE_LOGSTORAGE_MAX_KEY_LEN, DltLogStorage::filter_keys, NULL, DltLogStorage::num_filter_keys, PRINT_FUNCTION_VERBOSE, and DltDaemon::storage_handle.
Referenced by dlt_daemon_control_service_logstorage().
void dlt_daemon_logstorage_set_logstorage_cache_size | ( | unsigned int | size | ) |
Set max size of logstorage cache. Stored internally in bytes
size | Size of logstorage cache [in KB] |
Definition at line 573 of file dlt_daemon_offline_logstorage.c.
References g_logstorage_cache_max.
Referenced by option_file_parser().
int dlt_daemon_logstorage_setup_internal_storage | ( | DltDaemon * | daemon, |
char * | path, | ||
int | verbose | ||
) |
dlt_daemon_logstorage_setup_internal_storage
Setup user defined path as offline log storage device
daemon | Pointer to Dlt Daemon structure |
path | User configured internal storage path |
verbose | If set to true verbose information is printed out |
Definition at line 541 of file dlt_daemon_offline_logstorage.c.
References dlt_daemon_logstorage_update_application_loglevel(), dlt_log(), dlt_logstorage_device_connected(), dlt_logstorage_load_config(), NULL, and DltDaemon::storage_handle.
Referenced by main().
int dlt_daemon_logstorage_sync_cache | ( | DltDaemon * | daemon, |
DltDaemonLocal * | daemon_local, | ||
char * | mnt_point, | ||
int | verbose | ||
) |
Sync logstorage caches
daemon | Pointer to Dlt Daemon structure |
daemon_local | Pointer to Dlt Daemon Local structure |
mount_point | Logstorage device mount point |
verbose | If set to true verbose information is printed out |
Definition at line 607 of file dlt_daemon_offline_logstorage.c.
References DltLogStorage::connection_type, dlt_daemon_logstorage_get_device(), dlt_logstorage_sync_caches(), DLT_OFFLINE_LOGSTORAGE_DEVICE_CONNECTED, DltDaemonLocal::flags, NULL, DltDaemonFlags::offlineLogstorageMaxDevices, PRINT_FUNCTION_VERBOSE, and DltDaemon::storage_handle.
Referenced by dlt_daemon_control_service_logstorage().
void dlt_daemon_logstorage_update_application_loglevel | ( | DltDaemon * | daemon, |
int | dev_num, | ||
int | verbose | ||
) |
dlt_daemon_logstorage_update_application_loglevel
Update log level of all running applications with new filter configuration available due to newly attached DltLogstorage device. The log level is only updated when the current application log level is less than the log level obtained from the storage configuration file
daemon | Pointer to DLT Daemon structure |
dev_num | Number of attached DLT Logstorage device |
verbose | if set to true verbose information is printed out |
dlt_daemon_logstorage_update_application_loglevel
Update log level of all running applications with new filter configuration available due to newly attached DltLogstorage device. The log level is only updated when the current application log level is less than the log level obtained from the storage configuration file
daemon | Pointer to DLT Daemon structure |
dev_num | Number of attached DLT Logstorage device |
verbose | If set to true verbose information is printed out |
Definition at line 374 of file dlt_daemon_offline_logstorage.c.
References DltLogStorage::config_status, DltLogStorage::connection_type, dlt_log(), dlt_logstorage_get_loglevel_by_key(), dlt_logstorage_update_context_loglevel(), DLT_OFFLINE_LOGSTORAGE_CONFIG_DONE, DLT_OFFLINE_LOGSTORAGE_DEVICE_CONNECTED, DLT_OFFLINE_LOGSTORAGE_MAX_KEY_LEN, DltLogStorage::filter_keys, NULL, DltLogStorage::num_filter_keys, PRINT_FUNCTION_VERBOSE, and DltDaemon::storage_handle.
Referenced by dlt_daemon_control_service_logstorage(), dlt_daemon_logstorage_reset_application_loglevel(), and dlt_daemon_logstorage_setup_internal_storage().
void dlt_daemon_logstorage_write | ( | DltDaemon * | daemon, |
DltDaemonFlags * | user_config, | ||
unsigned char * | data1, | ||
int | size1, | ||
unsigned char * | data2, | ||
int | size2, | ||
unsigned char * | data3, | ||
int | size3 | ||
) |
dlt_daemon_logstorage_write
Write log message to all attached storage device. If the called dlt_logstorage_write function is not able to write to the device, DltDaemon will disconnect this device.
daemon | Pointer to Dlt Daemon structure |
user_config | DltDaemon configuration |
apid | application id |
ctid | context id |
log_level | log level |
data1 | message header buffer |
size1 | message header buffer size |
data2 | message data buffer |
size2 | message data size |
dlt_daemon_logstorage_write
Write log message to all attached storage device. If the called dlt_logstorage_write function is not able to write to the device, DltDaemon will disconnect this device.
daemon | Pointer to Dlt Daemon structure |
user_config | DltDaemon configuration |
data1 | message header buffer |
size1 | message header buffer size |
data2 | message extended header buffer |
size2 | message extended header size |
data3 | message data buffer |
size3 | message data size |
Definition at line 477 of file dlt_daemon_offline_logstorage.c.
References DltLogStorage::config_status, dlt_log(), dlt_logstorage_device_disconnected(), DLT_LOGSTORAGE_SYNC_ON_DEVICE_DISCONNECT, dlt_logstorage_write(), DLT_OFFLINE_LOGSTORAGE_CONFIG_DONE, DltLogStorageUserConfig::logfile_counteridxlen, DltLogStorageUserConfig::logfile_delimiter, DltLogStorageUserConfig::logfile_maxcounter, DltLogStorageUserConfig::logfile_timestamp, NULL, DltDaemonFlags::offlineLogstorageDelimiter, DltDaemonFlags::offlineLogstorageMaxCounter, DltDaemonFlags::offlineLogstorageMaxCounterIdx, DltDaemonFlags::offlineLogstorageMaxDevices, DltDaemonFlags::offlineLogstorageTimestamp, and DltDaemon::storage_handle.
Referenced by dlt_daemon_client_send().