53 #ifndef DLT_OFFLINE_LOGSTORAGE_H 54 #define DLT_OFFLINE_LOGSTORAGE_H 60 #define DLT_OFFLINE_LOGSTORAGE_MAXFILTERS 100 62 #define DLT_OFFLINE_LOGSTORAGE_INIT_DONE 1 63 #define DLT_OFFLINE_LOGSTORAGE_DEVICE_CONNECTED 1 64 #define DLT_OFFLINE_LOGSTORAGE_FREE 0 65 #define DLT_OFFLINE_LOGSTORAGE_DEVICE_DISCONNECTED 0 66 #define DLT_OFFLINE_LOGSTORAGE_CONFIG_DONE 1 68 #define DLT_OFFLINE_LOGSTORAGE_SYNC_CACHES 2 70 #define DLT_OFFLINE_LOGSTORAGE_MAX_KEY_LEN 10 71 #define DLT_OFFLINE_LOGSTORAGE_MAX_FILE_NAME_LEN 50 73 #define DLT_OFFLINE_LOGSTORAGE_FILE_EXTENSION_LEN 4 74 #define DLT_OFFLINE_LOGSTORAGE_INDEX_LEN 3 75 #define DLT_OFFLINE_LOGSTORAGE_MAX_INDEX 999 76 #define DLT_OFFLINE_LOGSTORAGE_TIMESTAMP_LEN 16 77 #define DLT_OFFLINE_LOGSTORAGE_INDEX_OFFSET (DLT_OFFLINE_LOGSTORAGE_TIMESTAMP_LEN + \ 78 DLT_OFFLINE_LOGSTORAGE_FILE_EXTENSION_LEN + \ 79 DLT_OFFLINE_LOGSTORAGE_INDEX_LEN) 80 #define DLT_OFFLINE_LOGSTORAGE_MAX_LOG_FILE_LEN (DLT_OFFLINE_LOGSTORAGE_MAX_FILE_NAME_LEN + \ 81 DLT_OFFLINE_LOGSTORAGE_TIMESTAMP_LEN + \ 82 DLT_OFFLINE_LOGSTORAGE_INDEX_LEN + \ 83 DLT_OFFLINE_LOGSTORAGE_FILE_EXTENSION_LEN + 1) 85 #define DLT_OFFLINE_LOGSTORAGE_FILTER_UNINIT 0 86 #define DLT_OFFLINE_LOGSTORAGE_ECUID (1<<8) 87 #define DLT_OFFLINE_LOGSTORAGE_FILTER_PRESENT (1<<7) 88 #define DLT_OFFLINE_LOGSTORAGE_APP_INIT (1<<6) 89 #define DLT_OFFLINE_LOGSTORAGE_CTX_INIT (1<<5) 90 #define DLT_OFFLINE_LOGSTORAGE_LOG_LVL_INIT (1<<4) 91 #define DLT_OFFLINE_LOGSTORAGE_NAME_INIT (1<<3) 92 #define DLT_OFFLINE_LOGSTORAGE_SIZE_INIT (1<<2) 93 #define DLT_OFFLINE_LOGSTORAGE_SYNC_BEHAVIOR (1<<1) 94 #define DLT_OFFLINE_LOGSTORAGE_NUM_INIT 1 96 #define DLT_OFFLINE_LOGSTORAGE_FILTER_INIT 0xFD 98 #define DLT_OFFLINE_LOGSTORAGE_FILTER_INITIALIZED(A) ((A) >= DLT_OFFLINE_LOGSTORAGE_FILTER_INIT) 100 #define DLT_OFFLINE_LOGSTORAGE_IS_FILTER_PRESENT(A) ((A) & DLT_OFFLINE_LOGSTORAGE_FILTER_PRESENT) 102 #define DLT_OFFLINE_LOGSTORAGE_CONFIG_DIR_PATH_LEN 50 103 #define DLT_OFFLINE_LOGSTORAGE_CONFIG_FILE_NAME "dlt_logstorage.conf" 106 #define DLT_OFFLINE_LOGSTORAGE_MAX_PATH_LEN (DLT_OFFLINE_LOGSTORAGE_MAX_LOG_FILE_LEN + \ 107 DLT_OFFLINE_LOGSTORAGE_CONFIG_DIR_PATH_LEN + 3) 109 #define DLT_OFFLINE_LOGSTORAGE_MAX(A, B) ((A) > (B) ? (A) : (B)) 110 #define DLT_OFFLINE_LOGSTORAGE_MIN(A, B) ((A) < (B) ? (A) : (B)) 112 #define DLT_OFFLINE_LOGSTORAGE_MAX_WRITE_ERRORS 5 113 #define DLT_OFFLINE_LOGSTORAGE_MAX_KEY_NUM 8 115 #define DLT_OFFLINE_LOGSTORAGE_CONFIG_SECTION "FILTER" 116 #define DLT_OFFLINE_LOGSTORAGE_GENERAL_CONFIG_SECTION "GENERAL" 119 #define DLT_LOGSTORAGE_SYNC_ON_ERROR -1 120 #define DLT_LOGSTORAGE_SYNC_ON_MSG 1 121 #define DLT_LOGSTORAGE_SYNC_ON_DAEMON_EXIT (1<<1) 122 #define DLT_LOGSTORAGE_SYNC_ON_DEMAND (1<<2) 123 #define DLT_LOGSTORAGE_SYNC_ON_DEVICE_DISCONNECT (1<<3) 125 #define DLT_OFFLINE_LOGSTORAGE_IS_STRATEGY_SET(S, s) ((S) & (s)) 172 unsigned char *data1,
174 unsigned char *data2,
176 unsigned char *data3,
196 struct hsearch_data config_htab;
280 unsigned char *data1,
282 unsigned char *data2,
284 unsigned char *data3,
unsigned int g_logstorage_cache_size
DltLogStorageConfigData ** dlt_logstorage_get_config(DltLogStorage *handle, char *apid, char *ctid, int *num_config)
int dlt_logstorage_sync_caches(DltLogStorage *handle)
unsigned int connection_type
DltLogStorageConfig * config_data
unsigned int logfile_maxcounter
int dlt_logstorage_device_connected(DltLogStorage *handle, char *mount_point)
DltLogStorageFileList * records
#define DLT_MOUNT_PATH_MAX
int dlt_logstorage_device_disconnected(DltLogStorage *handle, int reason)
int dlt_logstorage_write(DltLogStorage *handle, DltLogStorageUserConfig *uconfig, unsigned char *data1, int size1, unsigned char *data2, int size2, unsigned char *data3, int size3)
unsigned int logfile_counteridxlen
int dlt_logstorage_load_config(DltLogStorage *handle)
int dlt_logstorage_get_loglevel_by_key(DltLogStorage *handle, char *key)
unsigned int config_status
DltLogStorageConfigData data
#define DLT_OFFLINE_LOGSTORAGE_MAX_KEY_LEN
unsigned int g_logstorage_cache_max
struct DltLogStorageFileList * next
struct DltLogStorageFileList DltLogStorageFileList