summaryrefslogtreecommitdiff
path: root/src/lib/dlt_user.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix for initialization of buffer settings in DLT user library. (#25)baduras2017-09-131-2/+2
|
* CMake Option: Trigger segmentation fault in case of FATAL logChristoph Lipka2017-02-021-0/+14
| | | | | | | | When the user library receives a log with log level DLT_LOG_FATAL it triggers a segmentation fault to provide information to the developer via tools like coredump. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Environment variables for library ringbufferChristoph Lipka2016-10-241-1/+51
| | | | | | | | | | | | This patch adds environment variables to configure user library ringbuffer and step size. The following variables can be set: DLT_USER_BUFFER_MIN - for minimal size DLT_USER_BUFFER_MAX - for maximal size DLT_USER_BUFFER_STEP - for step size Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* DLT_PTR macro: Improve implementation and function API addedChristoph Lipka2016-10-241-0/+32
| | | | | | | | The original implementation result in a compile error when DLT_PTR is used with other macros like DLT_STRING. This patch overcomes that problem. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Fix: Memory for context description is not freedYusuke Sato2016-09-231-0/+18
| | | | | | | | Currently, allocated memory for context description is not freed in dlt_free(). free() for each member variables of dlt_user.dlt_ll_ts[i] is added in the for block in dlt_free(). Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp> Change-Id: I52a81cf2918cb0014fdcfc666cb8bb93ca7cb525
* Fix: Handle of /tmp/dlt never reset if dlt-daemon is killed during output ↵Yusuke Sato2016-09-231-1/+1
| | | | | | | | | | user buffer Handle of /tmp/dlt cannot be reset if dlt-daemon is killed during output user buffer because dlt_user_log_resend_buffer() never returns DLT_RETURN_PIPE_ERROR. Return value of dlt_user_log_resend_buffer() is modified to pass return value of dlt_user_log_out3() without change. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp> Change-Id: I506103ebebcdb3c145d1f0719a3c8caffc8d89c1
* Fix: Segfault in checking buffer usageYusuke Sato2016-09-231-0/+3
| | | | | | | | Segfault is caused by dlt_user_check_buffer() if this function is called during increasing the user buffer. To avoid this issue, semaphore has to be added. Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp> Change-Id: Ie56f2fb73aeacb835180468e57c9338d2ffdb072
* Add dlt_user_is_logLevel_enabled APIChristoph Lipka2016-09-231-1/+1
| | | | | | | | | | This function allows an application developer to check if the DLT LogLevel is enabled before starting any log string creation. It can be used in application specific logging wrapper functions. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com> Change-Id: I4c269b12bfdeae29a4e795385cdbc54a579ba621
* Fixed D-Bus tracing not working anymoreAlexander Wenzel2016-05-131-1/+1
| | | | | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> Topic: GENDLT-425 Change-Id: I4ec56d714804d9ee4fa904b71c58dafd00990b4f
* Fixed not working default log level.Alexander Wenzel2016-05-031-8/+12
| | | | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> Change-Id: Id01c9a11e4b5ccf4166f10c5e45363f3a7c00535
* Fixed not returning the correct number of lost messages at exit.Alexander Wenzel2016-05-031-1/+5
| | | | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> Change-Id: I211222d04350820098bf56dfc5b7aee50e2529f0
* DLT_RETURN_USER_BUFFER_FULL is returned when user buffer fullLutz Helwing2016-04-221-113/+59
| | | | | | | | | A new return value DLT_RETURN_USER_BUFFER_FULL is introduced which is returned by all dlt_user_log_write_* and dlt_log_* functions when the data to be added to the user buffer exceeds its size (datasize > DLT_USER_BUF_MAX_SIZE) Signed-off-by: Lutz Helwing <lutz_helwing@mentor.com>
* Revert truncation of string or raw blockLutz Helwing2016-04-221-26/+16
| | | | | | | | | | | | | | | Commit d319ebf4d2d449d70befae0eebbdd82c19c5315f introduced new handling of the situation when writing data to the user buffer would exceed its size. This was achieved by truncating the data to fit. This solution had a problem: It could lead to a buffer overflow when the updated arg_size gets negative (actually undefined value because it is unsigned). As a quick fix the behaviour is reverted to the state before the aforementioned commit. Signed-off-by: Lutz Helwing <lutz_helwing@mentor.com>
* Fix bug with truncation of string or raw blockLutz Helwing2016-02-251-46/+33
| | | | | | | | With commit d319ebf4d2d449d70befae0eebbdd82c19c5315f a bug was introduces which lead to some messages getting not transmitted. Change-Id: I9f20177fbc7db9d7caf527e14159444b5fec168a Signed-off-by: Lutz Helwing <lutz_helwing@mentor.com>
* Truncate of string or raw block, if length exceeds maximum message lengthLutz Helwing2016-02-191-46/+65
| | | | | | | | | | | | | Previously if messages containing strings or raw data were exceeding the maximum message size (DLT_USER_BUF_MAX_SIZE, currently set to 1390) they were discarded completely. This behaviour is changed so that too large data is truncated and sent anyway. Commented out part of unit test for dlt_log_raw abnormal where negative values for unsigned length were passed. Change-Id: I4f6bf152e7125924717c941ad7ebb8fd79787715 Signed-off-by: Lutz Helwing <lutz_helwing@mentor.com>
* Fix fork()-handler in libdltStefan Vacek2015-12-091-7/+21
| | | | Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Set default log-levels in dlt.confStefan Vacek2015-12-091-1/+3
| | | | | | | | - feature: allow to define a default-log-level in dlt.conf (see dlt.conf for documentation) - bugfix: make dlt_unlock_mutex not inline to fix linkage - bugfix: initial log-level was not set correctly when no dlt-daemon was running Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Fix register context before application is registeredStefan Vacek2015-12-081-10/+1
| | | | | | | | Additional: - include sd-daemon.h if watchdog is enabled - fix formatting for printf 64bit values Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Got rid of warnings from some older compilersLutz Helwing2015-10-281-5/+10
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* DLT daemon improvement - dlt_init()-checkLutz Helwing2015-10-071-1191/+1254
| | | | | | | | | | DLT daemon improvement - parameter value range check Adapt unit tests to check for enum return values Changed C version to gnu99 and C++ version to gnu++0c Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Make timeout on exit configurableStefan Vacek2015-10-071-1/+17
| | | | | | | | | - make timeout in at_exit handler configurable (was hardcoded to 10s), new api: int dlt_set_resend_timeout_atexit(uint32_t timeout_in_milliseconds); - add option -t to dlt-adaptor-stdin to set timeout in at_exit_handler - add option -t to dlt-example-user to set timeout in at_exit_handler Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Allow multiple instances of dlt-daemonStefan Vacek2015-10-071-13/+27
| | | | | | | | | | | | | | | | - Make dlt-daemon configurable to specify directory of fifos and port of dlt-daemon, this allows to run multiple instances of dlt-daemon at one node at the same time. This is useful in testing environment where simultanous tests should not interfere due to the same instance of dlt-daemon - dlt-daemon: add option -t <dir> to specify a directory where all fifos will be created - dlt-daemon: add option -p <port> to specify the port under which dlt-daemon can be connected - client-library: add environment variable DLT_PIPE_DIR to specify a non-default directory of fifos for logging applications - client-library: add environment variable DLT_DAEMON_TCP_PORT to specify the port under which dlt-daemon can be reached (especially when using dlt-receive) Signed-off-by: Stefan Vacek <stefan.vacek@intel.com> Signed-off-by: Lutz Helwing <lutz_helwing@mentor.com>
* Fixed whitespace and formatting of new code Fixed licence headersLutz Helwing2015-10-071-126/+132
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Allow registration of contexts before application is registeredStefan Vacek2015-10-071-34/+60
| | | | Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Add env-var to set initial log-levelsStefan Vacek2015-10-071-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | name of environment variable: DLT_INITIAL_LOG_LEVEL Syntax: <apid1>:<ctid1>:<loglevel1>;<apid2>:<ctid2>:<loglevel2>;... apid: application id (up to 4 chars), if empty all applications will match ctid: context id (up to 4 chars), if empty all contexts will match loglevel: either -1..6 or a symbolic name (default, off, fatal, error, warning, info, debug, verbose) Examples: DLT_INITIAL_LOG_LEVEL=TEST:LOG:0 -> turn off logging for appid TEST and contextid LOG DLT_INITIAL_LOG_LEVEL=:LOG:warn -> for contexts with name "LOG" set log-level to warning (3) DLT_INITIAL_LOG_LEVEL=::VERBOSE -> set log-level of all contexts to VERBOSE DLT_INITIAL_LOG_LEVEL=::VERBOSE;TEST:LOG:3 -> set log-level of all contexts to VERBOSE except TEST:LOG, set this to WARNING dlt-example-user: add option -l to specify log-level to be used when sending messages Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Allow applications to fork()Stefan Vacek2015-10-071-48/+172
| | | | | | | | - if fork() is called from an application, dlt is reset and user application needs to re-register application and contexts in child-process Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Removed all trailing whitespacesLutz Helwing2015-07-211-26/+26
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Rework of unit tests in gtest_dlt_userStefan Held2015-07-211-6/+26
| | | | | | | Fix all nullpointer errors in dlt_user.c Signed-off-by: Stefan Held <stefan_held@mentor.com> Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed license headers and copyright doxygen commentsLutz Helwing2015-06-171-2/+2
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Updated license headers to latest GENIVI license policy. Fixed further LRT ↵Lutz Helwing2015-06-171-11/+15
| | | | | | Scan findings. Renamed and cleanup further files. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Open daemon connection in atexit functionSascha Philipp2015-03-251-11/+38
| | | | | Change-Id: I43f1a3b541720d1ae06912cc5d1026daa077245a Signed-off-by: Sascha Philipp <sascha.philipp@continental-corporation.com>
* Change loglevel of Request-Resend messageSascha Philipp2015-03-251-1/+1
| | | | | Change-Id: I82cf88ebc0503aae6f88ff1b407b18b5c9052d0a Signed-off-by: Sascha Philipp <sascha.philipp@continental-corporation.com>
* Reworked internal outputSascha Philipp2015-03-251-24/+33
| | | | | | Change-Id: I371c1b234929fda46608f563f08cae141b97d0a9 Signed-off-by: Ralf Anton Beier <ralf.anton.beier@continental-corporation.com> Signed-off-by: Sascha Philipp <sascha.philipp@continental-corporation.com>
* adding support for new macros to the daemon. new macros: DLT_HEX8(VAR) 8bits ↵Jens Bocklage2015-03-121-2/+182
| | | | | | | | variable displayed in hexadecimal with "0x" prefix DLT_HEX16(VAR) 16bits displayed in hexadecimal with "0x" prefix DLT_HEX32(VAR) 32bits displayed in hexadecimal with "0x" prefix DLT_HEX64(VAR) 64bits displayed in hexadecimal with "0x" prefix DLT_BIN8(VAR) 8bits variable displayed in binary with "0b" prefix DLT_BIN16(VAR) 16bits variable displayed in binary with "0b" prefix plus typo fix Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fix dlt_user_log_write_start_id return valueAlexander Wenzel2014-10-301-5/+12
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Added new API to send marker message from application.Alexander Wenzel2014-09-111-0/+36
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* New macros for Format of Hex and Binary.Alexander Wenzel2014-09-091-0/+16
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* New Callback function in DLT library, called when log level of context is ↵Alexander Wenzel2014-08-121-0/+62
| | | | | | changed Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed segmented messages arguments to standard.Alexander Wenzel2014-06-111-12/+12
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* DLT_CSTRING implementation non verbose mode.Alexander Wenzel2014-05-191-0/+11
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Send ECU Id if enabled and added library API to change.Alexander Wenzel2014-05-161-1/+26
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Send timestamp can be disabled by new API.Alexander Wenzel2014-05-161-1/+26
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Send session/process id by default and add configuration API.Alexander Wenzel2014-05-161-0/+30
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Send extended header in non verbose mode by default and add new API to ↵Alexander Wenzel2014-05-161-3/+21
| | | | | | change setting. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Bug 184 - /tmp/dltpipes directory does not exist before dlt-daemon is ↵v2.10.0Alexander Wenzel2014-04-021-0/+22
| | | | | | started, logging disabled Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed: all possible malloc, sprintf and strcpy problemsAlexander Wenzel2014-04-011-22/+18
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Updated authors information.Alexander Wenzel2014-04-011-45/+5
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Cygwin port: cygwin patch, signal handling patch and cppcheck and install ↵Alexander Wenzel2014-04-011-1/+6
| | | | | | lib dll to correct location on Windows. Originally from Mikko Rapeli <mikko.rapeli@bmw.de>. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed compiler warnings with 32Bit gcc compiler.Alexander Wenzel2014-04-011-1/+0
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Removed check of double registration of contexts in user library, already ↵Alexander Wenzel2014-01-101-167/+138
| | | | | | checked by daemon. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>