summaryrefslogtreecommitdiff
path: root/src/vehicle-gateway/obd2.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vehicle-gateway/obd2.h')
-rw-r--r--src/vehicle-gateway/obd2.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/vehicle-gateway/obd2.h b/src/vehicle-gateway/obd2.h
new file mode 100644
index 0000000..8c43560
--- /dev/null
+++ b/src/vehicle-gateway/obd2.h
@@ -0,0 +1,56 @@
+/**
+* @licence app begin@
+* SPDX-License-Identifier: MPL-2.0
+*
+* \copyright Copyright (C) 2017, PSA GROUP
+*
+* \file obd2.c
+*
+* \brief This file is part of the FSA project.
+*
+* \author Philippe Colliot <philippe.colliot@mpsa.com>
+*
+* \version 0.1
+*
+*
+* @ref http://tldp.org/HOWTO/Serial-Programming-HOWTO/x115.html
+*
+* Part of this code has been inspired by Helmut Schmidt <https://github.com/huirad>
+*
+*
+* 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/.
+*
+* List of changes:
+* <date>, <name>, <description of change>
+*
+* @licence end@
+*/
+
+#ifndef INCLUDE_OBD2
+#define INCLUDE_OBD2
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <math.h>
+#include <sys/types.h>
+
+bool obd2_read_answer(char*& ans, size_t* length);
+
+bool obd2_send_command(const char* cmd);
+
+bool obd2_init(char* obd2_device, unsigned int baudrate);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif