summaryrefslogtreecommitdiff
path: root/utils/loc_nmea.h
diff options
context:
space:
mode:
authorNaresh Munagala <nareshm@codeaurora.org>2016-12-23 10:42:44 +0530
committerBaili Feng <bailif@codeaurora.org>2017-03-29 18:22:08 +0800
commit06e6d68aee14fcc39d577ec44de4c99cd785a2f3 (patch)
tree862f7400320935bd0ee067679a845fdadf22cc83 /utils/loc_nmea.h
parenta760fcb28cf0bc71b3114cc9ed49a2e043040d0d (diff)
downloadgps-06e6d68aee14fcc39d577ec44de4c99cd785a2f3.tar.gz
move nmea generation logic inside utils
NMEA generation logic needs to be reused across the interface boundaries. Moved this logic inside utils. Change-Id: Icb5c6fbc38b178c5edea468d26286e21749bfbfb CRs-Fixed: 1098734
Diffstat (limited to 'utils/loc_nmea.h')
-rw-r--r--utils/loc_nmea.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/utils/loc_nmea.h b/utils/loc_nmea.h
new file mode 100644
index 0000000..92f997e
--- /dev/null
+++ b/utils/loc_nmea.h
@@ -0,0 +1,46 @@
+/* Copyright (c) 2012-2013, 2015-2017 The Linux Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef LOC_ENG_NMEA_H
+#define LOC_ENG_NMEA_H
+
+#include <gps_extended.h>
+#include <vector>
+#include <string>
+#define NMEA_SENTENCE_MAX_LENGTH 200
+
+void loc_nmea_generate_sv(const GnssSvNotification &svNotify,
+ std::vector<std::string> &nmeaArraystr);
+
+void loc_nmea_generate_pos(const UlpLocation &location,
+ const GpsLocationExtended &locationExtended,
+ unsigned char generate_nmea,
+ std::vector<std::string> &nmeaArraystr);
+
+#endif // LOC_ENG_NMEA_H