summaryrefslogtreecommitdiff
path: root/src/examples
Commit message (Collapse)AuthorAgeFilesLines
* example: Added customization of CxtID and AppIDdbiastoch2021-01-061-5/+20
| | | | | | | | -It's now possbile to enter a custom app and context ID by using the new implemented "-A" and "-C" arguments. -Also added a markdown manual in the doc directory for dlt-example-user. Signed-off-by: dbiastoch <dbiastoch@de.adit-jv.com>
* other: fix remaining conversion warningsDinh Cong Toan2021-01-061-3/+3
| | | | | | | | | | | - Converting datatype to the correct one. - As macro do not perform type-checking before, so these functions used it with different datatype could create a lot of conversion warnings. For this reason, these warnings could be consider as normal information and will not be fixed. Signed-off-by: Dinh Cong Toan <toan.dinhcong@vn.bosch.com>
* Add support for logging with VSOCK (#255)Martin Ejdestig2020-12-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For more information about VSOCK, see "man vsock" ( https://man7.org/linux/man-pages/man7/vsock.7.html ). Makes it possible for processes in a virtual machine to log directly in DLT running on host without setting up a network connection between guest and host. It is also probably more efficient. Have not done any performance measurements (not main reason for patch), but no forwarding is required as when running DLT in a multi-node setup. When building dlt-daemon for host, WITH_DLT_DAEMON_VSOCK_IPC should be enabled for daemon to listen on incoming VSOCK requests. Local communication method between applications and daemon is still determined with DLT_IPC. When building for guest, WITH_DLT_LIB_VSOCK_IPC should be enabled and DLT_IPC will be ignored, which will make libdlt open a VSOCK socket to the deamon for logging messages. VSOCK can be tested without a virtual machine. Since VMADDR_CID_HOST is used by libdlt when connecting, see vsock man page, clients can be run on host to test VSOCK communication. Some modifications has been done to be able to handle logging through FIFO pipe and socket in the same build of dlt-daemon: - dlt_receiver_init/free_unix_socket() is renamed to dlt_receiver_init/free_global_buffer() and used for FIFO as well. Also fixes memory leak since dlt_receiver_free_unix_socket() was used regardless of whether DLT_USE_UNIX_SOCKET was defined or not. - Pass type to dlt_receiver_init() instead of dlt_receiver_receive(). And remove preprocessor conditionals for handling DLT_CONNECTION_APP_MSG in dlt_daemon_process_user_messages(). Also fixes wrong enum type being passed to dlt_receiver_receive() in dlt_client.c (DltClient::mode was used as a DltReceiverType enum but it is a DltClientMode enum). - Add a flag to DltDaemonApplication to indicate whether file descriptor is "owned" by the DltDaemonApplication or not. When dlt_daemon_application_add() is called due to message received on a socket, fd is passed as an argument (app does not own fd). For FIFO, a per application FIFO is opened (app owns the fd). Also fixes so that user handle is reset for both application and all its contexts when resetting any. Prevents fd from being used by accident after it has been closed. dlt_mkdir_recursive() is moved to src/daemon since it is only used in the daemon. Minimizes use of DLT_USE_UNIX_SOCKET_IPC. Other bugfixes: - Call DLT_SEM_FREE() if setting socket to O_NONBLOCK fails in src/lib/dlt_user.c:dlt_initialize_socket_connection(). - Close socket if dlt_receiver_init() fails in src/lib/dlt_user.c:dlt_initialize_socket_connection(). Signed-off-by: Martin Ejdestig <martin.ejdestig@volvocars.com>
* Fix overflow for -d argument in dlt-example-user (#270)Martin Ejdestig2020-11-171-4/+4
| | | | | | atoi(dvalue) * 1000000 overflows if given a value >= 2147 when sizeof(int) is 4. (2^31 / 10000000 ~= 2147.48) Signed-off-by: Martin Ejdestig <martin.ejdestig@volvocars.com>
* Implement DLTClient for UDP multicast (#240)João Sousa2020-08-311-2/+2
| | | | | | | | | * Add UDP multicast support on client side UDP multicast support is already present on server side. This patch add seemless support for UDP multicast on client side in dlt-receive. Signed-off-by: Joao Sousa <joao.sa.sousa@ctw.bmwgroup.com>
* doxygen improvementSaya Sugiura2019-09-131-1/+1
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* UDP Multicast implementation (#155)Sunil-K-S2019-08-232-1/+209
| | | | | The feature can be enabled by setting WITH_UDP_CONNECTION to ON. Signed-off-by: sunil.s <sunil.s@lge.com>
* doxygen: Remove licenceSaya Sugiura2019-07-195-10/+0
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* POSIX: Replace usleep with nanosleepSaya Sugiura2019-05-063-12/+24
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Code beautification using uncrustifyChristoph Lipka2018-12-214-297/+178
| | | | Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
* UnitTest: UpdatesManikandanC2018-12-211-1/+0
| | | | | | | | | | | | Gateway Logstorage Event Handler Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com> Signed-off-by: S. Hameed <shameed@jp.adit-jv.com> Signed-off-by: Aditya Paluri <venkataaditya.paluri@in.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
* Logging: avoided missing of log level change callback Added new context ↵Manikandan C2018-12-211-4/+4
| | | | | | registration Macro and API which has option to register log level change callback along with it. This will avoid missing of initial log level change callback when daemon sends the log level change control msg during context registration Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
* Injection: New callback with private data Added new injection callback with ↵ManikandanC2018-12-211-21/+51
| | | | | | private data as argument Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
* Dynamic allocation of msg bufferManikandanC2018-12-101-6/+28
| | | | | | | | | | | | | It is possible to change the default buffer size for log message creation via environment variable: export DLT_LOG_MSG_BUF_LEN=<value> Instead of using a static buffer with size of 1390 bytes, the buffer is allocated dynamically with the specified value.The max size is restricted to approx 65k. Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com> Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
* Fixed dlt-example-non-verbose-1.xmlSven Hassler2015-12-042-441/+920
| | | | | | Removed -e from shebang line of start_system_logger_test.sh Signed-off-by: Lutz Helwing <lutz_helwing@mentor.com>
* Purged all warnings for -Wall -WextraLutz Helwing2015-10-283-3/+3
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* DLT daemon improvement - dlt_init()-checkLutz Helwing2015-10-074-147/+147
| | | | | | | | | | 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-4/+16
| | | | | | | | | - 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>
* Fixed whitespace and formatting of new code Fixed licence headersLutz Helwing2015-10-071-1/+1
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Add env-var to set initial log-levelsStefan Vacek2015-10-071-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Cleanup masterStefan Vacek2015-10-075-0/+0
| | | | | | | - remove compiler warnings - fix file permissions Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Removed all trailing whitespacesLutz Helwing2015-07-214-22/+22
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed license headers and copyright doxygen commentsLutz Helwing2015-06-175-9/+9
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Updated license headers to latest GENIVI license policy. Fixed further LRT ↵Lutz Helwing2015-06-175-56/+71
| | | | | | Scan findings. Renamed and cleanup further files. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Unified all line endings to UNIX style.Jens Bocklage2015-06-172-924/+924
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Added new API to send marker message from application.Alexander Wenzel2014-09-111-2/+14
| | | | 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/+12
| | | | | | changed 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-0/+5
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed: all possible malloc, sprintf and strcpy problemsAlexander Wenzel2014-04-014-5/+17
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* DLT Common API Wrapper.Alexander Wenzel2014-04-012-1/+297
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Removed dlt_free from example and test applications, already called from ↵Alexander Wenzel2014-04-012-4/+0
| | | | | | exit handler. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Yocto fix in build builds.Alexander Wenzel2013-07-311-3/+3
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fix compiler warningsLassi Marttala2013-07-192-14/+0
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Parasoft workaround: solve complaints about missing breaks/returns in ↵Simon Brandner2013-07-192-0/+2
| | | | | | default part of switch statements Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* [GDLT-115]: Encapsulate more macros. Fix things that used macrosLassi Marttala2012-11-261-16/+9
| | | | | | incorrectly. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* [GDLT-115]: Prevent return value from DLT_REGISTER_APPLassi Marttala2012-11-261-1/+1
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* [GDLT-90] Implemented systemd watchdog concept in dlt-systemChristian Muck2012-06-131-20/+21
| | | | Signed-off-by: Christian Muck <christian.muck@bmw.de>
* Added dlt log to injection methodsChristian Muck2012-05-301-2/+3
| | | | Signed-off-by: Christian Muck <christian.muck@bmw.de>
* GENDLT-15, Avoid buffer overrun with snprintf().Lassi Marttala2012-04-041-7/+7
| | | | | | | | | | Check return value of dlt_user_log_write_start(_id) correctly. Reduce the number of applications if allocation fails. Make dlt_user_log_write_start inline Improve error checking in dlt_user_log_write_start_id Use databuffersize to avoid reallocations Signed-off-by: Christian Muck <christian.muck@bmw.de>
* Corrected email of Alexander WenzelChristian Muck2012-03-274-4/+4
| | | | Signed-off-by: Christian Muck <christian.muck@bmw.de>
* GDLT-38, Update <FILE> fields in licenses.Lassi Marttala2012-03-263-3/+3
|
* GDLT-38, Update licenses to all the sources.Lassi Marttala2012-03-263-94/+48
|
* GDLT-38, Update license in more CMakeListsLassi Marttala2012-03-261-32/+11
|
* Added missing license header to two filesv2.5.1Christian Muck2012-03-221-0/+68
| | | | Signed-off-by: Christian Muck <christian.muck@bmw.de>
* Modified library for new test cases to corrupt data - related to the bug fix ↵Christian Muck2012-03-221-1/+48
| | | | | | for testing signed and unsigned integer Signed-off-by: Christian Muck <christian.muck@bmw.de>
* Update project structureChristian Muck2012-02-131-9/+0
|
* Reverted changes in dlt_register_app() function.Alexander Wenzel2011-10-281-1/+1
| | | | Added new dlt_check_library_version() function.
* [GSW-66] File transfer over DLT.Alexander Wenzel2011-10-181-2/+6
| | | | Fixed some compiler warnings.
* [Reverted] Removed Ringbuffer implementation in Library.Alexander Wenzel2011-10-181-2/+2
|
* Fixed bugChristian Muck2011-10-181-1/+1
|