summaryrefslogtreecommitdiff
path: root/src/core_dump_handler/dlt_cdh_streamer.h
diff options
context:
space:
mode:
authorLutz Helwing <lutz_helwing@mentor.com>2015-06-23 18:32:44 +0200
committerAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2015-10-28 11:38:27 +0100
commitd7cea9b4df048a3b5da68710a5b62efe082fb447 (patch)
treea7e114d2bbf5814b5f221cb0273cc05fbbf52483 /src/core_dump_handler/dlt_cdh_streamer.h
parent2355ca4927cffd8307fdb78aaadeb584450bef21 (diff)
downloadDLT-daemon-d7cea9b4df048a3b5da68710a5b62efe082fb447.tar.gz
Added core dump handler code
Fixed author Doxygen tag Added licence headers Moved return value definition to new header Converted all DOS line endings to Unix Solution for CPU dependency by using CMAKE_SYSTEM_PROCESSOR cmake variable CPU specific stuff is implemented in own implementation file for each CPU architecture Added config file for sysctl. Fixed wrong parameters to open call for lockfile Added mechanism to overwrite TARGET_CPU_NAME with command line option Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
Diffstat (limited to 'src/core_dump_handler/dlt_cdh_streamer.h')
-rw-r--r--src/core_dump_handler/dlt_cdh_streamer.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/core_dump_handler/dlt_cdh_streamer.h b/src/core_dump_handler/dlt_cdh_streamer.h
new file mode 100644
index 0000000..b73688e
--- /dev/null
+++ b/src/core_dump_handler/dlt_cdh_streamer.h
@@ -0,0 +1,53 @@
+/*
+ * @licence app begin@
+ * SPDX license identifier: MPL-2.0
+ *
+ * Copyright (C) 2011-2015, BMW AG
+ *
+ * This file is part of GENIVI Project DLT - Diagnostic Log and Trace.
+ *
+ * This Source Code Form is subject to the terms of the
+ * Mozilla Public License (MPL), 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/.
+ *
+ * For further information see http://www.genivi.org/.
+ * @licence end@
+ */
+
+/*!
+ * \author Magneti Marelli http://www.magnetimarelli.com
+ * \author Lutz Helwing <lutz_helwing@mentor.com>
+ *
+ * \copyright Copyright © 2011-2015 BMW AG. \n
+ * License MPL-2.0: Mozilla Public License version 2.0 http://mozilla.org/MPL/2.0/.
+ *
+ * \file dlt_cdh_streamer.h
+ */
+
+#ifndef DLT_CDH_STREAMER_H
+#define DLT_CDH_STREAMER_H
+
+#include <stdio.h>
+#include <zlib.h>
+
+#include "dlt_cdh_definitions.h"
+
+typedef struct
+{
+ FILE* stream;
+ unsigned int offset;
+ gzFile gz_dst_file;
+ unsigned char* read_buf;
+
+} file_streamer_t;
+
+cdh_status_t stream_init(file_streamer_t* p_fs, const char* p_src_fname, const char* p_dst_fname);
+cdh_status_t stream_close(file_streamer_t* p_fs);
+cdh_status_t stream_read(file_streamer_t* p_fs, void* p_buf, unsigned int p_size);
+cdh_status_t stream_finish(file_streamer_t* p_fs);
+cdh_status_t stream_move_to_offest(file_streamer_t* p_fs, unsigned int p_offset);
+cdh_status_t stream_move_ahead(file_streamer_t* p_fs, unsigned int p_nbbytes);
+unsigned int stream_get_offset(file_streamer_t* p_fs);
+
+#endif /* #ifndef DLT_CDH_STREAMER_H */