summaryrefslogtreecommitdiff
path: root/src/dlt-qnx-system/dlt-qnx-system.h
diff options
context:
space:
mode:
authorNguyen Dinh Thi <Thi.NguyenDinh@vn.bosch.com>2018-11-29 16:30:32 +0100
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2020-07-08 16:01:00 +0900
commitc78d08d63f47ec2baa08c20f3068adbe8c3cc0ca (patch)
tree5485f250f358e3b875f9a33d4846fe40dbf9b47b /src/dlt-qnx-system/dlt-qnx-system.h
parent6b1781cb5ef5d6586dbe5c06bd973a0957c91813 (diff)
downloadDLT-daemon-c78d08d63f47ec2baa08c20f3068adbe8c3cc0ca.tar.gz
slog2 adapter on QNX
dlt-qnx-system can be used to send syslog on QNX to dlt-daemon using slog2 API. It was be built with setting cmake option WITH_DLT_QNX_SYSTEM to ON. Add markdown manual page for dlt-qnx-system Signed-off-by: Nguyen Dinh Thi (RBVH/ENG2) <Thi.NguyenDinh@vn.bosch.com> Signed-off-by: Le Hoang Ngoc Quynh <Quynh.LeHoangNgoc@vn.bosch.com> Signed-off-by: Sebastian Unger <sunger@de.adit-jv.com> Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com> Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com> Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com>
Diffstat (limited to 'src/dlt-qnx-system/dlt-qnx-system.h')
-rw-r--r--src/dlt-qnx-system/dlt-qnx-system.h109
1 files changed, 109 insertions, 0 deletions
diff --git a/src/dlt-qnx-system/dlt-qnx-system.h b/src/dlt-qnx-system/dlt-qnx-system.h
new file mode 100644
index 0000000..270b8be
--- /dev/null
+++ b/src/dlt-qnx-system/dlt-qnx-system.h
@@ -0,0 +1,109 @@
+/**
+ * Copyright (C) 2020 Advanced Driver Information Technology.
+ * This code is developed by Advanced Driver Information Technology.
+ * Copyright of Advanced Driver Information Technology, Bosch and DENSO.
+ *
+ * DLT QNX system functionality header file.
+ *
+ * \copyright
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
+ * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ *
+ * \author Nguyen Dinh Thi <Thi.NguyenDinh@vn.bosch.com> ADIT 2020
+ *
+ * \file: dlt-qnx-system.h
+ * For further information see http://www.genivi.org/.
+ * @licence end@
+ */
+
+/*******************************************************************************
+** **
+** SRC-MODULE: dlt_qnx-system.h **
+** **
+** TARGET : QNX **
+** **
+** PROJECT : DLT **
+** **
+** AUTHOR : Thi.NguyenDinh@vn.bosch.com **
+** **
+** PURPOSE : **
+** **
+** REMARKS : **
+** **
+** PLATFORM DEPENDANT [yes/no]: yes **
+** **
+** TO BE CHANGED BY USER [yes/no]: no **
+** **
+*******************************************************************************/
+
+/*******************************************************************************
+** Author Identity **
+********************************************************************************
+** **
+** Initials Name Company **
+** -------- ------------------------- ---------------------------------- **
+** ndt Nguyen Dinh Thi ADIT **
+** **
+*******************************************************************************/
+
+#ifndef DLT_QNX_SYSTEM_H_
+#define DLT_QNX_SYSTEM_H_
+
+#include "dlt.h"
+
+/* Constants */
+#define DEFAULT_CONF_FILE ( CONFIGURATION_FILES_DIR "/dlt-qnx-system.conf")
+
+#define MAX_LINE 1024
+#define MAX_THREADS 8
+
+/* Macros */
+#define MALLOC_ASSERT(x)\
+ do\
+ {\
+ if(x == NULL) {\
+ fprintf(stderr, "%s - %d: Out of memory\n", __func__, __LINE__);\
+ abort();\
+ }\
+ }\
+ while (0)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Command line options */
+typedef struct {
+ char *configurationFileName;
+ int daemonize;
+} DltQnxSystemCliOptions;
+
+/* Configuration slogger2 options */
+typedef struct {
+ int enable;
+ char *contextId;
+ int useOriginalTimestamp;
+} Qnxslogger2Options;
+
+typedef struct {
+ char *applicationId;
+ char *applicationContextId;
+ Qnxslogger2Options qnxslogger2;
+} DltQnxSystemConfiguration;
+
+typedef struct {
+ pthread_t threads[MAX_THREADS];
+ pthread_t mainThread;
+ int count;
+ int shutdown;
+} DltQnxSystemThreads;
+
+void start_qnx_slogger2(DltQnxSystemConfiguration *conf);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif /* DLT_QNX_SYSTEM_H_ */