diff options
author | Biastoch, Darian (ADITG/ESM) <dbiastoch@de.adit-jv.com> | 2021-04-08 06:36:18 +0000 |
---|---|---|
committer | Saya Sugiura <39760799+ssugiura@users.noreply.github.com> | 2021-06-30 10:54:59 +0900 |
commit | 57d981f9d765286a85e682f7bee0769d7349e7aa (patch) | |
tree | 3fbfef66707cff032da293b1e7ef249131845032 /src/console/dlt-control-common.h | |
parent | 72dc5bb1fa7bd0823ef17269ab6e5c7dd76f90fd (diff) | |
download | DLT-daemon-57d981f9d765286a85e682f7bee0769d7349e7aa.tar.gz |
Alternative solutions for json-c dependency
json-c dependency was removed from libdlt ('dlt_common') and shifted into 'dlt-control-common'. By this only the command line tools have a dependency on json-c.
dlt-control-common is now built as a static library, so that it can be linked against json-c. Command line tools that included only the .c file of dlt-control-common before, are now linked against this static libarary (see console/CMakeLists.txt).
Signed-off-by: dbiastoch <dbiastoch@de.adit-jv.com>
Diffstat (limited to 'src/console/dlt-control-common.h')
-rw-r--r-- | src/console/dlt-control-common.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/console/dlt-control-common.h b/src/console/dlt-control-common.h index 41606bb..697a927 100644 --- a/src/console/dlt-control-common.h +++ b/src/console/dlt-control-common.h @@ -31,6 +31,8 @@ #define DLT_CTRL_ECUID_LEN 10 #define DLT_DAEMON_FLAG_MAX 256 +#define JSON_FILTER_SIZE 200 /* Size in bytes, that the definition of one filter with all parameters needs */ + #ifndef pr_fmt # define pr_fmt(fmt) fmt #endif @@ -84,4 +86,23 @@ int dlt_control_send_message(DltControlMsgBody *, int); /* Destroys the connection to the daemon */ int dlt_control_deinit(void); + +#ifdef EXTENDED_FILTERING +/** + * Load json filter from file. + * @param filter pointer to structure of organising DLT filter + * @param filename filename to load filters from + * @param verbose if set to true verbose information is printed out. + * @return negative value if there was an error + */ +DltReturnValue dlt_json_filter_load(DltFilter *filter, const char *filename, int verbose); +/** + * Save filter in json format to file. + * @param filter pointer to structure of organising DLT filter + * @param filename filename to safe filters into + * @param verbose if set to true verbose information is printed out. + * @return negative value if there was an error + */ +DltReturnValue dlt_json_filter_save(DltFilter *filter, const char *filename, int verbose); #endif +#endif
\ No newline at end of file |