From 442688504260bb2bfcfb08a9865f223d2ab2d19a Mon Sep 17 00:00:00 2001 From: dbiastoch Date: Wed, 13 Jan 2021 11:27:17 +0100 Subject: dlt-receive: Enabled more filtering by using json filter files -Added '-j' flag to dlt-receive for reading a json filter file -Added more attributes to DltFilter (LogLevel, MaxPayload, MinPayload) for extended message filtering, when using old filters these values are set to default. Same behaviour, when they are not defined in json filter file. -extended dlt_common.c to support json filter files and new DltFilter attributes +add dlt_json_filter_load to parse a json filter file into a DltFilter +add dlt_json_filter_save to print a DltFilter into a json file -Two new libraries are used to parse the json filter files: json-c for Linux based systems and the QNX internal libjson for QNX systems -gtest_dlt_common was modified to test the new function 'dlt_json_filter_load' +add testfile_extended.dlt that contains a bigger varity of messages (different context/app IDs, lengths and log levels) +add testfilter.json which is a valid json filter file -New dependency on library was added to related CMakeLists and is described in README.md Signed-off-by: dbiastoch --- src/daemon/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/daemon') diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt index adddee3..7d3fd8e 100644 --- a/src/daemon/CMakeLists.txt +++ b/src/daemon/CMakeLists.txt @@ -39,6 +39,7 @@ set(dlt_daemon_SRCS ${PROJECT_SOURCE_DIR}/src/offlinelogstorage/dlt_offline_logstorage_behavior.c ) + if(WITH_DLT_SHM_ENABLE) set(dlt_daemon_SRCS ${dlt_daemon_SRCS} @@ -60,7 +61,7 @@ if(WITH_UDP_CONNECTION) endif(WITH_UDP_CONNECTION) add_executable(dlt-daemon ${dlt_daemon_SRCS} ${systemd_SRCS}) -target_link_libraries(dlt-daemon ${RT_LIBRARY} ${SOCKET_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) +target_link_libraries(dlt-daemon ${RT_LIBRARY} ${SOCKET_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${DLT_JSON_LIBRARY}) install(TARGETS dlt-daemon RUNTIME DESTINATION bin @@ -78,7 +79,7 @@ if (WITH_DLT_UNIT_TESTS) endif(WITH_SYSTEMD_WATCHDOG OR WITH_SYSTEMD) add_library(dlt_daemon ${library_SRCS}) - target_link_libraries(dlt_daemon ${RT_LIBRARY} ${SOCKET_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) + target_link_libraries(dlt_daemon ${RT_LIBRARY} ${SOCKET_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${DLT_JSON_LIBRARY}) install(TARGETS dlt_daemon RUNTIME DESTINATION bin -- cgit v1.2.1