summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNarasimhaiah Suprathik (RBEI/ECF3) <uns7kor@bosch.com>2020-12-07 16:27:57 +0530
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2021-10-05 11:19:26 +0900
commitd2200fc25e3ae0c04e349a80b979476ee156d215 (patch)
tree3bc5fa08a4486e6cbe26565f664f31561bef71cf /include
parent4fb420dc7aec6e428e6f4a2320ea66c722d20337 (diff)
downloadDLT-daemon-d2200fc25e3ae0c04e349a80b979476ee156d215.tar.gz
lib: Add MaxFileSize handling
Signed-Off By: Saya Sugiura <ssugiura@jp.adit-jv.com>
Diffstat (limited to 'include')
-rw-r--r--include/dlt/dlt_types.h1
-rw-r--r--include/dlt/dlt_user.h.in9
2 files changed, 10 insertions, 0 deletions
diff --git a/include/dlt/dlt_types.h b/include/dlt/dlt_types.h
index 2880c89..6dd92d2 100644
--- a/include/dlt/dlt_types.h
+++ b/include/dlt/dlt_types.h
@@ -83,6 +83,7 @@ typedef unsigned int speed_t;
*/
typedef enum
{
+ DLT_RETURN_FILESZERR = -8,
DLT_RETURN_LOGGING_DISABLED = -7,
DLT_RETURN_USER_BUFFER_FULL = -6,
DLT_RETURN_WRONG_PARAMETER = -5,
diff --git a/include/dlt/dlt_user.h.in b/include/dlt/dlt_user.h.in
index b4d508d..30eb234 100644
--- a/include/dlt/dlt_user.h.in
+++ b/include/dlt/dlt_user.h.in
@@ -211,6 +211,7 @@ typedef struct
pthread_t dlt_segmented_nwt_handle; /**< thread handle of segmented sending */
#endif
int8_t dlt_is_file; /**< Target of logging: 1 to file, 0 to daemon */
+ unsigned int filesize_max; /**< Maximum size of existing file in case dlt_is_file=1 */
dlt_ll_ts_type *dlt_ll_ts; /** [MAX_DLT_LL_TS_ENTRIES]; < Internal management struct for all
* contexts */
@@ -821,6 +822,14 @@ DltReturnValue dlt_init();
DltReturnValue dlt_init_file(const char *name);
/**
+ * Set maximum file size if lib is configured to write only to file.
+ * This function has to be called after dlt_init_file().
+ * @param filesize maximum file size
+ * @return Value from DltReturnValue enum
+ */
+DltReturnValue dlt_set_filesize_max(unsigned int filesize);
+
+/**
* Terminate the user lib.
* This function has to be called when finishing using the DLT user lib.
* @return Value from DltReturnValue enum