summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>2020-04-17 15:37:52 +0700
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2020-07-06 10:04:07 +0900
commit3d33c38601e2cedd3891c65c31993fd28d8e95bc (patch)
treeb5d0b0d0e28cbf9d91854d7e8a4a151229c93a26 /include
parentc2f5a1935a61c11f1b4a43e88417a3baaa1e6dad (diff)
downloadDLT-daemon-3d33c38601e2cedd3891c65c31993fd28d8e95bc.tar.gz
Improve performance of DLT file parsing
Introduce new API to support quick parsing a DLT file. Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
Diffstat (limited to 'include')
-rw-r--r--include/dlt/dlt_common.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/dlt/dlt_common.h b/include/dlt/dlt_common.h
index 026cf75..be033db 100644
--- a/include/dlt/dlt_common.h
+++ b/include/dlt/dlt_common.h
@@ -210,6 +210,9 @@ enum {
# define DLT_SIZE_WSID (sizeof(uint32_t))
# define DLT_SIZE_WTMS (sizeof(uint32_t))
+/* Size of buffer for text output */
+#define DLT_CONVERT_TEXTBUFSIZE 10024
+
/**
* Definitions for GET_LOG_INFO
*/
@@ -1042,6 +1045,17 @@ DltReturnValue dlt_file_set_filter(DltFile *file, DltFilter *filter, int verbose
*/
DltReturnValue dlt_file_open(DltFile *file, const char *filename, int verbose);
/**
+ * This function reads DLT file and parse DLT message one by one.
+ * Each message will be written into new file.
+ * If a filter is set, the filter list is used.
+ * @param file pointer to structure of organizing access to DLT file
+ * @param filename file to contain parsed DLT messages.
+ * @param type 1 = payload as hex, 2 = payload as ASCII.
+ * @param verbose if set to true verbose information is printed out.
+ * @return 0 = message does not match filter, 1 = message was read, negative value if there was an error
+ */
+DltReturnValue dlt_file_quick_parsing(DltFile *file, const char *filename, int type, int verbose);
+/**
* Find next message in the DLT file and parse them.
* This function finds the next message in the DLT file.
* If a filter is set, the filter list is used.