summaryrefslogtreecommitdiff
path: root/src/shared
Commit message (Collapse)AuthorAgeFilesLines
* Code beautification using uncrustifyChristoph Lipka2018-12-218-2046/+1754
| | | | Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
* libdlt: Add error handlingSaya Sugiura2018-12-211-0/+15
| | | | | | | Error handling was added in case it failed to send to daemon. Signed-off-by: S. Hameed <shameed@jp.adit-jv.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Made socket send reliableManikandan C2018-12-211-0/+1
| | | | | | | | Made TCP socket send reliable by storing the unsent/partial message in the ring buffer. This will avoid the corrupted messages/Gaps in Viewer side Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
* buffer: Code cleanupSaya Sugiura2018-12-211-48/+56
| | | | Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* buffer: Improve loggingSaya Sugiura2018-12-211-43/+51
| | | | | | | Add more logs to places where any pointer of buffer may get modified, to get more information when we get unexpected behaviour Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Fixed compiler error with previous commitManikandan C2018-12-121-2/+2
| | | | Signed-off-by: Manikandan C <mchockalingam@de.adit-jv.com>
* Dynamic allocation of msg bufferManikandanC2018-12-101-33/+82
| | | | | | | | | | | | | 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>
* Use poll in the dlt-daemon for POSIX complianceManikandanC2018-11-301-0/+2
| | | | | | | | | | | The poll system call is now used in the daemon to enable DLT use in POSIX compliant systems. Also added introduced new unregister_app macro to avoid missing of logs in startup buffer. Signed-off-by: Frederic Berat <fberat@de.adit-jv.com> Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
* dlt-client: logging: Extended the receiver buffer sizeManikandan C2018-11-231-2/+2
| | | | | | | | | | | - dlt-control couldn't receive all the GET_LOG_INFO response message when many applications and contexts are registered. Therefore the receiver buffer size was extended to 65K. Also the receive buffer size macros are reduced to one variable. - Code cleanup and improvements Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* Protocol: DLT Service ID Enum instead of definesManikandan C2018-11-231-0/+90
| | | | Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Gateway ImprovementsManikandan C2018-11-231-0/+145
| | | | | | | | | | | | | -Support to send and parse periodic control messages -add application/contexts to passive ECU list -Refactor dlt_gateway_send_control_message -Gateway issues with corrupted data and on demand connection -Unit Test update Signed-off-by: Saya Sugiura ssugiura@jp.adit-jv.com Signed-off-by: Christoph Lipka clipka@jp.adit-jv.com Signed-off-by: S. Hameed shameed@jp.adit-jv.com Signed-off-by: ManikandanC Manikandan.Chockalingam@in.bosch.com
* Log storage - Updates (#82)ManikandanChockalingam2018-11-151-1/+1
| | | | | | | | | | - improvements and refactor key creation - Sync strategies added Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: S. Hameed <shameed@jp.adit-jv.com> Signed-off-by: Ravi Sankar P <ponnurangamravi.sankar@in.bosch.com> Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* Fflush stdout in the intenal logger (#81)Alexander Menzhinsky2018-10-301-0/+1
|
* file parser: Replace hash functions with list (#67)ManikandanChockalingam2018-07-122-62/+59
| | | | | | | | file parser: Replace hash functions with list Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com> Signed-off-by: S. Hameed <shameed@jp.adit-jv.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
* IPC: Unix socket added (#43)ManikandanChockalingam2018-05-181-0/+11
| | | | | | | | | * IPC: Unix socket added The user can select either FIFO or UNIX socket as IPC between user library and daemon through CMakelist option. Socket path configurable for both FIFO and Unix Socket now configurable in CMake Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com> Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
* minor compiler warning gcc 7.x (#30)Phong Tran2018-03-292-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix -Wpointer-compare of compare with null char Signed-off-by: Phong Tran <tranmanphong@gmail.com> * dlt_common: fix -Wformat-truncation of snprintf Avoid snprintf output truncation by handling return value Signed-off-by: Phong Tran <tranmanphong@gmail.com> * dlt_offline_trace: Fix Wformat-truncation of snprintf Compile with Gcc 7.x has the warning of snprintf buffer length size. Check return value of snprintf() for avoiding the warning. Signed-off-by: Phong Tran <tranmanphong@gmail.com> * dlt_common_test: Fix memleak t_dlt_message_read some resources were not free after using. Detected by running valgrind --leak-check=full ./gtest_dlt_common Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* Fix SEGV dlt_offline_trace.c (#32)kundatipradeep2018-01-221-0/+18
| | | | | | Post enabling and updating “OfflineTraceDirectory” variable default path in dlt.conf file, dlt-daemon resulted in crash with Segmentation fault(SIGSEGV) due to Invalid OfflineTraceDirectory path. dlt_offline_trace-patch-1 contains an update which verifies “existence of offline trace directory” and its “accessibility issues”. It returns -1 on failure conditions and indicates user with appropriate information instead resulting in APPCRASH.
* fix various memory leaks (#28)Gordan Markuš2017-09-121-1/+0
| | | | | | | | | | | | | | | | * dlt_common: Fix resource leak Close the file before returning from function. Signed-off-by: Gordan Markuš <gordan.markus@pelagicore.com> * dlt-kpi-process: Fix memory leak Signed-off-by: Gordan Markuš <gordan.markus@pelagicore.com> * dlt-kpi-options: Clean up resources on malloc fail Signed-off-by: Gordan Markuš <gordan.markus@pelagicore.com>
* process user message: Fix bound handlingFrederic Berat2016-10-241-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | On context and application registration, the data needs to be read in 2 parts. If the first part was at the end of the receiver buffer, it was wrongly removed whereas the complete data is not full received and therefore interpretable. This has to be fixed by not removing the data before everything is checked. Thus, while readjusting the buffer to the first found header, the offset was not properly updated. Signed-off-by: Frederic Berat <fberat@de.adit-jv.com> Process User Messages: Fix buffer handling In case application and context registration the buffer need to be read two times. But before removing the data, the data need to be readjusted to its origin. This was missing in a previous fix. Furthermore, in case of corrupted description field, applications and contexts will be registered anyway with the dummy description "Unknown". Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* dlt-daemon: receiver reworkFrederic Berat2016-04-282-0/+40
| | | | | | | | | | The receiver structures have been removed from the dlt-daemon structure, they are now part of the connection. The overall usage of the receiver structrure has also been reviewed in the daemon. Signed-off-by: Frederic Berat <fberat@de.adit-jv.com> Change-Id: I7cf80d79ed73bd6d4f370bb3f278d26ccc9d8d7a
* Offline trace: Make search more preciseS. Hameed2016-04-281-1/+1
| | | | | | | To avoid collisions with Logstorage Offlinetrace code checks for Offlinetrace log file base name Signed-off-by: S. Hameed <shameed@jp.adit-jv.com> Change-Id: I9719dd116cc72dd61f41211caba805e865be9539
* Parse INI filesChristoph Lipka2015-11-242-0/+722
| | | | | | | | | Offline Logstorage, Multinode and potentially other DLT extensions retrieve their configuration from a configuration file in INI file format. To avoid code duplications, this helper functionality should be used to read configuration files. Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
* offline trace: supported trace file name configuration based on indexManikandan C2015-11-181-10/+164
| | | | | | | | | Changes made for trace file name configuration based on index and made it configurable from dlt.conf file. Using this configuration one can select either timestamp based or index based log file creation for offline trace. Signed-off-by: Manikandan C <Manikandan.Chockalingam@in.bosch.com>
* Purged all warnings for -Wall -WextraLutz Helwing2015-10-281-1/+6
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* DLT daemon improvement - dlt_init()-checkLutz Helwing2015-10-076-1295/+1388
| | | | | | | | | | 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>
* Allow multiple instances of dlt-daemonStefan Vacek2015-10-072-6/+53
| | | | | | | | | | | | | | | | - 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>
* 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-60/+60
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Rework of unit testsStefan Held2015-07-211-53/+7
| | | | | Signed-off-by: Stefan Held <stefan_held@mentor.com> Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fix compilation warnings and possible misuse of snprintStefan Vacek2015-07-211-12/+13
| | | | | | | | | - sprintf was used were snprint was intended - make proper usage of 64bit values in printf-formatting - remove some not used variables - make some casts to make printf happy Signed-off-by: Stefan Vacek <stefan.vacek@intel.com>
* Rework of unit tests in gtest_dlt_commonStefan Held2015-07-211-42/+104
| | | | | | | Fix all nullpointer errors in dlt_common.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-177-14/+14
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Updated license headers to latest GENIVI license policy. Fixed further LRT ↵Lutz Helwing2015-06-177-78/+105
| | | | | | Scan findings. Renamed and cleanup further files. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* dlt-daemon: Explicitly set the default loggingLevel to LOG_INFOSid Heroor2015-06-171-1/+1
| | | | Signed-off-by: Sid Heroor <heroor@heptaxel.com>
* Unified all line endings to UNIX style.Jens Bocklage2015-06-173-443/+443
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* added dlt_log_* unit tests rework of dlt_buffer_* and dlt_messages_* unit testsStefan Held2015-06-171-1/+52
| | | | | Signed-off-by: Stefan Held <stefan_held@mentor.com> Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Add Service ID Last entry to avoid further modifications in dependent codeS. Hameed2015-04-011-1/+1
| | | | | Signed-off-by: S. Hameed <shameed@jp.adit-jv.com> Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
* Reworked internal outputSascha Philipp2015-03-252-154/+89
| | | | | | 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-1/+73
| | | | | | | | 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>
* Added new API to send marker message from application.Alexander Wenzel2014-09-111-0/+1
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fixed: all possible malloc, sprintf and strcpy problemsAlexander Wenzel2014-04-012-115/+128
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Updated authors information.Alexander Wenzel2014-04-011-46/+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/+1
| | | | | | 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-3/+3
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Defined return value for dlt_message_read().Alexander Wenzel2014-01-101-8/+8
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Cleanup of send return values. Further cleanup of send restructure.Alexander Wenzel2014-01-101-1/+1
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* When using DLT in console mode on a 64-bit machine, timestamps are corrupted ↵Alexander Wenzel2014-01-101-1/+2
| | | | | | due to an address of a 32-bit value being cast to a 64-bit pointer. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Fix potential buffer overflow in offline trace.Alexander Wenzel2014-01-101-20/+39
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Environement variables added to configure internal logging in library.Alexander Wenzel2014-01-101-6/+43
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
* Added further checks to dlt_buffer.Alexander Wenzel2014-01-101-4/+18
| | | | Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>