automotive-dlt
dlt_offline_logstorage_behavior.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int dlt_logstorage_prepare_on_msg (DltLogStorageConfigData *config, DltLogStorageUserConfig *file_config, char *dev_path, int log_msg_size)
 
int dlt_logstorage_write_on_msg (DltLogStorageConfigData *config, unsigned char *data1, int size1, unsigned char *data2, int size2, unsigned char *data3, int size3)
 
int dlt_logstorage_sync_on_msg (DltLogStorageConfigData *config, int status)
 
int dlt_logstorage_prepare_msg_cache (DltLogStorageConfigData *config, DltLogStorageUserConfig *file_config, char *dev_path, int log_msg_size)
 
int dlt_logstorage_write_msg_cache (DltLogStorageConfigData *config, unsigned char *data1, int size1, unsigned char *data2, int size2, unsigned char *data3, int size3)
 
int dlt_logstorage_sync_msg_cache (DltLogStorageConfigData *config, int status)
 

Detailed Description

app begin@ Copyright (C) 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.

Author
Christoph Lipka clipk.nosp@m.a@jp.nosp@m..adit.nosp@m.-jv..nosp@m.com ADIT 2015

For further information see http://www.genivi.org/. end@

Definition in file dlt_offline_logstorage_behavior.h.

Function Documentation

int dlt_logstorage_prepare_msg_cache ( DltLogStorageConfigData config,
DltLogStorageUserConfig file_config,
char *  dev_path,
int  log_msg_size 
)

dlt_logstorage_prepare_msg_cache

Prepare the log file for a certain filer. If log file not open or log files max size reached, open a new file. Create a memory area to cache data.

Parameters
configDltLogStorageConfigData
file_configUser configurations for log file
dev_pathStorage device path
log_msg_sizeSize of log message
Returns
0 on success, -1 on error

Definition at line 680 of file dlt_offline_logstorage_behavior.c.

References DltLogStorageConfigData::cache, dlt_log(), dlt_logstorage_prepare_on_msg(), DltLogStorageConfigData::file_size, g_logstorage_cache_max, g_logstorage_cache_size, DltLogStorageConfigData::log, and NULL.

Referenced by dlt_logstorage_filter_set_strategy().

int dlt_logstorage_prepare_on_msg ( DltLogStorageConfigData config,
DltLogStorageUserConfig file_config,
char *  dev_path,
int  log_msg_size 
)

dlt_logstorage_prepare_on_msg

Prepare the log file for a certain filer. If log file not open or log files max size reached, open a new file.

Parameters
configDltLogStorageConfigData
file_configUser configurations for log file
dev_pathStorage device path
log_msg_sizeSize of log message
Returns
0 on success, -1 on error

Definition at line 539 of file dlt_offline_logstorage_behavior.c.

References dlt_log(), dlt_logstorage_open_log_file(), DltLogStorageConfigData::file_size, DltLogStorageConfigData::log, and NULL.

Referenced by dlt_logstorage_filter_set_strategy(), and dlt_logstorage_prepare_msg_cache().

int dlt_logstorage_sync_msg_cache ( DltLogStorageConfigData config,
int  status 
)
int dlt_logstorage_sync_on_msg ( DltLogStorageConfigData config,
int  status 
)

dlt_logstorage_sync_on_msg

sync data to disk.

Parameters
configDltLogStorageConfigData
statusStrategy flag
Returns
0 on success, -1 on error

Definition at line 645 of file dlt_offline_logstorage_behavior.c.

References dlt_log(), DLT_LOGSTORAGE_SYNC_ON_MSG, DltLogStorageConfigData::log, and NULL.

Referenced by dlt_logstorage_filter_set_strategy().

int dlt_logstorage_write_msg_cache ( DltLogStorageConfigData config,
unsigned char *  data1,
int  size1,
unsigned char *  data2,
int  size2,
unsigned char *  data3,
int  size3 
)

dlt_logstorage_write_msg_cache

Write the log message.

Parameters
configDltLogStorageConfigData
data1header
size1header size
data2storage header
size2storage header size
data3payload
size3payload size
Returns
0 on success, -1 on error

Definition at line 752 of file dlt_offline_logstorage_behavior.c.

References DltLogStorageConfigData::cache, dlt_log(), DltLogStorageConfigData::file_size, NULL, DltLogStorageCacheFooter::offset, and DltLogStorageCacheFooter::wrap_around_cnt.

Referenced by dlt_logstorage_filter_set_strategy().

int dlt_logstorage_write_on_msg ( DltLogStorageConfigData config,
unsigned char *  data1,
int  size1,
unsigned char *  data2,
int  size2,
unsigned char *  data3,
int  size3 
)

dlt_logstorage_write_on_msg

Write the log message.

Parameters
configDltLogStorageConfigData
data1header
size1header size
data2storage header
size2storage header size
data3payload
size3payload size
Returns
0 on success, -1 on error

Definition at line 602 of file dlt_offline_logstorage_behavior.c.

References dlt_log(), DltLogStorageConfigData::log, and NULL.

Referenced by dlt_logstorage_filter_set_strategy().