replace common qcom sources with samsung ones
This commit is contained in:
50
qcom/opensource/location/Android.bp
Normal file
50
qcom/opensource/location/Android.bp
Normal file
@@ -0,0 +1,50 @@
|
||||
GNSS_CFLAGS = [
|
||||
"-Werror",
|
||||
"-Wformat",
|
||||
"-Wformat-extra-args",
|
||||
"-Wunused-label",
|
||||
"-Wunused-variable",
|
||||
"-Wunused-function",
|
||||
"-Wimplicit-fallthrough",
|
||||
"-Wno-unused-parameter",
|
||||
"-Wno-error=unused-parameter",
|
||||
"-Wno-error=macro-redefined",
|
||||
"-Wno-error=reorder",
|
||||
"-Wno-error=missing-braces",
|
||||
"-Wno-error=self-assign",
|
||||
"-Wno-error=enum-conversion",
|
||||
"-Wno-error=logical-op-parentheses",
|
||||
"-Wno-error=null-arithmetic",
|
||||
"-Wno-error=null-conversion",
|
||||
"-Wno-error=parentheses-equality",
|
||||
"-Wno-error=undefined-bool-conversion",
|
||||
"-Wno-error=tautological-compare",
|
||||
"-Wno-error=switch",
|
||||
]
|
||||
|
||||
|
||||
soong_config_module_type {
|
||||
name: "qtilocationopensrc_cc_defaults",
|
||||
module_type: "cc_defaults",
|
||||
config_namespace: "qtilocation",
|
||||
bool_variables: [
|
||||
"feature_nhz",
|
||||
"feature_locauto",
|
||||
],
|
||||
properties: [
|
||||
"cflags",
|
||||
],
|
||||
}
|
||||
|
||||
qtilocationopensrc_cc_defaults {
|
||||
name: "qtilocationopensrc_common_defaults",
|
||||
cflags: GNSS_CFLAGS,
|
||||
soong_config_variables: {
|
||||
feature_nhz: {
|
||||
cflags: ["-DFEATURE_NHZ_ENABLED"],
|
||||
},
|
||||
feature_locauto: {
|
||||
cflags: ["-DFEATURE_AUTOMOTIVE"],
|
||||
},
|
||||
},
|
||||
}
|
5
qcom/opensource/location/Android.mk
Normal file
5
qcom/opensource/location/Android.mk
Normal file
@@ -0,0 +1,5 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
|
||||
include $(call all-makefiles-under,$(LOCAL_PATH))
|
||||
|
48
qcom/opensource/location/client_api/Android.bp
Normal file
48
qcom/opensource/location/client_api/Android.bp
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
cc_library_shared {
|
||||
|
||||
name: "liblocation_client_api",
|
||||
vendor: true,
|
||||
|
||||
//# Libs
|
||||
shared_libs: [
|
||||
"libgps.utils",
|
||||
"liblocation_api_msg",
|
||||
"libprotobuf-cpp-lite",
|
||||
"liblog",
|
||||
],
|
||||
|
||||
srcs: [
|
||||
"src/LocationClientApi.cpp",
|
||||
"src/LocationClientApiImpl.cpp",
|
||||
"src/LCAReportLoggerUtil.cpp",
|
||||
],
|
||||
|
||||
cflags: [
|
||||
"-fno-short-enums",
|
||||
"-D_ANDROID_",
|
||||
"-Wno-error=non-virtual-dtor",
|
||||
] + GNSS_CFLAGS,
|
||||
|
||||
local_include_dirs: [
|
||||
"inc", "src",
|
||||
],
|
||||
|
||||
//# Includes
|
||||
ldflags: ["-Wl,--export-dynamic"],
|
||||
|
||||
header_libs: [
|
||||
"libutils_headers",
|
||||
"libgps.utils_headers",
|
||||
"libloc_pla_headers",
|
||||
"liblocation_api_headers",
|
||||
"liblocation_api_msg.headers",
|
||||
],
|
||||
}
|
||||
|
||||
cc_library_headers {
|
||||
|
||||
name: "liblocation_client_api.impl_headers",
|
||||
export_include_dirs: ["src"] + ["inc"],
|
||||
vendor: true,
|
||||
}
|
2294
qcom/opensource/location/client_api/LocationClientApiDoxygen.conf
Normal file
2294
qcom/opensource/location/client_api/LocationClientApiDoxygen.conf
Normal file
File diff suppressed because it is too large
Load Diff
59
qcom/opensource/location/client_api/Makefile.am
Normal file
59
qcom/opensource/location/client_api/Makefile.am
Normal file
@@ -0,0 +1,59 @@
|
||||
AM_CFLAGS = \
|
||||
-DDEBUG \
|
||||
-I src/ \
|
||||
-I inc/ \
|
||||
$(GPSUTILS_CFLAGS) \
|
||||
$(LOCAPIMSGPROTO_CFLAGS) \
|
||||
-std=c++14
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
AM_CPPFLAGS = -std=c++14
|
||||
|
||||
requiredlibs = \
|
||||
$(GPSUTILS_LIBS) \
|
||||
$(LOCAPIMSGPROTO_LIBS) \
|
||||
-lprotobuf-lite
|
||||
|
||||
h_sources = \
|
||||
src/LocationClientApiImpl.h \
|
||||
src/LCAReportLoggerUtil.h \
|
||||
inc/LocationClientApi.h
|
||||
|
||||
c_sources = \
|
||||
src/LocationClientApiImpl.cpp \
|
||||
src/LocationClientApi.cpp \
|
||||
src/LCAReportLoggerUtil.cpp
|
||||
|
||||
liblocation_client_api_la_SOURCES = \
|
||||
$(c_sources) $(h_sources)
|
||||
liblocation_client_api_la_h_sources = $(h_sources)
|
||||
|
||||
######################
|
||||
# Build location_client_api
|
||||
######################
|
||||
|
||||
if USE_EXTERNAL_AP
|
||||
AM_CFLAGS += $(LOCSOCKET_CFLAGS) -DFEATURE_EXTERNAL_AP
|
||||
requiredlibs += $(LOCSOCKET_LIBS)
|
||||
endif
|
||||
|
||||
if USE_GLIB
|
||||
liblocation_client_api_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
|
||||
liblocation_client_api_la_LDFLAGS = -lstdc++ -g -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
|
||||
liblocation_client_api_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
|
||||
else
|
||||
liblocation_client_api_la_CFLAGS = $(AM_CFLAGS)
|
||||
liblocation_client_api_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread -shared -version-info 1:0:0
|
||||
liblocation_client_api_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
||||
endif
|
||||
|
||||
liblocation_client_api_la_LIBADD = $(requiredlibs) -lstdc++ -ldl
|
||||
|
||||
#Create and Install libraries
|
||||
library_include_HEADERS = $(h_sources)
|
||||
lib_LTLIBRARIES = liblocation_client_api.la
|
||||
|
||||
library_includedir = $(pkgincludedir)
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = location-client-api.pc
|
||||
EXTRA_DIST = $(pkgconfig_DATA)
|
11
qcom/opensource/location/client_api/README
Normal file
11
qcom/opensource/location/client_api/README
Normal file
@@ -0,0 +1,11 @@
|
||||
Location Client Api doc
|
||||
|
||||
1. Steps to generate doxygen Api doc:
|
||||
run
|
||||
mkclientapidoc.sh [output-path]
|
||||
default output-path is docs/
|
||||
default doxgen configuration file is LocationClientApiDoxygen.conf
|
||||
|
||||
2. below file will be generated:
|
||||
html/
|
||||
-HTML output, where the html/index.html is the home page.
|
92
qcom/opensource/location/client_api/configure.ac
Normal file
92
qcom/opensource/location/client_api/configure.ac
Normal file
@@ -0,0 +1,92 @@
|
||||
# configure.ac -- Autoconf script for gps location-client-api
|
||||
#
|
||||
# Process this file with autoconf to produce a configure script
|
||||
|
||||
# Requires autoconf tool later than 2.61
|
||||
AC_PREREQ(2.61)
|
||||
# Initialize the location_client_api package version 1.0.0
|
||||
AC_INIT([location-client-api],1.0.0)
|
||||
# Does not strictly follow GNU Coding standards
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
# Disables auto rebuilding of configure, Makefile.ins
|
||||
AM_MAINTAINER_MODE
|
||||
# Verifies the --srcdir is correct by checking for the path
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
# defines some macros variable to be included by source
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_LIBTOOL
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_AWK
|
||||
AC_PROG_CPP
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
# Checks for libraries.
|
||||
PKG_CHECK_MODULES([GPSUTILS], [qcom-gps-utils])
|
||||
AC_SUBST([GPSUTILS_CFLAGS])
|
||||
AC_SUBST([GPSUTILS_LIBS])
|
||||
|
||||
PKG_CHECK_MODULES([LOCAPIMSGPROTO], [location-api-msg-proto])
|
||||
AC_SUBST([LOCAPIMSGPROTO_CFLAGS])
|
||||
AC_SUBST([LOCAPIMSGPROTO_LIBS])
|
||||
|
||||
AC_ARG_WITH([external_ap],
|
||||
AC_HELP_STRING([--with-external_ap=@<:@dir@:>@],
|
||||
[Using External Application Processor]),
|
||||
[],
|
||||
with_external_ap=no)
|
||||
|
||||
AM_CONDITIONAL(USE_EXTERNAL_AP, test "x${with_external_ap}" = "xyes")
|
||||
|
||||
AC_ARG_WITH([glib],
|
||||
AC_HELP_STRING([--with-glib],
|
||||
[enable glib, building HLOS systems which use glib]))
|
||||
|
||||
if (test "x${with_glib}" = "xyes"); then
|
||||
AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib])
|
||||
PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes,
|
||||
AC_MSG_ERROR(GThread >= 2.16 is required))
|
||||
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes,
|
||||
AC_MSG_ERROR(GLib >= 2.16 is required))
|
||||
GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
|
||||
GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
|
||||
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
AC_SUBST(GLIB_LIBS)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes")
|
||||
|
||||
AC_ARG_WITH([core_includes],
|
||||
AC_HELP_STRING([--with-core-includes=@<:@dir@:>@],
|
||||
[Specify the location of the core headers]),
|
||||
[core_incdir=$withval],
|
||||
with_core_includes=no)
|
||||
|
||||
if (test "x$with_core_includes" != "xno"); then
|
||||
CPPFLAGS="${CPPFLAGS} -I${core_incdir}"
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([locpla_includes],
|
||||
AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@],
|
||||
[specify the path to locpla-includes in loc-pla_git.bb]),
|
||||
[locpla_incdir=$withval],
|
||||
with_locpla_includes=no)
|
||||
|
||||
if test "x$with_locpla_includes" != "xno"; then
|
||||
AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}")
|
||||
fi
|
||||
|
||||
AC_CONFIG_FILES([ \
|
||||
Makefile \
|
||||
location-client-api.pc
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
4161
qcom/opensource/location/client_api/inc/LocationClientApi.h
Normal file
4161
qcom/opensource/location/client_api/inc/LocationClientApi.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: location-client-api
|
||||
Description: location client api library
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -llocation_client_api
|
||||
Cflags: -I${includedir} -I${includedir}/location-client-api
|
86
qcom/opensource/location/client_api/mkclientapidoc.sh
Normal file
86
qcom/opensource/location/client_api/mkclientapidoc.sh
Normal file
@@ -0,0 +1,86 @@
|
||||
#!/bin/bash
|
||||
#==========================================================================
|
||||
#Copyright (c) 2018, 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.
|
||||
#
|
||||
#==========================================================================
|
||||
|
||||
#==========================================================================
|
||||
#
|
||||
# Usage:
|
||||
# mkclientapidoc.sh [output-path]
|
||||
#
|
||||
# Note, this script requires the existence of the doxygen tool -
|
||||
# This script can be called from any directory
|
||||
#==========================================================================
|
||||
|
||||
DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||
# the default doxygen configuration is LocationClientApiDoxygen.conf
|
||||
CONFIG=$DIR/LocationClientApiDoxygen.conf
|
||||
OUT="docs"
|
||||
|
||||
# Show help message if requested, otherwise create output folder
|
||||
if [ -n "$1" ]
|
||||
then
|
||||
if [ "$1" == "-h" ] || [ "$1" == "--help" ]
|
||||
then
|
||||
echo "$0 [output-path]"
|
||||
echo " e.g. $0"
|
||||
echo " $0 docs"
|
||||
exit
|
||||
else
|
||||
OUT=$1
|
||||
if [ ! -d $OUT ]
|
||||
then
|
||||
mkdir -p $OUT
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
which doxygen
|
||||
if [ "$?" == 0 ]
|
||||
then
|
||||
# Use ? here to seperate patterns as / in path will be regarded as splitter by default
|
||||
sed -i "s?^OUTPUT_DIRECTORY .*?OUTPUT_DIRECTORY = $OUT?" $CONFIG
|
||||
sed -i "s?^INPUT .*?INPUT = $DIR/inc?" $CONFIG
|
||||
doxygen $CONFIG > /dev/null 2>&1
|
||||
else
|
||||
echo "This script requires doxygen tool be to installed. "
|
||||
echo "You can install is with e.g. sudo apt-get install doxygen"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -e $OUT/html/index.html ]
|
||||
then
|
||||
echo "Error building Location Client Api doc files."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "doxygen docs for Location Client Api available at: $OUT/html"
|
183
qcom/opensource/location/client_api/src/LCAReportLoggerUtil.cpp
Normal file
183
qcom/opensource/location/client_api/src/LCAReportLoggerUtil.cpp
Normal file
@@ -0,0 +1,183 @@
|
||||
/* Copyright (c) 2020-2021, 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||
|
||||
Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted (subject to the limitations in the
|
||||
disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
|
||||
*/
|
||||
|
||||
#include "LCAReportLoggerUtil.h"
|
||||
#include <loc_cfg.h>
|
||||
#include <log_util.h>
|
||||
|
||||
namespace location_client {
|
||||
|
||||
LCAReportLoggerUtil::LCAReportLoggerUtil():
|
||||
mLogLocation(nullptr),
|
||||
mLogSv(nullptr),
|
||||
mLogNmea(nullptr),
|
||||
mLogMeas(nullptr),
|
||||
mLogDcReport(nullptr),
|
||||
mLogEph(nullptr),
|
||||
mLogGnssData(nullptr){
|
||||
|
||||
int loadDiagIfaceLib = 1;
|
||||
const loc_param_s_type gps_conf_params[] = {
|
||||
{"LOC_DIAGIFACE_ENABLED", &loadDiagIfaceLib, nullptr, 'n'}
|
||||
};
|
||||
UTIL_READ_CONF(LOC_PATH_GPS_CONF, gps_conf_params);
|
||||
|
||||
LOC_LOGi("Loc_DiagIface_enabled: %d", loadDiagIfaceLib);
|
||||
|
||||
if (0 != loadDiagIfaceLib) {
|
||||
const char* libname = "liblocdiagiface.so";
|
||||
void* libHandle = nullptr;
|
||||
mLogLocation = (LogGnssLocation)dlGetSymFromLib(
|
||||
libHandle, libname, "LogGnssLocation");
|
||||
if (nullptr == mLogLocation) {
|
||||
LOC_LOGw("DiagIface mLogLocation is null");
|
||||
}
|
||||
mLogSv = (LogGnssSv)dlGetSymFromLib(
|
||||
libHandle, libname, "LogGnssSv");
|
||||
if (nullptr == mLogSv) {
|
||||
LOC_LOGw("DiagIface mLogSv is null");
|
||||
}
|
||||
mLogNmea = (LogGnssNmea)dlGetSymFromLib(
|
||||
libHandle, libname, "LogGnssNmea");
|
||||
if (nullptr == mLogNmea) {
|
||||
LOC_LOGw("DiagIface mLogNmea is null");
|
||||
}
|
||||
mLogMeas = (LogGnssMeas)dlGetSymFromLib(
|
||||
libHandle, libname, "LogGnssMeas");
|
||||
if (nullptr == mLogMeas) {
|
||||
LOC_LOGw("DiagIface mLogMeas is null");
|
||||
}
|
||||
mLogDcReport = (LogGnssDcReport)dlGetSymFromLib(
|
||||
libHandle, libname, "LogGnssDcReport");
|
||||
if (nullptr == mLogDcReport) {
|
||||
LOC_LOGw("DiagIface mLogDcReport is null");
|
||||
}
|
||||
mLogGeofenceBreach = (LogGeofenceBreach)dlGetSymFromLib(
|
||||
libHandle, libname, "LogGeofenceBreach");
|
||||
if (nullptr == mLogGeofenceBreach) {
|
||||
LOC_LOGw("DiagIface mLogGeofenceBreach is null");
|
||||
}
|
||||
mLogEph = (LogGnssEphemeris)dlGetSymFromLib(
|
||||
libHandle, libname, "LogGnssEphemeris");
|
||||
if (nullptr == mLogEph) {
|
||||
LOC_LOGw("DiagIface mLogEph is null");
|
||||
}
|
||||
mLogGnssData = (LogGnssData)dlGetSymFromLib(
|
||||
libHandle, libname, "LogGnssData");
|
||||
if (nullptr == mLogGnssData) {
|
||||
LOC_LOGw("DiagIface mLogGnssData is null");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LCAReportLoggerUtil::log(const GnssLocation& gnssLocation,
|
||||
const DiagLocationInfoExt& diagInfoExt) {
|
||||
if (mLogLocation != nullptr) {
|
||||
mLogLocation(gnssLocation, diagInfoExt);
|
||||
}
|
||||
}
|
||||
|
||||
void LCAReportLoggerUtil::log(const std::vector<GnssSv>& gnssSvsVector) {
|
||||
if (mLogSv != nullptr) {
|
||||
mLogSv(gnssSvsVector);
|
||||
}
|
||||
}
|
||||
|
||||
void LCAReportLoggerUtil::log(
|
||||
uint64_t timestamp, uint32_t length, const char* nmea, LocOutputEngineType engType) {
|
||||
if (mLogNmea != nullptr) {
|
||||
mLogNmea(timestamp, length, nmea, engType);
|
||||
}
|
||||
}
|
||||
|
||||
void LCAReportLoggerUtil::log(const GnssMeasurements& gnssMeasurements) {
|
||||
if (mLogMeas != nullptr) {
|
||||
mLogMeas(gnssMeasurements);
|
||||
}
|
||||
}
|
||||
|
||||
void LCAReportLoggerUtil::log(const GnssDcReport& gnssDcReport) {
|
||||
if (mLogDcReport != nullptr) {
|
||||
mLogDcReport(gnssDcReport);
|
||||
}
|
||||
}
|
||||
void LCAReportLoggerUtil::log(const GeofenceBreachNotification& breachNotif,
|
||||
const std::vector<Geofence> &geofences) {
|
||||
if (mLogGeofenceBreach != nullptr) {
|
||||
mLogGeofenceBreach(breachNotif, geofences);
|
||||
}
|
||||
}
|
||||
|
||||
void LCAReportLoggerUtil::log(const GnssEphemeris& ephInfo) {
|
||||
if (mLogEph != nullptr) {
|
||||
mLogEph(ephInfo);
|
||||
}
|
||||
}
|
||||
|
||||
void LCAReportLoggerUtil::log(const GnssData& gnssData) {
|
||||
if (mLogGnssData != nullptr) {
|
||||
mLogGnssData(gnssData);
|
||||
}
|
||||
}
|
||||
} // namespace loc_client
|
117
qcom/opensource/location/client_api/src/LCAReportLoggerUtil.h
Normal file
117
qcom/opensource/location/client_api/src/LCAReportLoggerUtil.h
Normal file
@@ -0,0 +1,117 @@
|
||||
/* Copyright (c) 2020-2021, 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||
|
||||
Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted (subject to the limitations in the
|
||||
disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER 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 LOCATION_CLIENT_API_DIAG_BASE
|
||||
#define LOCATION_CLIENT_API_DIAG_BASE
|
||||
|
||||
#include "LocLoggerBase.h"
|
||||
#include <LocationDataTypes.h>
|
||||
#include "LocationClientApi.h"
|
||||
#include <loc_misc_utils.h>
|
||||
|
||||
using namespace loc_util;
|
||||
|
||||
namespace location_client {
|
||||
|
||||
class LCAReportLoggerUtil {
|
||||
public:
|
||||
typedef void (*LogGnssLocation)(const GnssLocation& gnssLocation,
|
||||
const DiagLocationInfoExt& diagLocationInfoExt);
|
||||
typedef void (*LogGnssSv)(const std::vector<GnssSv>& gnssSvsVector);
|
||||
typedef void (*LogGnssNmea)(uint64_t timestamp, uint32_t length, const char* nmea,
|
||||
LocOutputEngineType engType);
|
||||
typedef void (*LogGnssMeas)(const GnssMeasurements& gnssMeasurements);
|
||||
typedef void (*LogGnssDcReport)(const GnssDcReport& gnssDcReport);
|
||||
typedef void (*LogGeofenceBreach)(const GeofenceBreachNotification& breachNotif,
|
||||
const std::vector<Geofence>& geofences);
|
||||
typedef void (*LogGnssEphemeris)(const GnssEphemeris& ephInfo);
|
||||
typedef void (*LogGnssData)(const GnssData& gnssData);
|
||||
|
||||
LCAReportLoggerUtil();
|
||||
void log(const GnssLocation& gnssLocation,
|
||||
const DiagLocationInfoExt & diagLocationInfoExt);
|
||||
void log(const std::vector<GnssSv>& gnssSvsVector);
|
||||
void log(uint64_t timestamp, uint32_t length, const char* nmea, LocOutputEngineType engType);
|
||||
void log(const GnssMeasurements& gnssMeasurements);
|
||||
void log(const GnssDcReport& gnssDcReport);
|
||||
void log(const GeofenceBreachNotification& breachNotif,
|
||||
const std::vector<Geofence>& geofences);
|
||||
void log(const GnssEphemeris& ephInfo);
|
||||
void log(const GnssData& gnssData);
|
||||
|
||||
private:
|
||||
LogGnssLocation mLogLocation;
|
||||
LogGnssSv mLogSv;
|
||||
LogGnssNmea mLogNmea;
|
||||
LogGnssMeas mLogMeas;
|
||||
LogGnssDcReport mLogDcReport;
|
||||
LogGeofenceBreach mLogGeofenceBreach;
|
||||
LogGnssEphemeris mLogEph;
|
||||
LogGnssData mLogGnssData;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
1950
qcom/opensource/location/client_api/src/LocationClientApi.cpp
Normal file
1950
qcom/opensource/location/client_api/src/LocationClientApi.cpp
Normal file
File diff suppressed because it is too large
Load Diff
3900
qcom/opensource/location/client_api/src/LocationClientApiImpl.cpp
Normal file
3900
qcom/opensource/location/client_api/src/LocationClientApiImpl.cpp
Normal file
File diff suppressed because it is too large
Load Diff
367
qcom/opensource/location/client_api/src/LocationClientApiImpl.h
Normal file
367
qcom/opensource/location/client_api/src/LocationClientApiImpl.h
Normal file
@@ -0,0 +1,367 @@
|
||||
/* Copyright (c) 2018-2021, 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||
|
||||
Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted (subject to the limitations in the
|
||||
disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER 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 LOCATIONCLIENTAPIIMPL_H
|
||||
#define LOCATIONCLIENTAPIIMPL_H
|
||||
|
||||
#include <mutex>
|
||||
|
||||
#include <loc_pla.h>
|
||||
#include <LocIpc.h>
|
||||
#include <LocationDataTypes.h>
|
||||
#include <ILocationAPI.h>
|
||||
#include <MsgTask.h>
|
||||
#include <LocationApiMsg.h>
|
||||
#include <LocationApiPbMsgConv.h>
|
||||
#include <LCAReportLoggerUtil.h>
|
||||
#include <unordered_set>
|
||||
#include <unordered_map>
|
||||
#include <condition_variable>
|
||||
#include <chrono>
|
||||
|
||||
using namespace loc_util;
|
||||
|
||||
namespace location_client
|
||||
{
|
||||
enum LocationCallbackType {
|
||||
// Tracking callbacks type
|
||||
TRACKING_CBS = 0,
|
||||
// Batching callbacks type
|
||||
BATCHING_CBS = 1,
|
||||
// Geofence callbacks type
|
||||
GEOFENCE_CBS = 2
|
||||
};
|
||||
|
||||
typedef std::function<void(
|
||||
uint32_t response
|
||||
)> PingTestCb;
|
||||
|
||||
|
||||
class GeofenceImpl: public std::enable_shared_from_this<GeofenceImpl> {
|
||||
uint32_t mId;
|
||||
Geofence mGeofence;
|
||||
static uint32_t nextId();
|
||||
static mutex mGfMutex;
|
||||
public:
|
||||
GeofenceImpl(Geofence* geofence) : mId(nextId()), mGeofence(*geofence) {
|
||||
}
|
||||
void bindGeofence(Geofence* geofence) {
|
||||
geofence->mGeofenceImpl = shared_from_this();
|
||||
}
|
||||
inline uint32_t getClientId() { return mId; }
|
||||
};
|
||||
|
||||
// utility for wait / notify
|
||||
class Waitable {
|
||||
std::mutex mMutex;
|
||||
std::condition_variable mCond;
|
||||
public:
|
||||
Waitable() = default;
|
||||
~Waitable() = default;
|
||||
|
||||
void wait(uint32_t ms) {
|
||||
std::unique_lock<std::mutex> lock(mMutex);
|
||||
mCond.wait_for(lock, std::chrono::milliseconds(ms));
|
||||
}
|
||||
|
||||
void notify() {
|
||||
mCond.notify_one();
|
||||
}
|
||||
};
|
||||
|
||||
class IpcListener;
|
||||
|
||||
class LocationClientApiImpl : public ILocationAPI, public Waitable {
|
||||
friend IpcListener;
|
||||
public:
|
||||
LocationClientApiImpl(capabilitiesCallback capabitiescb);
|
||||
virtual void destroy(locationApiDestroyCompleteCallback destroyCompleteCb=nullptr) override;
|
||||
|
||||
// Tracking
|
||||
virtual void updateCallbacks(LocationCallbacks&) override;
|
||||
|
||||
virtual uint32_t startTracking(const TrackingOptions&) override;
|
||||
|
||||
virtual void stopTracking(uint32_t id) override;
|
||||
|
||||
virtual void updateTrackingOptions(uint32_t id, const TrackingOptions&) override;
|
||||
|
||||
//Batching
|
||||
virtual uint32_t startBatching(const BatchingOptions&) override;
|
||||
|
||||
virtual void stopBatching(uint32_t id) override;
|
||||
|
||||
virtual void updateBatchingOptions(uint32_t id, const BatchingOptions&) override;
|
||||
|
||||
virtual void getBatchedLocations(uint32_t id, size_t count) override;
|
||||
|
||||
//Geofence
|
||||
virtual uint32_t* addGeofences(size_t count, GeofenceOption*,
|
||||
GeofenceInfo*) override;
|
||||
|
||||
virtual void removeGeofences(size_t count, uint32_t* ids) override;
|
||||
|
||||
virtual void modifyGeofences(size_t count, uint32_t* ids,
|
||||
GeofenceOption* options) override;
|
||||
|
||||
virtual void pauseGeofences(size_t count, uint32_t* ids) override;
|
||||
|
||||
virtual void resumeGeofences(size_t count, uint32_t* ids) override;
|
||||
|
||||
//GNSS
|
||||
virtual void gnssNiResponse(uint32_t id, GnssNiResponse response) override;
|
||||
|
||||
virtual void getDebugReport(GnssDebugReport& reports) override;
|
||||
|
||||
virtual uint32_t getAntennaInfo(AntennaInfoCallback* cb) override;
|
||||
|
||||
// other interface
|
||||
void startPositionSession(const LocationCallbacks& callbacksOption,
|
||||
const TrackingOptions& trackingOptions);
|
||||
|
||||
void startBatchingSession(const LocationCallbacks& callbacksOption,
|
||||
const BatchingOptions& batchOptions);
|
||||
|
||||
void updateNetworkAvailability(bool available);
|
||||
void getGnssEnergyConsumed(gnssEnergyConsumedCallback gnssEnergyConsumedCb,
|
||||
responseCallback responseCb);
|
||||
void updateLocationSystemInfoListener(
|
||||
locationSystemInfoCallback locationSystemInfoCb,
|
||||
responseCallback responseCb);
|
||||
|
||||
uint32_t startTrackingSync(const TrackingOptions&);
|
||||
uint32_t startBatchingSync(const BatchingOptions&);
|
||||
void updateCallbacksSync(LocationCallbacks& callbacks);
|
||||
|
||||
void addGeofences(const LocationCallbacks& callbacksOption,
|
||||
const std::vector<Geofence>& geofences);
|
||||
inline Geofence getMappedGeofence(uint32_t id) {
|
||||
return mGeofenceMap.at(id);
|
||||
}
|
||||
|
||||
inline uint16_t getYearOfHw() {return mYearOfHw;}
|
||||
|
||||
void getSingleTerrestrialPos(uint32_t timeoutMsec, TerrestrialTechMask techMask,
|
||||
float horQoS, trackingCallback terrestrialPositionCallback,
|
||||
responseCallback responseCallback);
|
||||
void getSinglePos(uint32_t timeoutMsec, float horQoS,
|
||||
trackingCallback positionCb,
|
||||
responseCallback responseCb);
|
||||
|
||||
void pingTest(PingTestCb pingTestCallback);
|
||||
|
||||
static LocationSystemInfo parseLocationSystemInfo(
|
||||
const::LocationSystemInfo &halSystemInfo);
|
||||
static LocationResponse parseLocationError(::LocationError error);
|
||||
static GnssMeasurements parseGnssMeasurements(const ::GnssMeasurementsNotification
|
||||
&halGnssMeasurements);
|
||||
static GnssData parseGnssData(const ::GnssDataNotification &halGnssData);
|
||||
static GnssSv parseGnssSv(const ::GnssSv &halGnssSv);
|
||||
static GnssLocation parseLocationInfo(const ::GnssLocationInfoNotification &halLocationInfo);
|
||||
static GnssSystemTime parseSystemTime(const ::GnssSystemTime &halSystemTime);
|
||||
static GnssGloTimeStructType parseGloTime(const ::GnssGloTimeStructType &halGloTime);
|
||||
static GnssSystemTimeStructType parseGnssTime(const ::GnssSystemTimeStructType &halGnssTime);
|
||||
static LocationReliability parseLocationReliability(
|
||||
const ::LocationReliability &halReliability);
|
||||
static GnssLocationPositionDynamics parseLocationPositionDynamics(
|
||||
const ::GnssLocationPositionDynamics &halPositionDynamics,
|
||||
const ::GnssLocationPositionDynamicsExt &halPositionDynamicsExt);
|
||||
static void parseGnssMeasUsageInfo(const ::GnssLocationInfoNotification &halLocationInfo,
|
||||
std::vector<GnssMeasUsageInfo>& clientMeasUsageInfo);
|
||||
static GnssSignalTypeMask parseGnssSignalType(
|
||||
const ::GnssSignalTypeMask &halGnssSignalTypeMask);
|
||||
static GnssLocationSvUsedInPosition parseLocationSvUsedInPosition(
|
||||
const ::GnssLocationSvUsedInPosition &halSv);
|
||||
static void parseLocation(const ::Location &halLocation, Location& location);
|
||||
static Location parseLocation(const ::Location &halLocation);
|
||||
static uint16_t parseYearOfHw(::LocationCapabilitiesMask mask);
|
||||
static LocationCapabilitiesMask parseCapabilitiesMask(::LocationCapabilitiesMask mask);
|
||||
static GnssMeasurementsDataFlagsMask parseMeasurementsDataMask(
|
||||
::GnssMeasurementsDataFlagsMask in);
|
||||
static GnssEnergyConsumedInfo parseGnssConsumedInfo(::GnssEnergyConsumedInfo);
|
||||
static GnssDcReport parseDcReport(const::GnssDcReportInfo &halDcReport);
|
||||
static GeofenceBreachTypeMask parseGeofenceBreachType(GeofenceBreachType breachType);
|
||||
static GeofenceBreachType parseGeofenceBreachTypeMask(::GeofenceBreachTypeMask breachTypeMask);
|
||||
|
||||
static void parseEphSrcAndAction(const ::GnssEphAction& halEphAction,
|
||||
GnssEphSource& ephSrc, GnssEphAction& ephAction);
|
||||
static GnssEphemeris parseGnssEphemerisInfo(const ::GnssSvEphemerisReport &ephInfo);
|
||||
static void parseCommanGnssEphemeris(const ::GnssEphCommon& halCommanEph,
|
||||
GnssEphCommonInfo& lcaCommanEph);
|
||||
static void parseGloEphemeris( const GlonassEphemerisResponse& halEph,
|
||||
std::vector<GlonassEphemeris>& lcaEphInfo);
|
||||
static void parseGalEphemeris( const GalileoEphemerisResponse& halEph,
|
||||
std::vector<GalileoEphemeris>& lcaEphInfo);
|
||||
static void parseGpsEphemeris(const GpsEphemerisResponse& halEph,
|
||||
std::vector<GpsQzssEphemeris>& lcaEphInfo);
|
||||
static void parseBdsEphemeris(const BdsEphemerisResponse& halEph,
|
||||
std::vector<BdsEphemeris>& lcaEphInfo);
|
||||
static void parseQzssEphemeris(const QzssEphemerisResponse& halEph,
|
||||
std::vector<QzssEphemeris>& lcaEphInfo);
|
||||
static void parseNavicEphemeris(const NavicEphemerisResponse& halEph,
|
||||
std::vector<NavicEphemeris>& lcaEphInfo);
|
||||
|
||||
void logLocation(const Location &location,
|
||||
LocReportTriggerType reportTriggerType);
|
||||
void logLocation(const GnssLocation &gnssLocation,
|
||||
LocReportTriggerType reportTriggerType);
|
||||
void logGeofenceBreach(const GeofenceBreachNotification& breachNotif,
|
||||
const std::vector<Geofence> &geofences);
|
||||
|
||||
LCAReportLoggerUtil & getLogger() {
|
||||
return mLogger;
|
||||
}
|
||||
|
||||
void stopTrackingAndClearSubscriptions(uint32_t id);
|
||||
void clearSubscriptions(LocationCallbackType cbTypeToClear);
|
||||
void stopTrackingSync(bool clearSubscriptions);
|
||||
bool isInTracking() { return mSessionId != LOCATION_CLIENT_SESSION_ID_INVALID; }
|
||||
bool isInBatching() { return mBatchingId != LOCATION_CLIENT_SESSION_ID_INVALID; }
|
||||
|
||||
private:
|
||||
~LocationClientApiImpl();
|
||||
|
||||
inline LocationCapabilitiesMask getCapabilities() {return mCapsMask;}
|
||||
void capabilitesCallback(ELocMsgID msgId, const void* msgData);
|
||||
void updateTrackingOptionsSync(const TrackingOptions& option, bool clearSubscriptions);
|
||||
bool checkGeofenceMap(size_t count, uint32_t* ids);
|
||||
void addGeofenceMap(Geofence& geofence);
|
||||
void eraseGeofenceMap(size_t count, uint32_t* ids);
|
||||
bool isGeofenceMapEmpty();
|
||||
|
||||
// convenient methods
|
||||
inline bool sendMessage(const uint8_t* data, uint32_t length) const {
|
||||
return (mIpcSender != nullptr) && LocIpc::send(*mIpcSender, data, length);
|
||||
}
|
||||
|
||||
void invokePositionSessionResponseCb(LocationError errCode);
|
||||
void diagLogGnssLocation(const GnssLocation &gnssLocation);
|
||||
void processGetDebugRespCb(const LocAPIGetDebugRespMsg* pRespMsg);
|
||||
void processAntennaInfo(const LocAPIAntennaInfoMsg* pAntennaInfoMsg);
|
||||
|
||||
// protobuf conversion util class
|
||||
LocationApiPbMsgConv mPbufMsgConv;
|
||||
|
||||
// internal session parameter
|
||||
static uint32_t mClientIdGenerator;
|
||||
static uint32_t mClientIdIndex;
|
||||
static mutex mMutex;
|
||||
uint32_t mClientId;
|
||||
uint32_t mSessionId;
|
||||
uint32_t mBatchingId;
|
||||
bool mHalRegistered;
|
||||
// For client on different processor, socket name will start with
|
||||
// defined constant of SOCKET_TO_EXTERANL_AP_LOCATION_CLIENT_BASE.
|
||||
// For client on same processor, socket name will start with
|
||||
// SOCKET_LOC_CLIENT_DIR + LOC_CLIENT_NAME_PREFIX.
|
||||
char mSocketName[MAX_SOCKET_PATHNAME_LENGTH];
|
||||
// for client on a different processor, 0 is invalid
|
||||
uint32_t mInstanceId;
|
||||
LocationCallbacksMask mCallbacksMask;
|
||||
LocationOptions mLocationOptions;
|
||||
BatchingOptions mBatchingOptions;
|
||||
LocationCapabilitiesMask mCapsMask;
|
||||
//Year of HW information, 0 is invalid
|
||||
uint16_t mYearOfHw;
|
||||
bool mPositionSessionResponseCbPending;
|
||||
uint64_t mSessionStartBootTimestampNs;
|
||||
GnssDebugReport* mpDebugReport;
|
||||
AntennaInfoCallback* mpAntennaInfoCb;
|
||||
|
||||
// callbacks
|
||||
LocationCallbacks mLocationCbs;
|
||||
|
||||
//TODO:: remove after replacing all calls with ILocationAPI callbacks
|
||||
capabilitiesCallback mCapabilitiesCb;
|
||||
PingTestCb mPingTestCb;
|
||||
|
||||
gnssEnergyConsumedCallback mGnssEnergyConsumedInfoCb;
|
||||
responseCallback mGnssEnergyConsumedResponseCb;
|
||||
|
||||
locationSystemInfoCallback mLocationSysInfoCb;
|
||||
responseCallback mLocationSysInfoResponseCb;
|
||||
|
||||
// Terrestrial fix callback
|
||||
trackingCallback mSingleTerrestrialPosCb;
|
||||
responseCallback mSingleTerrestrialPosRespCb;
|
||||
|
||||
// Single fix callback
|
||||
trackingCallback mSinglePosCb;
|
||||
responseCallback mSinglePosRespCb;
|
||||
|
||||
MsgTask mMsgTask;
|
||||
|
||||
LocIpc mIpc;
|
||||
shared_ptr<LocIpcSender> mIpcSender;
|
||||
|
||||
std::vector<uint32_t> mLastAddedClientIds;
|
||||
// clientId --> Geofence object
|
||||
std::unordered_map<uint32_t, Geofence> mGeofenceMap;
|
||||
|
||||
LCAReportLoggerUtil mLogger;
|
||||
};
|
||||
|
||||
} // namespace location_client
|
||||
|
||||
#endif /* LOCATIONCLIENTAPIIMPL_H */
|
44
qcom/opensource/location/client_api_testapp/Makefile.am
Normal file
44
qcom/opensource/location/client_api_testapp/Makefile.am
Normal file
@@ -0,0 +1,44 @@
|
||||
AM_CFLAGS = \
|
||||
-DDEBUG \
|
||||
-I./ \
|
||||
$(GPSUTILS_CFLAGS) \
|
||||
$(LOCUTILS_CFLAGS) \
|
||||
$(LOCCLIENTAPI_CFLAGS) \
|
||||
$(LOCINTEGRATIONAPI_CFLAGS) \
|
||||
-std=c++11
|
||||
# HALDAEMON is requird only for msg.h
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
AM_CPPFLAGS = -std=c++11
|
||||
|
||||
requiredlibs = \
|
||||
$(GPSUTILS_LIBS) \
|
||||
$(LOCCLIENTAPI_LIBS) \
|
||||
$(LOCINTEGRATIONAPI_LIBS)
|
||||
|
||||
h_sources =
|
||||
|
||||
c_sources = \
|
||||
main.cpp
|
||||
|
||||
location_client_api_testapp_SOURCES = \
|
||||
$(c_sources) $(h_sources)
|
||||
|
||||
######################
|
||||
# Build location_client_api_testapp
|
||||
######################
|
||||
|
||||
if USE_GLIB
|
||||
location_client_api_testapp_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
|
||||
location_client_api_testapp_LDFLAGS = -lstdc++ -g -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
|
||||
location_client_api_testapp_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
|
||||
else
|
||||
location_client_api_testapp_CFLAGS = $(AM_CFLAGS)
|
||||
location_client_api_testapp_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread -shared -version-info 1:0:0
|
||||
location_client_api_testapp_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
||||
endif
|
||||
|
||||
location_client_api_testapp_LDADD = $(requiredlibs) -lstdc++ -lc -ldl
|
||||
|
||||
bin_PROGRAMS = location_client_api_testapp
|
||||
|
100
qcom/opensource/location/client_api_testapp/configure.ac
Normal file
100
qcom/opensource/location/client_api_testapp/configure.ac
Normal file
@@ -0,0 +1,100 @@
|
||||
# configure.ac -- Autoconf script for gps location_client_api_testapp
|
||||
#
|
||||
# Process this file with autoconf to produce a configure script
|
||||
|
||||
# Requires autoconf tool later than 2.61
|
||||
AC_PREREQ(2.61)
|
||||
# Initialize the location_client_api_testapp package version 1.0.0
|
||||
AC_INIT([location_client_api_testapp],1.0.0)
|
||||
# Does not strictly follow GNU Coding standards
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
# Disables auto rebuilding of configure, Makefile.ins
|
||||
AM_MAINTAINER_MODE
|
||||
# Verifies the --srcdir is correct by checking for the path
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
# defines some macros variable to be included by source
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_LIBTOOL
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_AWK
|
||||
AC_PROG_CPP
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
# Checks for libraries.
|
||||
PKG_CHECK_MODULES([GPSUTILS], [qcom-gps-utils])
|
||||
AC_SUBST([GPSUTILS_CFLAGS])
|
||||
AC_SUBST([GPSUTILS_LIBS])
|
||||
|
||||
PKG_CHECK_MODULES([LOCCLIENTAPI], [location-client-api])
|
||||
AC_SUBST([LOCCLIENTAPI_CFLAGS])
|
||||
AC_SUBST([LOCCLIENTAPI_LIBS])
|
||||
|
||||
PKG_CHECK_MODULES([LOCINTEGRATIONAPI], [location-integration-api])
|
||||
AC_SUBST([LOCINTEGRATIONAPI_CFLAGS])
|
||||
AC_SUBST([LOCINTEGRATIONAPI_LIBS])
|
||||
|
||||
AC_ARG_WITH([external_ap],
|
||||
AC_HELP_STRING([--with-external_ap=@<:@dir@:>@],
|
||||
[Using External Application Processor]),
|
||||
[],
|
||||
with_external_ap=no)
|
||||
|
||||
if test "x$with_external_ap" != "xno"; then
|
||||
CPPFLAGS="${CPPFLAGS} -DFEATURE_EXTERNAL_AP"
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([core_includes],
|
||||
AC_HELP_STRING([--with-core-includes=@<:@dir@:>@],
|
||||
[Specify the location of the core headers]),
|
||||
[core_incdir=$withval],
|
||||
with_core_includes=no)
|
||||
|
||||
if test "x$with_core_includes" != "xno"; then
|
||||
CPPFLAGS="${CPPFLAGS} -I${core_incdir}"
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([locpla_includes],
|
||||
AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@],
|
||||
[specify the path to locpla-includes in loc-pla_git.bb]),
|
||||
[locpla_incdir=$withval],
|
||||
with_locpla_includes=no)
|
||||
|
||||
if test "x$with_locpla_includes" != "xno"; then
|
||||
AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}")
|
||||
fi
|
||||
|
||||
AC_SUBST([CPPFLAGS])
|
||||
|
||||
AC_ARG_WITH([glib],
|
||||
AC_HELP_STRING([--with-glib],
|
||||
[enable glib, building HLOS systems which use glib]))
|
||||
|
||||
if (test "x${with_glib}" = "xyes"); then
|
||||
AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib])
|
||||
PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes,
|
||||
AC_MSG_ERROR(GThread >= 2.16 is required))
|
||||
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes,
|
||||
AC_MSG_ERROR(GLib >= 2.16 is required))
|
||||
GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
|
||||
GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
|
||||
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
AC_SUBST(GLIB_LIBS)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes")
|
||||
|
||||
AC_CONFIG_FILES([ \
|
||||
Makefile \
|
||||
location_client_api_testapp.pc
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
@@ -0,0 +1,10 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: location_client_api_testapp
|
||||
Description: location_client_api_tesetapp
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -llocation_client_api
|
||||
Cflags: -I${includedir}
|
2685
qcom/opensource/location/client_api_testapp/main.cpp
Normal file
2685
qcom/opensource/location/client_api_testapp/main.cpp
Normal file
File diff suppressed because it is too large
Load Diff
33
qcom/opensource/location/gnsspps/Android.bp
Normal file
33
qcom/opensource/location/gnsspps/Android.bp
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
cc_library_shared {
|
||||
|
||||
name: "libgnsspps",
|
||||
vendor: true,
|
||||
|
||||
shared_libs: [
|
||||
"libutils",
|
||||
"libcutils",
|
||||
"libgps.utils",
|
||||
"liblog",
|
||||
],
|
||||
|
||||
srcs: ["gnsspps.c"],
|
||||
|
||||
cflags: [
|
||||
"-fno-short-enums",
|
||||
"-D_ANDROID_",
|
||||
] + GNSS_CFLAGS, //# Includes
|
||||
|
||||
header_libs: [
|
||||
"libgps.utils_headers",
|
||||
"libloc_pla_headers",
|
||||
],
|
||||
|
||||
}
|
||||
|
||||
cc_library_headers {
|
||||
|
||||
name: "libgnsspps_headers",
|
||||
export_include_dirs: ["."],
|
||||
vendor: true,
|
||||
}
|
36
qcom/opensource/location/gnsspps/Makefile.am
Normal file
36
qcom/opensource/location/gnsspps/Makefile.am
Normal file
@@ -0,0 +1,36 @@
|
||||
AM_CFLAGS = \
|
||||
$(LOCPLA_CFLAGS) \
|
||||
$(GPSUTILS_CFLAGS) \
|
||||
-I./
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
libgnsspps_la_SOURCES = \
|
||||
gnsspps.c
|
||||
|
||||
if USE_GLIB
|
||||
libgnsspps_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
|
||||
libgnsspps_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
|
||||
libgnsspps_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
|
||||
else
|
||||
libgnsspps_la_CFLAGS = $(AM_CFLAGS)
|
||||
libgnsspps_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0
|
||||
libgnsspps_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
||||
endif
|
||||
|
||||
libgnsspps_la_LIBADD = -lstdc++ $(GPSUTILS_LIBS)
|
||||
|
||||
library_include_HEADERS = \
|
||||
gnsspps.h
|
||||
|
||||
#Create and Install libraries
|
||||
lib_LTLIBRARIES = libgnsspps.la
|
||||
|
||||
library_includedir = $(pkgincludedir)
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = gnsspps.pc
|
||||
EXTRA_DIST = $(pkgconfig_DATA)
|
||||
|
||||
|
||||
|
||||
|
82
qcom/opensource/location/gnsspps/configure.ac
Normal file
82
qcom/opensource/location/gnsspps/configure.ac
Normal file
@@ -0,0 +1,82 @@
|
||||
# configure.ac -- Autoconf script for gps lbs-core
|
||||
#
|
||||
# Process this file with autoconf to produce a configure script
|
||||
|
||||
# Requires autoconf tool later than 2.61
|
||||
AC_PREREQ(2.61)
|
||||
# Initialize the gps lbs-core package version 1.0.0
|
||||
AC_INIT([gnsspps],1.0.0)
|
||||
# Does not strictly follow GNU Coding standards
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
# Disables auto rebuilding of configure, Makefile.ins
|
||||
AM_MAINTAINER_MODE
|
||||
# Verifies the --srcdir is correct by checking for the path
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
# defines some macros variable to be included by source
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_LIBTOOL
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_AWK
|
||||
AC_PROG_CPP
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
# Checks for libraries.
|
||||
PKG_CHECK_MODULES([GPSUTILS], [qcom-gps-utils])
|
||||
AC_SUBST([GPSUTILS_CFLAGS])
|
||||
AC_SUBST([GPSUTILS_LIBS])
|
||||
|
||||
AC_ARG_WITH([core_includes],
|
||||
AC_HELP_STRING([--with-core-includes=@<:@dir@:>@],
|
||||
[Specify the location of the core headers]),
|
||||
[core_incdir=$withval],
|
||||
with_core_includes=no)
|
||||
|
||||
if test "x$with_core_includes" != "xno"; then
|
||||
CPPFLAGS="${CPPFLAGS} -I${core_incdir}"
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([locpla_includes],
|
||||
AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@],
|
||||
[specify the path to locpla-includes in loc-pla_git.bb]),
|
||||
[locpla_incdir=$withval],
|
||||
with_locpla_includes=no)
|
||||
|
||||
if test "x$with_locpla_includes" != "xno"; then
|
||||
AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}")
|
||||
fi
|
||||
|
||||
AC_SUBST([CPPFLAGS])
|
||||
|
||||
AC_ARG_WITH([glib],
|
||||
AC_HELP_STRING([--with-glib],
|
||||
[enable glib, building HLOS systems which use glib]))
|
||||
|
||||
if (test "x${with_glib}" = "xyes"); then
|
||||
AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib])
|
||||
PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes,
|
||||
AC_MSG_ERROR(GThread >= 2.16 is required))
|
||||
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes,
|
||||
AC_MSG_ERROR(GLib >= 2.16 is required))
|
||||
GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
|
||||
GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
|
||||
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
AC_SUBST(GLIB_LIBS)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes")
|
||||
|
||||
AC_CONFIG_FILES([ \
|
||||
Makefile \
|
||||
gnsspps.pc
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
440
qcom/opensource/location/gnsspps/gnsspps.c
Normal file
440
qcom/opensource/location/gnsspps/gnsspps.c
Normal file
@@ -0,0 +1,440 @@
|
||||
/* Copyright (c) 2011-2015, 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 Foundatoin, 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||
|
||||
Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted (subject to the limitations in the
|
||||
disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
|
||||
*/
|
||||
|
||||
#include <log_util.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <pthread.h>
|
||||
#include <timepps.h>
|
||||
#include <linux/types.h>
|
||||
#include <stdbool.h>
|
||||
#include "loc_cfg.h"
|
||||
#include <inttypes.h>
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
|
||||
#define BILLION_NSEC (1E9)
|
||||
|
||||
typedef struct timespec pps_sync_time;
|
||||
|
||||
//DRsync kernel timestamp
|
||||
static struct timespec drsyncKernelTs = {0,0};
|
||||
//DRsync userspace timestamp
|
||||
static struct timespec drsyncUserTs = {0,0};
|
||||
|
||||
static struct timespec prevDrsyncKernelTs = {0,0};
|
||||
|
||||
//flag to stop fetching timestamp
|
||||
static int isActive = 0;
|
||||
static pthread_t threadId;
|
||||
static pps_handle handle;
|
||||
|
||||
static pthread_mutex_t ts_lock;
|
||||
static int skipPPSPulseCnt = 0;
|
||||
static int gnssOutageInSec = 1;
|
||||
static loc_param_s_type gps_conf_param_table[] =
|
||||
{
|
||||
{"IGNORE_PPS_PULSE_COUNT", &skipPPSPulseCnt, NULL, 'n'},
|
||||
{"GNSS_OUTAGE_DURATION", &gnssOutageInSec, NULL, 'n'}
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
KERNEL_REPORTED_CLOCK_BOOTTIME = 0,
|
||||
KERNEL_REPORTED_CLOCK_REALTIME,
|
||||
KERNEL_REPORTED_CLOCK_UNKNOWN = 0xfe,
|
||||
KERNEL_REPORTED_CLOCK_MAX = 0xff
|
||||
} kernel_reported_time_e;
|
||||
|
||||
/* checks the PPS source and opens it */
|
||||
int check_device(char *path, pps_handle *handle)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Try to find the source by using the supplied "path" name */
|
||||
ret = open(path, O_RDONLY);
|
||||
if (ret < 0)
|
||||
{
|
||||
LOC_LOGV("%s:%d unable to open device %s", __func__, __LINE__, path);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Open the PPS source */
|
||||
ret = pps_create(ret, handle);
|
||||
if (ret < 0)
|
||||
{
|
||||
LOC_LOGV( "%s:%d cannot create a PPS source from device %s", __func__, __LINE__, path);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* calculate the time difference between two given times in argument -
|
||||
** returns the result in timeDifference parametter*/
|
||||
static inline void calculate_time_difference(pps_sync_time time1,
|
||||
pps_sync_time time2, pps_sync_time* timeDifference)
|
||||
{
|
||||
if (time2.tv_nsec < time1.tv_nsec) {
|
||||
timeDifference->tv_sec = time2.tv_sec - 1 - time1.tv_sec;
|
||||
timeDifference->tv_nsec = BILLION_NSEC + time2.tv_nsec - time1.tv_nsec;
|
||||
} else {
|
||||
timeDifference->tv_sec = time2.tv_sec - time1.tv_sec;
|
||||
timeDifference->tv_nsec = time2.tv_nsec - time1.tv_nsec;
|
||||
}
|
||||
}
|
||||
|
||||
/*add two timespec values and return the result in third resultTime parameter*/
|
||||
static inline void pps_sync_time_add(pps_sync_time time1,
|
||||
pps_sync_time time2, pps_sync_time* resultTime)
|
||||
{
|
||||
if (time2.tv_nsec + time1.tv_nsec >= BILLION_NSEC) {
|
||||
resultTime->tv_sec = time2.tv_sec + time1.tv_sec + 1;
|
||||
resultTime->tv_nsec = time2.tv_nsec + time1.tv_nsec - BILLION_NSEC;
|
||||
} else {
|
||||
resultTime->tv_sec = time2.tv_sec + time1.tv_sec;
|
||||
resultTime->tv_nsec = time2.tv_nsec + time1.tv_nsec;
|
||||
}
|
||||
}
|
||||
|
||||
#define MAX_REALTIME_OFFSET_DELTA_DIFFERENCE 10
|
||||
#define MAX_PPS_KERNEL_TO_USERSPACE_LATENCY 100 /*in milli-second*/
|
||||
|
||||
static inline double convertTimeToMilliSec(pps_sync_time timeToConvert)
|
||||
{
|
||||
return ((double)(timeToConvert.tv_sec * 1000) + (double)(timeToConvert.tv_nsec * 0.000001));
|
||||
}
|
||||
|
||||
/*returnValue: 1 = offsetTime OK, 0 = offsetTime NOT OK*/
|
||||
static inline bool isTimeOffsetOk(pps_sync_time offsetTime)
|
||||
{
|
||||
double offsetInMillis = convertTimeToMilliSec(offsetTime);
|
||||
return (fabs(offsetInMillis) <= MAX_REALTIME_OFFSET_DELTA_DIFFERENCE)? true: false;
|
||||
}
|
||||
|
||||
/*check whether kernel PPS timestamp is a CLOCK_BOOTTIME or CLOCK_REALTIME*/
|
||||
static kernel_reported_time_e get_reported_time_type(pps_sync_time userBootTs,
|
||||
pps_sync_time userRealTs,
|
||||
pps_sync_time kernelTs)
|
||||
{
|
||||
double userRealMs, userBootMs, kernelTsMs;
|
||||
kernel_reported_time_e reportedTime = KERNEL_REPORTED_CLOCK_UNKNOWN;
|
||||
|
||||
userRealMs = convertTimeToMilliSec(userRealTs);
|
||||
userBootMs = convertTimeToMilliSec(userBootTs);
|
||||
kernelTsMs = convertTimeToMilliSec(kernelTs);
|
||||
|
||||
if(fabs(userBootMs - kernelTsMs) <= MAX_PPS_KERNEL_TO_USERSPACE_LATENCY) {
|
||||
reportedTime = KERNEL_REPORTED_CLOCK_BOOTTIME;
|
||||
} else if (fabs(userRealMs - kernelTsMs) <= MAX_PPS_KERNEL_TO_USERSPACE_LATENCY) {
|
||||
reportedTime = KERNEL_REPORTED_CLOCK_REALTIME;
|
||||
} else {
|
||||
reportedTime = KERNEL_REPORTED_CLOCK_UNKNOWN;
|
||||
}
|
||||
|
||||
LOC_LOGV("[%s] Detected PPS timestamp type (0:Boot, 1:Real, 0xfe:Unknown):0x%x",
|
||||
__func__, reportedTime);
|
||||
|
||||
return reportedTime;
|
||||
}
|
||||
|
||||
/*compute_real_to_boot_time - converts the kernel real time stamp to boot time reference*/
|
||||
static int compute_real_to_boot_time(pps_info ppsFetchTime)
|
||||
{
|
||||
int retVal = 0;
|
||||
/*Offset between REAL_TIME to BOOT_TIME*/
|
||||
static pps_sync_time time_offset = {0, 0};
|
||||
pps_sync_time drSyncUserRealTs, drSyncUserBootTs;
|
||||
pps_sync_time deltaRealToBootTime = {0, 0};
|
||||
pps_sync_time deltaOffsetTime = {0, 0};
|
||||
kernel_reported_time_e ppsTimeType;
|
||||
|
||||
retVal = clock_gettime(CLOCK_BOOTTIME,&drSyncUserBootTs);
|
||||
if (retVal != 0) {
|
||||
LOC_LOGE("[%s]Error Reading CLOCK_BOOTTIME", __func__);
|
||||
retVal = -1;
|
||||
goto exit0;
|
||||
}
|
||||
retVal = clock_gettime(CLOCK_REALTIME,&drSyncUserRealTs);
|
||||
if (retVal != 0){
|
||||
LOC_LOGE("[%s]Error Reading CLOCK_REALTIME", __func__);
|
||||
retVal = -1;
|
||||
goto exit0;
|
||||
}
|
||||
|
||||
ppsTimeType = get_reported_time_type(drSyncUserBootTs, drSyncUserRealTs, ppsFetchTime);
|
||||
|
||||
if (KERNEL_REPORTED_CLOCK_BOOTTIME == ppsTimeType) {
|
||||
|
||||
/*Store PPS kernel time*/
|
||||
drsyncKernelTs.tv_sec = ppsFetchTime.tv_sec;
|
||||
drsyncKernelTs.tv_nsec = ppsFetchTime.tv_nsec;
|
||||
/*Store User PPS fetch time*/
|
||||
drsyncUserTs.tv_sec = drSyncUserBootTs.tv_sec;
|
||||
drsyncUserTs.tv_nsec = drSyncUserBootTs.tv_nsec;
|
||||
|
||||
LOC_LOGV("[compute_real_to_boot] PPS TimeType CLOCK_BOOTTIME -- report as is");
|
||||
retVal = 0;
|
||||
} else if (KERNEL_REPORTED_CLOCK_REALTIME == ppsTimeType) {
|
||||
|
||||
/* Calculate time difference between REALTIME to BOOT_TIME*/
|
||||
calculate_time_difference(drSyncUserRealTs, drSyncUserBootTs, &deltaRealToBootTime);
|
||||
|
||||
/* Calculate the time difference between stored offset and computed one now*/
|
||||
calculate_time_difference(time_offset, deltaRealToBootTime, &deltaOffsetTime);
|
||||
|
||||
if ((0 == time_offset.tv_sec && 0 == time_offset.tv_nsec) ||
|
||||
(isTimeOffsetOk(deltaOffsetTime))) {
|
||||
/* if Time Offset does not change beyond threshold then
|
||||
** convert to boot time*/
|
||||
drsyncUserTs.tv_sec = drSyncUserBootTs.tv_sec;
|
||||
drsyncUserTs.tv_nsec = drSyncUserBootTs.tv_nsec;
|
||||
pps_sync_time_add(ppsFetchTime, deltaRealToBootTime, &drsyncKernelTs);
|
||||
retVal = 0;
|
||||
} else {
|
||||
/*The offset is too high, jump detected in realTime tick, either
|
||||
** wall clock changed by user of NTP, skip PPS, re-sync @ next tick
|
||||
*/
|
||||
LOC_LOGE("[%s] Jump detected in CLOCK_REALTIME - Offset %ld:%ld", __func__,
|
||||
deltaOffsetTime.tv_sec, deltaOffsetTime.tv_nsec);
|
||||
retVal = -1;
|
||||
}
|
||||
time_offset.tv_sec = deltaRealToBootTime.tv_sec;
|
||||
time_offset.tv_nsec = deltaRealToBootTime.tv_nsec;
|
||||
|
||||
LOC_LOGV("[compute_real_to_boot] KernelRealTs %ld:%ld ComputedTs %ld:%ld RealTs %ld:%ld BootTs %ld:%ld Offset %ld:%ld retVal %d ",
|
||||
ppsFetchTime.tv_sec, ppsFetchTime.tv_nsec,
|
||||
drsyncKernelTs.tv_sec, drsyncKernelTs.tv_nsec, drSyncUserRealTs.tv_sec,
|
||||
drSyncUserRealTs.tv_nsec, drsyncUserTs.tv_sec, drsyncUserTs.tv_nsec,
|
||||
time_offset.tv_sec, time_offset.tv_nsec, retVal);
|
||||
} else {
|
||||
LOC_LOGV("[compute_real_to_boot] PPS TimeType Unknown -- KernelTs %ld:%ld userRealTs %ld:%ld userBootTs %ld:%ld",
|
||||
ppsFetchTime.tv_sec, ppsFetchTime.tv_nsec,
|
||||
drSyncUserRealTs.tv_sec, drSyncUserRealTs.tv_nsec,
|
||||
drsyncUserTs.tv_sec, drsyncUserTs.tv_nsec);
|
||||
retVal = -1;
|
||||
}
|
||||
|
||||
exit0:
|
||||
return retVal;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* fetches the timestamp from the PPS source */
|
||||
int read_pps(pps_handle *handle)
|
||||
{
|
||||
struct timespec timeout;
|
||||
pps_info infobuf;
|
||||
int ret;
|
||||
static bool isFirstPulseReceived = false;
|
||||
static unsigned int skipPulseCnt = 0;
|
||||
// 3sec timeout
|
||||
timeout.tv_sec = 3;
|
||||
timeout.tv_nsec = 0;
|
||||
|
||||
ret = pps_fetch(*handle, PPS_TSFMT_TSPEC, &infobuf, &timeout);
|
||||
|
||||
if (ret < 0 && ret !=-EINTR)
|
||||
{
|
||||
LOC_LOGV("%s:%d pps_fetch() error %d", __func__, __LINE__, ret);
|
||||
return -1;
|
||||
}
|
||||
if (!isFirstPulseReceived && (skipPPSPulseCnt > 0)) {
|
||||
skipPulseCnt = skipPPSPulseCnt;
|
||||
isFirstPulseReceived = true;
|
||||
LOC_LOGV("%s:%d first pps pulse received %ld (sec) %ld (nsec)",
|
||||
__func__, __LINE__, infobuf.tv_sec, infobuf.tv_nsec)
|
||||
}else if (isFirstPulseReceived && (skipPPSPulseCnt > 0) &&
|
||||
((infobuf.tv_sec - prevDrsyncKernelTs.tv_sec) > gnssOutageInSec)) {
|
||||
LOC_LOGV("%s:%d long RF outage detected, ignore next %d PPS Pulses",
|
||||
__func__, __LINE__, skipPPSPulseCnt)
|
||||
skipPulseCnt = skipPPSPulseCnt;
|
||||
}
|
||||
prevDrsyncKernelTs.tv_sec = infobuf.tv_sec;
|
||||
prevDrsyncKernelTs.tv_nsec = infobuf.tv_nsec;
|
||||
/* check if this dr sync pulse need to be ignored or not*/
|
||||
if (skipPulseCnt > 0) {
|
||||
LOC_LOGV("%s:%d skip pps count %d, ignoring this pps pulse %ld (sec) %ld (nsec)",
|
||||
__func__,__LINE__, skipPulseCnt, infobuf.tv_sec, infobuf.tv_nsec);
|
||||
skipPulseCnt--;
|
||||
return 0;
|
||||
}
|
||||
/* update dr syncpulse time*/
|
||||
|
||||
pthread_mutex_lock(&ts_lock);
|
||||
|
||||
ret = compute_real_to_boot_time(infobuf);
|
||||
|
||||
pthread_mutex_unlock(&ts_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/* infinitely calls read_pps() */
|
||||
void *thread_handle(void *input)
|
||||
{
|
||||
int ret;
|
||||
if(input != NULL)
|
||||
{
|
||||
LOC_LOGV("%s:%d Thread Input is present", __func__, __LINE__);
|
||||
}
|
||||
while(isActive)
|
||||
{
|
||||
ret = read_pps(&handle);
|
||||
|
||||
if (ret == -1 && errno != ETIMEDOUT )
|
||||
{
|
||||
LOC_LOGV("%s:%d Could not fetch PPS source", __func__, __LINE__);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* opens the device and fetches from PPS source */
|
||||
int initPPS(char *devname)
|
||||
{
|
||||
int ret,pid;
|
||||
isActive = 1;
|
||||
|
||||
ret = check_device(devname, &handle);
|
||||
if (ret < 0)
|
||||
{
|
||||
LOC_LOGV("%s:%d Could not find PPS source", __func__, __LINE__);
|
||||
return 0;
|
||||
}
|
||||
UTIL_READ_CONF(LOC_PATH_GPS_CONF, gps_conf_param_table);
|
||||
pthread_mutex_init(&ts_lock, NULL);
|
||||
|
||||
pid = pthread_create(&threadId, NULL, &thread_handle, NULL);
|
||||
if(pid != 0)
|
||||
{
|
||||
LOC_LOGV("%s:%d Could not create thread in InitPPS", __func__, __LINE__);
|
||||
isActive = 0;
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* stops fetching and closes the device */
|
||||
void deInitPPS()
|
||||
{
|
||||
pthread_mutex_lock(&ts_lock);
|
||||
if (0 == isActive) {
|
||||
LOC_LOGV("%s:%d deInitPPS called before initPPS", __func__, __LINE__);
|
||||
pthread_mutex_unlock(&ts_lock);
|
||||
return;
|
||||
}
|
||||
isActive = 0;
|
||||
pthread_mutex_unlock(&ts_lock);
|
||||
|
||||
pthread_join(threadId, NULL);
|
||||
|
||||
pthread_mutex_destroy(&ts_lock);
|
||||
pps_destroy(handle);
|
||||
}
|
||||
|
||||
/* retrieves DRsync kernel timestamp,DRsync userspace timestamp
|
||||
and updates current timestamp */
|
||||
/* Returns:
|
||||
* 1. @Param out DRsync kernel timestamp
|
||||
* 2. @Param out DRsync userspace timestamp
|
||||
* 3. @Param out current timestamp
|
||||
*/
|
||||
int getPPS(struct timespec *fineKernelTs ,struct timespec *currentTs,
|
||||
struct timespec *fineUserTs)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
pthread_mutex_lock(&ts_lock);
|
||||
if (0 != isActive) {
|
||||
fineKernelTs->tv_sec = drsyncKernelTs.tv_sec;
|
||||
fineKernelTs->tv_nsec = drsyncKernelTs.tv_nsec;
|
||||
|
||||
fineUserTs->tv_sec = drsyncUserTs.tv_sec;
|
||||
fineUserTs->tv_nsec = drsyncUserTs.tv_nsec;
|
||||
|
||||
ret = clock_gettime(CLOCK_BOOTTIME,currentTs);
|
||||
} else {
|
||||
LOC_LOGV("%s:%d No active thread to read PPS - call initPPS first", __func__, __LINE__);
|
||||
}
|
||||
pthread_mutex_unlock(&ts_lock);
|
||||
if(ret != 0)
|
||||
{
|
||||
LOC_LOGV("%s:%d clock_gettime() error",__func__,__LINE__);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
45
qcom/opensource/location/gnsspps/gnsspps.h
Normal file
45
qcom/opensource/location/gnsspps/gnsspps.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/* Copyright (c) 2011-2015, 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 Foundatoin, 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 _GNSSPPS_H
|
||||
#define _GNSSPPS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* opens the device and fetches from PPS source */
|
||||
int initPPS(char *devname);
|
||||
/* updates the fine time stamp */
|
||||
int getPPS(struct timespec *current_ts, struct timespec *current_boottime, struct timespec *last_boottime);
|
||||
/* stops fetching and closes the device */
|
||||
void deInitPPS();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
10
qcom/opensource/location/gnsspps/gnsspps.pc.in
Normal file
10
qcom/opensource/location/gnsspps/gnsspps.pc.in
Normal file
@@ -0,0 +1,10 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: gnsspps
|
||||
Description: QTI GPS gnsspps
|
||||
Version: @VERSION
|
||||
Libs: -L${libdir} -lgnsspps
|
||||
Cflags: -I${includedir}/gnsspps
|
106
qcom/opensource/location/gnsspps/timepps.h
Normal file
106
qcom/opensource/location/gnsspps/timepps.h
Normal file
@@ -0,0 +1,106 @@
|
||||
/* Copyright (c) 2011-2015, 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 Foundatoin, 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.
|
||||
*/
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/pps.h>
|
||||
|
||||
#ifndef _TIMEPPS_H
|
||||
#define _TIMEPPS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/* time of assert event */
|
||||
typedef struct timespec pps_info;
|
||||
/* represents pps source */
|
||||
typedef int pps_handle;
|
||||
|
||||
/* Open the PPS source */
|
||||
static __inline int pps_create(int source, pps_handle *handle)
|
||||
{
|
||||
int ret;
|
||||
struct pps_kparams dummy;
|
||||
|
||||
if (!handle)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
/* check if current device is valid pps */
|
||||
ret = ioctl(source, PPS_GETPARAMS, &dummy);
|
||||
if (ret)
|
||||
{
|
||||
errno = EOPNOTSUPP;
|
||||
return -1;
|
||||
}
|
||||
*handle = source;
|
||||
|
||||
return 0;
|
||||
}
|
||||
/* close the pps source */
|
||||
static __inline int pps_destroy(pps_handle handle)
|
||||
{
|
||||
return close(handle);
|
||||
}
|
||||
/*reads timestamp from pps device*/
|
||||
static __inline int pps_fetch(pps_handle handle, const int tsformat,
|
||||
pps_info *ppsinfobuf,
|
||||
const struct timespec *timeout)
|
||||
{
|
||||
struct pps_fdata fdata;
|
||||
int ret;
|
||||
|
||||
if (tsformat != PPS_TSFMT_TSPEC)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (timeout)
|
||||
{
|
||||
fdata.timeout.sec = timeout->tv_sec;
|
||||
fdata.timeout.nsec = timeout->tv_nsec;
|
||||
fdata.timeout.flags = ~PPS_TIME_INVALID;
|
||||
}
|
||||
else
|
||||
{
|
||||
fdata.timeout.flags = PPS_TIME_INVALID;
|
||||
}
|
||||
ret = ioctl(handle, PPS_FETCH, &fdata);
|
||||
|
||||
ppsinfobuf->tv_sec = fdata.info.assert_tu.sec;
|
||||
ppsinfobuf->tv_nsec = fdata.info.assert_tu.nsec;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
16
qcom/opensource/location/gps_vendor_product.mk
Normal file
16
qcom/opensource/location/gps_vendor_product.mk
Normal file
@@ -0,0 +1,16 @@
|
||||
# vendor opensource packages
|
||||
ifneq ($(BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE),)
|
||||
|
||||
PRODUCT_PACKAGES += libloc_api_v02
|
||||
PRODUCT_PACKAGES += libgnsspps
|
||||
PRODUCT_PACKAGES += libsynergy_loc_api
|
||||
PRODUCT_PACKAGES += izat_remote_api_headers
|
||||
PRODUCT_PACKAGES += loc_sll_if_headers
|
||||
PRODUCT_PACKAGES += libloc_socket
|
||||
|
||||
ifneq ($(TARGET_SUPPORTS_WEARABLES),true)
|
||||
PRODUCT_PACKAGES += liblocation_api_msg
|
||||
PRODUCT_PACKAGES += liblocation_integration_api
|
||||
PRODUCT_PACKAGES += liblocation_client_api
|
||||
endif
|
||||
endif#BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE
|
49
qcom/opensource/location/integration_api/Android.bp
Normal file
49
qcom/opensource/location/integration_api/Android.bp
Normal file
@@ -0,0 +1,49 @@
|
||||
|
||||
cc_library_shared {
|
||||
|
||||
name: "liblocation_integration_api",
|
||||
vendor: true,
|
||||
|
||||
//# Libs
|
||||
shared_libs: [
|
||||
"libgps.utils",
|
||||
"liblocation_api_msg",
|
||||
"libprotobuf-cpp-lite",
|
||||
"liblog",
|
||||
],
|
||||
|
||||
srcs: [
|
||||
"src/LocationIntegrationApi.cpp",
|
||||
"src/LocationIntegrationApiImpl.cpp",
|
||||
],
|
||||
|
||||
cflags: [
|
||||
"-fno-short-enums",
|
||||
"-D_ANDROID_",
|
||||
"-Wno-error=non-virtual-dtor",
|
||||
] + GNSS_CFLAGS,
|
||||
|
||||
local_include_dirs: [
|
||||
"inc",
|
||||
"src",
|
||||
],
|
||||
|
||||
//# Includes
|
||||
ldflags: ["-Wl,--export-dynamic"],
|
||||
|
||||
header_libs: [
|
||||
"libutils_headers",
|
||||
"libgps.utils_headers",
|
||||
"libloc_pla_headers",
|
||||
"liblocation_api_headers",
|
||||
"liblocation_api_msg.headers",
|
||||
"liblocation_client_api.impl_headers",
|
||||
],
|
||||
}
|
||||
|
||||
cc_library_headers {
|
||||
|
||||
name: "libloc_integration_api.impl_headers",
|
||||
export_include_dirs: ["src"] + ["inc"],
|
||||
vendor: true,
|
||||
}
|
File diff suppressed because it is too large
Load Diff
59
qcom/opensource/location/integration_api/Makefile.am
Normal file
59
qcom/opensource/location/integration_api/Makefile.am
Normal file
@@ -0,0 +1,59 @@
|
||||
AM_CFLAGS = \
|
||||
-DDEBUG \
|
||||
-I src/ \
|
||||
-I inc/ \
|
||||
$(GPSUTILS_CFLAGS) \
|
||||
$(LOCAPIMSGPROTO_CFLAGS) \
|
||||
-std=c++11
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
AM_CPPFLAGS = -std=c++11
|
||||
|
||||
requiredlibs = \
|
||||
$(GPSUTILS_LIBS) \
|
||||
$(LOCAPIMSGPROTO_LIBS) \
|
||||
-lprotobuf-lite
|
||||
|
||||
h_sources = \
|
||||
src/LocationIntegrationApiImpl.h \
|
||||
inc/LocationIntegrationApi.h \
|
||||
src/LocationIntegrationApiDiagLog.h
|
||||
|
||||
c_sources = \
|
||||
src/LocationIntegrationApiImpl.cpp \
|
||||
src/LocationIntegrationApi.cpp \
|
||||
src/LocationIntegrationApiDiagLog.cpp
|
||||
|
||||
liblocation_integration_api_la_SOURCES = \
|
||||
$(c_sources) $(h_sources)
|
||||
liblocation_integration_api_la_h_sources = $(h_sources)
|
||||
|
||||
######################
|
||||
# Build location_integration_api
|
||||
######################
|
||||
|
||||
if USE_EXTERNAL_AP
|
||||
AM_CFLAGS += $(LOCSOCKET_CFLAGS) -DFEATURE_EXTERNAL_AP
|
||||
requiredlibs += $(LOCSOCKET_LIBS)
|
||||
endif
|
||||
|
||||
if USE_GLIB
|
||||
liblocation_integration_api_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
|
||||
liblocation_integration_api_la_LDFLAGS = -lstdc++ -g -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0
|
||||
liblocation_integration_api_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
|
||||
else
|
||||
liblocation_integration_api_la_CFLAGS = $(AM_CFLAGS)
|
||||
liblocation_integration_api_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread -shared -version-info 1:0:0
|
||||
liblocation_integration_api_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
||||
endif
|
||||
|
||||
liblocation_integration_api_la_LIBADD = $(requiredlibs) -lstdc++ -ldl
|
||||
|
||||
#Create and Install libraries
|
||||
library_include_HEADERS = $(h_sources)
|
||||
lib_LTLIBRARIES = liblocation_integration_api.la
|
||||
|
||||
library_includedir = $(pkgincludedir)
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = location-integration-api.pc
|
||||
EXTRA_DIST = $(pkgconfig_DATA)
|
11
qcom/opensource/location/integration_api/README
Normal file
11
qcom/opensource/location/integration_api/README
Normal file
@@ -0,0 +1,11 @@
|
||||
Location Client Api doc
|
||||
|
||||
1. Steps to generate doxygen Api doc:
|
||||
run
|
||||
mkclientapidoc.sh [output-path]
|
||||
default output-path is docs/
|
||||
default doxgen configuration file is LocationClientApiDoxygen.conf
|
||||
|
||||
2. below file will be generated:
|
||||
html/
|
||||
-HTML output, where the html/index.html is the home page.
|
93
qcom/opensource/location/integration_api/configure.ac
Normal file
93
qcom/opensource/location/integration_api/configure.ac
Normal file
@@ -0,0 +1,93 @@
|
||||
# configure.ac -- Autoconf script for gps location-integration-api
|
||||
#
|
||||
# Process this file with autoconf to produce a configure script
|
||||
|
||||
# Requires autoconf tool later than 2.61
|
||||
AC_PREREQ(2.61)
|
||||
# Initialize the location_integration_api package version 1.0.0
|
||||
AC_INIT([location-integration-api],1.0.0)
|
||||
# Does not strictly follow GNU Coding standards
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
# Disables auto rebuilding of configure, Makefile.ins
|
||||
AM_MAINTAINER_MODE
|
||||
# Verifies the --srcdir is correct by checking for the path
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
# defines some macros variable to be included by source
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_LIBTOOL
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_AWK
|
||||
AC_PROG_CPP
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
# Checks for libraries.
|
||||
PKG_CHECK_MODULES([GPSUTILS], [qcom-gps-utils])
|
||||
AC_SUBST([GPSUTILS_CFLAGS])
|
||||
AC_SUBST([GPSUTILS_LIBS])
|
||||
|
||||
PKG_CHECK_MODULES([LOCAPIMSGPROTO], [location-api-msg-proto])
|
||||
AC_SUBST([LOCAPIMSGPROTO_CFLAGS])
|
||||
AC_SUBST([LOCAPIMSGPROTO_LIBS])
|
||||
|
||||
AC_ARG_WITH([external_ap],
|
||||
AC_HELP_STRING([--with-external_ap=@<:@dir@:>@],
|
||||
[Using External Application Processor]),
|
||||
[],
|
||||
with_external_ap=no)
|
||||
|
||||
AM_CONDITIONAL(USE_EXTERNAL_AP, test "x${with_external_ap}" = "xyes")
|
||||
|
||||
AC_ARG_WITH([glib],
|
||||
AC_HELP_STRING([--with-glib],
|
||||
[enable glib, building HLOS systems which use glib]))
|
||||
|
||||
if (test "x${with_glib}" = "xyes"); then
|
||||
AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib])
|
||||
PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes,
|
||||
AC_MSG_ERROR(GThread >= 2.16 is required))
|
||||
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes,
|
||||
AC_MSG_ERROR(GLib >= 2.16 is required))
|
||||
GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
|
||||
GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
|
||||
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
AC_SUBST(GLIB_LIBS)
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes")
|
||||
|
||||
AC_ARG_WITH([core_includes],
|
||||
AC_HELP_STRING([--with-core-includes=@<:@dir@:>@],
|
||||
[Specify the location of the core headers]),
|
||||
[core_incdir=$withval],
|
||||
with_core_includes=no)
|
||||
|
||||
if (test "x$with_core_includes" != "xno"); then
|
||||
CPPFLAGS="${CPPFLAGS} -I${core_incdir}"
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([locpla_includes],
|
||||
AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@],
|
||||
[specify the path to locpla-includes in loc-pla_git.bb]),
|
||||
[locpla_incdir=$withval],
|
||||
with_locpla_includes=no)
|
||||
|
||||
if test "x$with_locpla_includes" != "xno"; then
|
||||
AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}")
|
||||
fi
|
||||
|
||||
|
||||
AC_CONFIG_FILES([ \
|
||||
Makefile \
|
||||
location-integration-api.pc
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,38 @@
|
||||
/* Copyright (c) 2019 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.
|
||||
*/
|
||||
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: location-integration-api
|
||||
Description: location integration api library
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -llocation_integration_api
|
||||
Cflags: -I${includedir} -I${includedir}/location-integration-api
|
@@ -0,0 +1,86 @@
|
||||
#!/bin/bash
|
||||
#==========================================================================
|
||||
#Copyright (c) 2018-2019, 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.
|
||||
#
|
||||
#==========================================================================
|
||||
|
||||
#==========================================================================
|
||||
#
|
||||
# Usage:
|
||||
# mkintegrationapidoc.sh [output-path]
|
||||
#
|
||||
# Note, this script requires the existence of the doxygen tool -
|
||||
# This script can be called from any directory
|
||||
#==========================================================================
|
||||
|
||||
DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||
# the default doxygen configuration is LocationIntegrationApiDoxygen.conf
|
||||
CONFIG=$DIR/LocationIntegrationApiDoxygen.conf
|
||||
OUT="docs"
|
||||
|
||||
# Show help message if requested, otherwise create output folder
|
||||
if [ -n "$1" ]
|
||||
then
|
||||
if [ "$1" == "-h" ] || [ "$1" == "--help" ]
|
||||
then
|
||||
echo "$0 [output-path]"
|
||||
echo " e.g. $0"
|
||||
echo " $0 docs"
|
||||
exit
|
||||
else
|
||||
OUT=$1
|
||||
if [ ! -d $OUT ]
|
||||
then
|
||||
mkdir -p $OUT
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
which doxygen
|
||||
if [ "$?" == 0 ]
|
||||
then
|
||||
# Use ? here to seperate patterns as / in path will be regarded as splitter by default
|
||||
sed -i "s?^OUTPUT_DIRECTORY .*?OUTPUT_DIRECTORY = $OUT?" $CONFIG
|
||||
sed -i "s?^INPUT .*?INPUT = $DIR/inc?" $CONFIG
|
||||
doxygen $CONFIG > /dev/null 2>&1
|
||||
else
|
||||
echo "This script requires doxygen tool be to installed. "
|
||||
echo "You can install is with e.g. sudo apt-get install doxygen"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -e $OUT/html/index.html ]
|
||||
then
|
||||
echo "Error building Location Client Api doc files."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "doxygen docs for Location Client Api available at: $OUT/html"
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
|
||||
#include "LocationIntegrationApiDiagLog.h"
|
||||
#include <log_util.h>
|
||||
|
||||
namespace location_integration {
|
||||
|
||||
void LocationIntegrationApiDiagLog::fillDiagMmfDataInfo(diagMapMatchedFeedbackData* out,
|
||||
const mapMatchedFeedbackData& inMmfData) {
|
||||
if (LOC_HAS_VALID_MMFD_UTC_TIME & inMmfData.validityMask) {
|
||||
out->validityMask |= DIAG_MMF_VALID_UTC_TIME;
|
||||
out->utcTimestampMs = inMmfData.utcTimestampMs;
|
||||
}
|
||||
if (LOC_HAS_VALID_MMFD_LAT_DIFF & inMmfData.validityMask) {
|
||||
out->validityMask |= DIAG_MMF_VALID_LAT_DIFF;
|
||||
out->mapMatchedLatitudeDifference = inMmfData.mapMatchedLatitudeDifference;
|
||||
}
|
||||
if (LOC_HAS_VALID_MMFD_LONG_DIFF & inMmfData.validityMask) {
|
||||
out->validityMask |= DIAG_MMF_VALID_LONG_DIFF;
|
||||
out->mapMatchedLongitudeDifference = inMmfData.mapMatchedLongitudeDifference;
|
||||
}
|
||||
if (LOC_HAS_VALID_MMFD_TUNNEL & inMmfData.validityMask) {
|
||||
out->validityMask |= DIAG_MMF_VALID_TUNNEL;
|
||||
out->isTunnel = inMmfData.isTunnel;
|
||||
}
|
||||
if (LOC_HAS_VALID_MMFD_BEARING & inMmfData.validityMask) {
|
||||
out->validityMask |= DIAG_MMF_VALID_BEARING;
|
||||
out->bearing = inMmfData.bearing;
|
||||
}
|
||||
if (LOC_HAS_VALID_MMFD_ALTITUDE & inMmfData.validityMask) {
|
||||
out->validityMask |= DIAG_MMF_VALID_ALTITUDE;
|
||||
out->altitude = inMmfData.altitude;
|
||||
}
|
||||
if (LOC_HAS_VALID_MMFD_HOR_ACC & inMmfData.validityMask) {
|
||||
out->validityMask |= DIAG_MMF_VALID_HOR_ACC;
|
||||
out->horizontalAccuracy = inMmfData.horizontalAccuracy;
|
||||
}
|
||||
if (LOC_HAS_VALID_MMFD_ALT_ACC & inMmfData.validityMask) {
|
||||
out->validityMask |= DIAG_MMF_VALID_ALT_ACC;
|
||||
out->altitudeAccuracy = inMmfData.altitudeAccuracy;
|
||||
}
|
||||
if (LOC_HAS_VALID_MMFD_BEARING_ACC & inMmfData.validityMask) {
|
||||
out->validityMask |= DIAG_MMF_VALID_BEARING_ACC;
|
||||
out->bearingAccuracy = inMmfData.bearingAccuracy;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LocationIntegrationApiDiagLog::diagLogMmfData(const mapMatchedFeedbackData& inMmfData) {
|
||||
if (mDiagIface) {
|
||||
size_t size = 0;
|
||||
diagMapMatchedFeedbackData* mmfDataInfo = NULL;
|
||||
diagBuffSrc bufferSrc;
|
||||
size = sizeof(diagMapMatchedFeedbackData);
|
||||
mmfDataInfo = (diagMapMatchedFeedbackData*)mDiagIface->logAlloc(
|
||||
LOG_GNSS_LIA_API_MMF_REPORT_C, size, &bufferSrc);
|
||||
if (mmfDataInfo) {
|
||||
mmfDataInfo->version = LOG_CLIENT_MMF_DIAG_MSG_VERSION;
|
||||
fillDiagMmfDataInfo(mmfDataInfo, inMmfData);
|
||||
mDiagIface->logCommit(mmfDataInfo, bufferSrc,
|
||||
LOG_GNSS_LIA_API_MMF_REPORT_C,
|
||||
sizeof(diagMapMatchedFeedbackData));
|
||||
} else {
|
||||
LOC_LOGe(" Failed to allocate buffer for MMF data !! ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
LocationIntegrationApiDiagLog::LocationIntegrationApiDiagLog() {
|
||||
if (NULL == mDiagIface) {
|
||||
mDiagIface = loadLocDiagIfaceInterface();
|
||||
if (nullptr == mDiagIface) {
|
||||
LOC_LOGe("Failed to loadLocDiagIfaceInterface!!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LocationIntegrationApiDiagLog::~LocationIntegrationApiDiagLog() {
|
||||
|
||||
}
|
||||
} // namespace location_integration {
|
@@ -0,0 +1,147 @@
|
||||
/*
|
||||
Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
|
||||
#ifndef LOCATION_INTEGRATION_API_DIAG_LOG_H
|
||||
#define LOCATION_INTEGRATION_API_DIAG_LOG_H
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "LocationIntegrationApi.h"
|
||||
#include "LocDiagIfaceApi.h"
|
||||
|
||||
/** Packet Versions */
|
||||
#define LOG_CLIENT_MMF_DIAG_MSG_VERSION (0)
|
||||
|
||||
/** Packet Log Codes */
|
||||
#ifndef LOG_GNSS_LIA_API_MMF_REPORT_C
|
||||
#define LOG_GNSS_LIA_API_MMF_REPORT_C (0x1E78)
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
#define PACKED
|
||||
#define PACKED_POST __attribute__((__packed__))
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) || defined(USE_GLIB) || defined(__ANDROID__)
|
||||
#define TYPEDEF_PACKED_STRUCT typedef PACKED struct PACKED_POST
|
||||
#else
|
||||
#define TYPEDEF_PACKED_STRUCT typedef struct
|
||||
#endif
|
||||
|
||||
#ifndef __LOG_HDR_TYPE__
|
||||
#define __LOG_HDR_TYPE__
|
||||
typedef struct PACKED_POST {
|
||||
uint16_t len; /* Specifies the length, in bytes of the
|
||||
entry, including this header. */
|
||||
|
||||
uint16_t code; /* Specifies the log code for the entry as
|
||||
enumerated above. Note: This is
|
||||
specified as word to guarantee size. */
|
||||
/*upper 48 bits represent elapsed time since
|
||||
6 Jan 1980 00:00:00 in 1.25 ms units. The
|
||||
low order 16 bits represent elapsed time
|
||||
since the last 1.25 ms tick in 1/32 chip
|
||||
units (this 16 bit counter wraps at the
|
||||
value 49152). */
|
||||
uint32_t ts_lo; /* Time stamp */
|
||||
uint32_t ts_hi;
|
||||
} log_hdr_type;
|
||||
#endif
|
||||
|
||||
enum diagMmfDataValidity {
|
||||
|
||||
DIAG_MMF_VALID_UTC_TIME = (1<<0),
|
||||
DIAG_MMF_VALID_LAT_DIFF = (1<<1),
|
||||
DIAG_MMF_VALID_LONG_DIFF = (1<<2),
|
||||
DIAG_MMF_VALID_TUNNEL = (1<<3),
|
||||
DIAG_MMF_VALID_BEARING = (1<<4),
|
||||
DIAG_MMF_VALID_ALTITUDE = (1<<5),
|
||||
DIAG_MMF_VALID_HOR_ACC = (1<<6),
|
||||
DIAG_MMF_VALID_ALT_ACC = (1<<7),
|
||||
DIAG_MMF_VALID_BEARING_ACC = (1<<8),
|
||||
};
|
||||
|
||||
typedef PACKED struct PACKED_POST {
|
||||
/** Used by Logging Module
|
||||
* Mandatory field */
|
||||
log_hdr_type logHeader;
|
||||
/** clientDiag Message Version
|
||||
* Mandatory field */
|
||||
uint8_t version;
|
||||
/** Validity fields for MMF data fields to follow
|
||||
* Flags defined uisng enum mmfDataValidity */
|
||||
uint64_t validityMask;
|
||||
|
||||
/** Unix epoch time of the location fix for which map-match
|
||||
* feedback is being sent, since the start of the Unix epoch
|
||||
* (00:00:00 January 1, 1970 UTC).
|
||||
* Unit: Milli-seconds */
|
||||
uint64_t utcTimestampMs;
|
||||
|
||||
/** Latitude difference = map matched latitude - reported latitude
|
||||
* Unit: Degrees
|
||||
* Range: [-90.0, 90.0] */
|
||||
double mapMatchedLatitudeDifference;
|
||||
|
||||
/** Longitude difference = map matched longitude - reported longitude
|
||||
* Unit: Degrees
|
||||
* Range: [-180.0, 180.0] */
|
||||
double mapMatchedLongitudeDifference;
|
||||
|
||||
/** Bearing: The horizontal direction of travel of the device with
|
||||
* respect to north and is unrelated to the device orientation.
|
||||
* Unit: Degrees
|
||||
* range: [0, 360) */
|
||||
float bearing;
|
||||
|
||||
/** Absolute Altitude above the WGS 84 reference ellipsoid
|
||||
Unit: meters */
|
||||
double altitude;
|
||||
|
||||
/** Horizontal accuracy radius defined with the
|
||||
* 68th percentile confidence level.
|
||||
* Unit: meter
|
||||
* Range: 0 or greater */
|
||||
float horizontalAccuracy;
|
||||
|
||||
/** Altitude accuracy. Defined with 68% confidence level.
|
||||
* Unit:meter
|
||||
* Range: 0 or greater */
|
||||
float altitudeAccuracy;
|
||||
|
||||
/** Estimated bearing accuracy defined with
|
||||
* 68 percentile confidence level (1 sigma).
|
||||
* Unit: Degrees
|
||||
* Range [0, 360) */
|
||||
float bearingAccuracy;
|
||||
|
||||
/** Road Type. Decision to use the MMF data depends on isTunnel
|
||||
* Value: True or False */
|
||||
bool isTunnel;
|
||||
|
||||
} diagMapMatchedFeedbackData;
|
||||
|
||||
namespace location_integration {
|
||||
|
||||
class LocationIntegrationApiDiagLog {
|
||||
|
||||
private:
|
||||
// Loc-diag-iface handle
|
||||
LocDiagInterface *mDiagIface = NULL;
|
||||
|
||||
/** Convert MMF Data from LIA to Diag structure */
|
||||
void fillDiagMmfDataInfo(diagMapMatchedFeedbackData* out,
|
||||
const mapMatchedFeedbackData& inMmfData);
|
||||
|
||||
public:
|
||||
LocationIntegrationApiDiagLog();
|
||||
~LocationIntegrationApiDiagLog();
|
||||
|
||||
void diagLogMmfData(const mapMatchedFeedbackData& inMmfData);
|
||||
|
||||
};
|
||||
} // namespace location_integration
|
||||
|
||||
#endif // LOCATION_INTEGRATION_API_DIAG_LOG_H
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,264 @@
|
||||
/* Copyright (c) 2019-2021 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||
|
||||
Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted (subject to the limitations in the
|
||||
disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER 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 LOCATION_INTEGRATION_API_IMPL_H
|
||||
#define LOCATION_INTEGRATION_API_IMPL_H
|
||||
|
||||
#include <mutex>
|
||||
|
||||
#include <loc_pla.h>
|
||||
#include <LocIpc.h>
|
||||
#include <ILocationAPI.h>
|
||||
#include <LocationIntegrationApi.h>
|
||||
#include <MsgTask.h>
|
||||
#include <LocationApiMsg.h>
|
||||
#include <LocationApiPbMsgConv.h>
|
||||
#include <queue>
|
||||
#include <unordered_map>
|
||||
|
||||
using namespace std;
|
||||
using namespace loc_util;
|
||||
using namespace location_integration;
|
||||
|
||||
namespace location_integration
|
||||
{
|
||||
typedef std::unordered_map<LocConfigTypeEnum, int32_t> LocConfigReqCntMap;
|
||||
typedef std::unordered_map<PositioningEngineMask, LocEngineRunState> LocConfigEngRunStateMap;
|
||||
typedef std::unordered_map<PositioningEngineMask, uint32_t> LocConfigEngIntegrityRiskMap;
|
||||
|
||||
struct TuncConfigInfo{
|
||||
bool isValid;
|
||||
bool enable;
|
||||
float tuncThresholdMs; // need to be specified if enable is true
|
||||
uint32_t energyBudget; // need to be specified if enable is true
|
||||
};
|
||||
|
||||
struct PaceConfigInfo{
|
||||
bool isValid;
|
||||
bool enable;
|
||||
};
|
||||
|
||||
struct SvConfigInfo{
|
||||
bool isValid;
|
||||
GnssSvTypeConfig constellationEnablementConfig;
|
||||
GnssSvIdConfig blacklistSvConfig;
|
||||
GnssSvTypeConfig secondaryBandConfig;
|
||||
};
|
||||
|
||||
struct RobustLocationConfigInfo{
|
||||
bool isValid;
|
||||
bool enable;
|
||||
bool enableForE911;
|
||||
};
|
||||
|
||||
struct DeadReckoningEngineConfigInfo{
|
||||
bool isValid;
|
||||
::DeadReckoningEngineConfig dreConfig;
|
||||
};
|
||||
|
||||
struct GtpUserConsentConfigInfo{
|
||||
bool isValid;
|
||||
bool userConsent;
|
||||
};
|
||||
|
||||
struct NmeaConfigInfo{
|
||||
bool isValid;
|
||||
GnssNmeaTypesMask enabledNmeaTypes;
|
||||
GnssGeodeticDatumType nmeaDatumType;
|
||||
LocReqEngineTypeMask locReqEngMask;
|
||||
};
|
||||
|
||||
struct ProtoMsgInfo{
|
||||
LocConfigTypeEnum configType;
|
||||
string protoStr;
|
||||
|
||||
inline ProtoMsgInfo() :
|
||||
configType((LocConfigTypeEnum) 0), protoStr("") {}
|
||||
inline ProtoMsgInfo(LocConfigTypeEnum inType, string inStr) :
|
||||
configType(inType), protoStr(std::move(inStr)) {}
|
||||
};
|
||||
|
||||
class IpcListener;
|
||||
|
||||
class LocationIntegrationApiImpl : public ILocationControlAPI {
|
||||
friend IpcListener;
|
||||
public:
|
||||
LocationIntegrationApiImpl(LocIntegrationCbs& integrationCbs);
|
||||
|
||||
virtual void destroy() override;
|
||||
|
||||
// convenient methods
|
||||
inline bool sendMessage(const uint8_t* data, uint32_t length) const {
|
||||
return (mIpcSender != nullptr) && LocIpc::send(*mIpcSender, data, length);
|
||||
}
|
||||
|
||||
// reset to defaut will apply to enable/disable SV constellation and
|
||||
// blacklist/unblacklist SVs
|
||||
virtual uint32_t configConstellations(
|
||||
const GnssSvTypeConfig& constellationEnablementConfig,
|
||||
const GnssSvIdConfig& blacklistSvConfig) override;
|
||||
virtual uint32_t configConstellationSecondaryBand(
|
||||
const GnssSvTypeConfig& secondaryBandConfig) override;
|
||||
virtual uint32_t configConstrainedTimeUncertainty(
|
||||
bool enable, float tuncThreshold, uint32_t energyBudget) override;
|
||||
virtual uint32_t configPositionAssistedClockEstimator(bool enable) override;
|
||||
virtual uint32_t configLeverArm(const LeverArmConfigInfo& configInfo) override;
|
||||
virtual uint32_t configRobustLocation(bool enable, bool enableForE911) override;
|
||||
virtual uint32_t configDeadReckoningEngineParams(
|
||||
const ::DeadReckoningEngineConfig& dreConfig) override;
|
||||
virtual uint32_t* gnssUpdateConfig(const GnssConfig& config) override;
|
||||
virtual uint32_t gnssDeleteAidingData(const GnssAidingData& data) override;
|
||||
virtual uint32_t configMinGpsWeek(uint16_t minGpsWeek) override;
|
||||
virtual void odcpiInject(const ::Location& location) override;
|
||||
virtual uint32_t gnssInjectMmfData(const GnssMapMatchedData& mmfData) override;
|
||||
|
||||
uint32_t getRobustLocationConfig();
|
||||
uint32_t getMinGpsWeek();
|
||||
|
||||
uint32_t configMinSvElevation(uint8_t minSvElevation);
|
||||
uint32_t getMinSvElevation();
|
||||
|
||||
uint32_t getConstellationSecondaryBandConfig();
|
||||
|
||||
uint32_t configEngineRunState(PositioningEngineMask engType, LocEngineRunState engState);
|
||||
uint32_t configEngineIntegrityRisk(PositioningEngineMask engType, uint32_t integrityRisk);
|
||||
|
||||
uint32_t setUserConsentForTerrestrialPositioning(bool userConsent);
|
||||
|
||||
uint32_t configOutputNmeaTypes(GnssNmeaTypesMask enabledNmeaTypes,
|
||||
GnssGeodeticDatumType nmeaDatumType,
|
||||
LocReqEngineTypeMask locReqEngMask) override;
|
||||
|
||||
uint32_t configXtraParams(bool enable, const ::XtraConfigParams& configParams);
|
||||
uint32_t getXtraStatus();
|
||||
uint32_t registerXtraStatusUpdate(bool registerUpdate);
|
||||
uint32_t configMerkleTree(const char * merkleTreeXml, int xmlSize);
|
||||
uint32_t configOsnmaEnablement(bool isEnabled);
|
||||
uint32_t registerGnssSignalTypesUpdate(bool registerUpdate);
|
||||
|
||||
private:
|
||||
~LocationIntegrationApiImpl();
|
||||
bool integrationClientAllowed();
|
||||
bool sendConfigMsgToHalDaemon(LocConfigTypeEnum configType, const string& pbStr,
|
||||
bool invokeResponseCb = true);
|
||||
bool sendClientRegMsgToHalDaemon();
|
||||
void processHalReadyMsg();
|
||||
|
||||
void addConfigReq(LocConfigTypeEnum configType);
|
||||
bool processQueuedReqs(); // return true indicates queue is note empty
|
||||
void flushConfigReqs();
|
||||
void processConfigRespCb(const LocAPIGenericRespMsg* pRespMsg);
|
||||
void processGetRobustLocationConfigRespCb(
|
||||
const LocConfigGetRobustLocationConfigRespMsg* pRespMsg);
|
||||
void processGetMinGpsWeekRespCb(const LocConfigGetMinGpsWeekRespMsg* pRespMsg);
|
||||
void processGetMinSvElevationRespCb(const LocConfigGetMinSvElevationRespMsg* pRespMsg);
|
||||
void processGetConstellationSecondaryBandConfigRespCb(
|
||||
const LocConfigGetConstellationSecondaryBandConfigRespMsg* pRespMsg);
|
||||
void processGetXtraStatusRespCb(
|
||||
const LocConfigGetXtraStatusRespMsg* pRespMsg);
|
||||
void processRegisterGnssSignalTypesRespCb(
|
||||
const LocConfigRegisterGnssSignalTypesUpdateRespMsg* msg);
|
||||
|
||||
// protobuf conversion util class
|
||||
LocationApiPbMsgConv mPbufMsgConv;
|
||||
|
||||
// internal session parameter
|
||||
static mutex mMutex;
|
||||
static bool mClientRunning; // allow singleton int client
|
||||
bool mHalRegistered;
|
||||
// For client on different processor, socket name will start with
|
||||
// defined constant of SOCKET_TO_EXTERANL_AP_LOCATION_CLIENT_BASE.
|
||||
// For client on same processor, socket name will start with
|
||||
// SOCKET_LOC_CLIENT_DIR + LOC_INTAPI_NAME_PREFIX.
|
||||
char mSocketName[MAX_SOCKET_PATHNAME_LENGTH];
|
||||
|
||||
// cached configuration to be used when hal daemon crashes
|
||||
// and restarts
|
||||
TuncConfigInfo mTuncConfigInfo;
|
||||
PaceConfigInfo mPaceConfigInfo;
|
||||
SvConfigInfo mSvConfigInfo;
|
||||
LeverArmConfigInfo mLeverArmConfigInfo;
|
||||
RobustLocationConfigInfo mRobustLocationConfigInfo;
|
||||
DeadReckoningEngineConfigInfo mDreConfigInfo;
|
||||
LocConfigEngRunStateMap mEngRunStateConfigMap;
|
||||
LocConfigEngIntegrityRiskMap mEngIntegrityRiskConfigMap;
|
||||
GtpUserConsentConfigInfo mGtpUserConsentConfigInfo;
|
||||
NmeaConfigInfo mNmeaConfigInfo;
|
||||
bool mRegisterXtraUpdate;
|
||||
bool mXtraUpdateUponRegisterPending;
|
||||
LocConfigReqCntMap mConfigReqCntMap;
|
||||
LocIntegrationCbs mIntegrationCbs;
|
||||
std::queue<ProtoMsgInfo> mQueuedMsg; // queue of the requests before
|
||||
// communication with hal daemom
|
||||
// is established
|
||||
|
||||
LocIpc mIpc;
|
||||
shared_ptr<LocIpcSender> mIpcSender;
|
||||
|
||||
MsgTask mMsgTask;
|
||||
};
|
||||
|
||||
} // namespace location_client
|
||||
|
||||
#endif /* LOCATION_INTEGRATION_API_IMPL_H */
|
7
qcom/opensource/location/izat_api/Android.bp
Normal file
7
qcom/opensource/location/izat_api/Android.bp
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
cc_library_headers {
|
||||
|
||||
name: "izat_remote_api_headers",
|
||||
vendor: true,
|
||||
export_include_dirs: ["."],
|
||||
}
|
66
qcom/opensource/location/izat_api/IzatRemoteApi.h
Normal file
66
qcom/opensource/location/izat_api/IzatRemoteApi.h
Normal file
@@ -0,0 +1,66 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2016, 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.
|
||||
|
||||
=============================================================================
|
||||
|
||||
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||
Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
|
||||
=============================================================================*/
|
||||
|
||||
#ifndef __IZATREMOTEAPIS_H__
|
||||
#define __IZATREMOTEAPIS_H__
|
||||
|
||||
#include <izat_remote_api.h>
|
||||
#include <string>
|
||||
#include <stdio.h>
|
||||
namespace qc_loc_fw {
|
||||
class InPostcard;
|
||||
}
|
||||
|
||||
namespace izat_remote_api {
|
||||
|
||||
class IzatNotifierProxy;
|
||||
|
||||
struct OutCard;
|
||||
|
||||
class IzatNotifier {
|
||||
protected:
|
||||
IzatNotifierProxy* const mNotifierProxy;
|
||||
IzatNotifier(const char* const tag, const OutCard* subCard);
|
||||
virtual ~IzatNotifier();
|
||||
void registerSelf();
|
||||
public:
|
||||
virtual void handleMsg(qc_loc_fw::InPostcard * const in_card) = 0;
|
||||
};
|
||||
|
||||
} // izat_remote_api
|
||||
|
||||
#endif //__IZATREMOTEAPIS_H__
|
||||
|
91
qcom/opensource/location/izat_api/izat_remote_api.h
Normal file
91
qcom/opensource/location/izat_api/izat_remote_api.h
Normal file
@@ -0,0 +1,91 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2016, 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.
|
||||
|
||||
=============================================================================
|
||||
|
||||
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||
Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
|
||||
=============================================================================*/
|
||||
|
||||
/*
|
||||
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||
Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
SPDX-License-Identifier: BSD-3-Clause-Clear
|
||||
*/
|
||||
|
||||
#ifndef __IZAT_REMOTE_APIS_H__
|
||||
#define __IZAT_REMOTE_APIS_H__
|
||||
|
||||
#include <gps_extended.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*locationUpdateCb)(UlpLocation *location,
|
||||
GpsLocationExtended *locExtended,
|
||||
void* clientData);
|
||||
|
||||
typedef void (*svRptUpdateCb)(GnssSvNotification *svNotify,
|
||||
void* clientData);
|
||||
|
||||
typedef void (*nmeaUpdateCb)(UlpNmea *nmea, void* clientData);
|
||||
|
||||
typedef struct {
|
||||
|
||||
locationUpdateCb locCb;
|
||||
svRptUpdateCb svReportCb;
|
||||
nmeaUpdateCb nmeaCb;
|
||||
|
||||
}remoteClientInfo;
|
||||
/* registers a client callback structure for listening to final location updates
|
||||
pClientInfo - pointer to remoteClientInfo structure
|
||||
Can not be NULL.
|
||||
clientData - an opaque data pointer from client. This pointer will be
|
||||
provided back when the callbacak is called.
|
||||
This can be used by client to store application context
|
||||
or statemachine etc.
|
||||
Can be NULL.
|
||||
return: an opaque pointer that serves as a request handle. This handle
|
||||
to be fed to the unregisterLocationUpdater() call.
|
||||
*/
|
||||
void* registerLocationUpdater(remoteClientInfo *pClientInfo, void* clientData);
|
||||
|
||||
/* unregisters the client callback
|
||||
locationUpdaterHandle - the opaque pointer from the return of
|
||||
registerLocationUpdater()
|
||||
*/
|
||||
void unregisterLocationUpdater(void* locationUpdaterHandle);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif //__IZAT_REMOTE_APIS_H__
|
3
qcom/opensource/location/loc-fidl/CMakeLists.txt
Normal file
3
qcom/opensource/location/loc-fidl/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
add_subdirectory( src )
|
176
qcom/opensource/location/loc-fidl/CMakeLists_x86.txt
Normal file
176
qcom/opensource/location/loc-fidl/CMakeLists_x86.txt
Normal file
@@ -0,0 +1,176 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set(PRJ_NAME LocationClientAPI)
|
||||
|
||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||
|
||||
OPTION(USE_FILE "Set to OFF to disable file logging" OFF )
|
||||
message(STATUS "USE_FILE is set to value: ${USE_FILE}")
|
||||
|
||||
OPTION(USE_CONSOLE "Set to OFF to disable console logging" OFF )
|
||||
message(STATUS "USE_CONSOLE is set to value: ${USE_CONSOLE}")
|
||||
|
||||
IF(USE_FILE)
|
||||
add_definitions(-DUSE_FILE)
|
||||
ENDIF(USE_FILE)
|
||||
IF(USE_CONSOLE)
|
||||
add_definitions(-DUSE_CONSOLE)
|
||||
ENDIF(USE_CONSOLE)
|
||||
|
||||
add_definitions(-D__LINUX__)
|
||||
add_definitions(-DOFF_TARGET)
|
||||
add_definitions(-std=c++14)
|
||||
|
||||
SET(MAX_LOG_LEVEL "DEBUG" CACHE STRING "maximum log level")
|
||||
message(STATUS "MAX_LOG_LEVEL is set to value: ${MAX_LOG_LEVEL}")
|
||||
add_definitions(-DCOMMONAPI_LOGLEVEL=COMMONAPI_LOGLEVEL_${MAX_LOG_LEVEL})
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "QNX")
|
||||
set (OS "QNX")
|
||||
set (NO_DEPRECATED_REGISTER "")
|
||||
set (Boost_USE_STATIC_LIBS ON)
|
||||
endif (${CMAKE_SYSTEM_NAME} MATCHES "QNX")
|
||||
|
||||
if (MSVC)
|
||||
# Visual C++ is not always sure whether he is really C++
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /EHsc /wd\\\"4503\\\"")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd\\\"4503\\\"")
|
||||
else()
|
||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -Wall -O0 -std=c++11 -D_GLIBCXX_USE_NANOSLEEP -DQNX")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O0 -std=c++11 -D_GLIBCXX_USE_NANOSLEEP")
|
||||
endif()
|
||||
|
||||
message(STATUS "Compiler options: ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
|
||||
"Choose the type of build, options are: Debug Release." FORCE)
|
||||
endif(NOT CMAKE_BUILD_TYPE)
|
||||
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
||||
|
||||
OPTION(USE_INSTALLED_COMMONAPI "Set to OFF to use the local (build tree) version of CommonAPI" ON)
|
||||
message(STATUS "USE_INSTALLED_COMMONAPI is set to value: ${USE_INSTALLED_COMMONAPI}")
|
||||
|
||||
if ("${USE_INSTALLED_COMMONAPI}" STREQUAL "ON")
|
||||
FIND_PACKAGE(CommonAPI 3.2.0 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
|
||||
#FIND_PACKAGE(CommonAPI-DBus 3.2.0 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
|
||||
else()
|
||||
FIND_PACKAGE(CommonAPI 3.2.0 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
|
||||
#FIND_PACKAGE(CommonAPI-DBus 3.2.0 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
|
||||
endif()
|
||||
|
||||
message(STATUS "CommonAPI_CONSIDERED_CONFIGS: ${CommonAPI_CONSIDERED_CONFIGS}")
|
||||
message(STATUS "COMMONAPI_INCLUDE_DIRS: ${COMMONAPI_INCLUDE_DIRS}")
|
||||
message(STATUS "CommonAPI-DBus_CONSIDERED_CONFIGS: ${CommonAPI-DBus_CONSIDERED_CONFIGS}")
|
||||
message(STATUS "COMMONAPI_DBUS_INCLUDE_DIRS: ${COMMONAPI_DBUS_INCLUDE_DIRS}")
|
||||
|
||||
# CommonAPI
|
||||
include(FindPkgConfig)
|
||||
###############################################################################
|
||||
# find DBus by using the 'pkg-config' tool
|
||||
if (MSVC)
|
||||
#Not beautiful, but it works
|
||||
if (DBus_DIR)
|
||||
if (DBus_BUILD_DIR)
|
||||
set(DBus_INCLUDE_DIRS "${DBus_DIR};${DBus_BUILD_DIR};")
|
||||
else ()
|
||||
message (FATAL_ERROR "DBus_BUILD_DIR not set! Cannot continue.")
|
||||
endif ()
|
||||
else()
|
||||
message (FATAL_ERROR "DBus_DIR not set! Cannot continue.")
|
||||
endif ()
|
||||
else()
|
||||
# pkg_check_modules(DBus REQUIRED dbus-1>=1.4)
|
||||
endif()
|
||||
|
||||
# SOME/IP
|
||||
find_package (CommonAPI-SomeIP 3.2.0 REQUIRED)
|
||||
find_package (vsomeip3 3.1.20 REQUIRED)
|
||||
|
||||
# Source Files
|
||||
set(PRJ_SRC_PATH src)
|
||||
set(PRJ_SRC_GEN_PATH src-gen)
|
||||
set(PRJ_SRC_GEN_COMMONAPI_PATH ${PRJ_SRC_GEN_PATH}/core/v0/com/qualcomm/qti/location)
|
||||
set(PRJ_SRC_GEN_COMMONAPI_DBUS_PATH ${PRJ_SRC_GEN_PATH}/dbus/v0/com/qualcomm/qti/location)
|
||||
set(PRJ_SRC_GEN_COMMONAPI_SOMEIP_PATH ${PRJ_SRC_GEN_PATH}/someip/v0/com/qualcomm/qti/location)
|
||||
|
||||
set(OFFTARGET_WS_PATH /local/mnt/workspace/nareshm/off-target/08-16-FOR-FIDL/x86_80)
|
||||
|
||||
set(PRJ_NAME_CLIENT ${PRJ_NAME}Client)
|
||||
set(PRJ_NAME_SERVICE ${PRJ_NAME}Service)
|
||||
|
||||
# Application
|
||||
FILE(GLOB PRJ_PROXY_GEN_SRCS ${PRJ_SRC_GEN_COMMONAPI_PATH}/*Proxy.cpp)
|
||||
FILE(GLOB PRJ_STUB_GEN_SRCS ${PRJ_SRC_GEN_COMMONAPI_PATH}/*Stub*.cpp)
|
||||
FILE(GLOB PRJ_STUB_IMPL_SRCS ${PRJ_SRC_COMMONAPI_PATH}/*Stub*.cpp)
|
||||
set(PRJ_CLIENT_SRCS ${PRJ_SRC_PATH}/${PRJ_NAME_CLIENT}.cpp ${PRJ_PROXY_GEN_SRCS})
|
||||
set(PRJ_SERVICE_SRCS ${PRJ_SRC_PATH}/${PRJ_NAME_SERVICE}.cpp ${PRJ_SRC_PATH}/${PRJ_NAME}StubImpl.cpp ${PRJ_STUB_GEN_SRCS} ${PRJ_STUB_IMPL_SRCS})
|
||||
|
||||
# Boost
|
||||
#find_package( Boost 1.71 COMPONENTS system thread log REQUIRED )
|
||||
include_directories( ${Boost_INCLUDE_DIR} )
|
||||
|
||||
# DBus library
|
||||
FILE(GLOB PRJ_DBUS_LIB_SRCS ${PRJ_SRC_GEN_COMMONAPI_DBUS_PATH}/*cpp)
|
||||
|
||||
# SOME/IP library
|
||||
FILE(GLOB PRJ_SOMEIP_LIB_SRCS ${PRJ_SRC_GEN_COMMONAPI_SOMEIP_PATH}/*cpp)
|
||||
|
||||
# Paths
|
||||
OPTION(USE_INSTALLED_DBUS "Set to OFF to use the local (patched) version of dbus" ON)
|
||||
message(STATUS "USE_INSTALLED_DBUS is set to value: ${USE_INSTALLED_DBUS}")
|
||||
|
||||
include_directories(
|
||||
src-gen/core
|
||||
# src-gen/dbus
|
||||
src-gen/someip
|
||||
${COMMONAPI_INCLUDE_DIRS}
|
||||
#${COMMONAPI_DBUS_INCLUDE_DIRS}
|
||||
${COMMONAPI_SOMEIP_INCLUDE_DIRS}
|
||||
#${DBus_INCLUDE_DIRS}
|
||||
${VSOMEIP_INCLUDE_DIRS}
|
||||
${OFFTARGET_WS_PATH}/location/client_api/inc
|
||||
${OFFTARGET_WS_PATH}/h_q_gps/utils
|
||||
${OFFTARGET_WS_PATH}/h_q_gps/pla/oe
|
||||
)
|
||||
|
||||
if ("${USE_INSTALLED_DBUS}" STREQUAL "ON")
|
||||
link_directories(
|
||||
${COMMONAPI_LIBDIR}
|
||||
#${COMMONAPI_DBUS_LIBDIR}
|
||||
${COMMONAPI_SOMEIP_CMAKE_DIR}/build
|
||||
${Boost_LIBRARY_DIR}
|
||||
${OFFTARGET_WS_PATH}/gps-internal/location-x86/prebuilts
|
||||
)
|
||||
else()
|
||||
link_directories(
|
||||
${COMMONAPI_LIBDIR}
|
||||
#${COMMONAPI_DBUS_LIBDIR}
|
||||
${COMMONAPI_SOMEIP_CMAKE_DIR}/build
|
||||
${DBus_INCLUDE_DIRS}/dbus/.libs
|
||||
${Boost_LIBRARY_DIR}
|
||||
${OFFTARGET_WS_PATH}/gps-internal/location-x86/prebuilts
|
||||
)
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
set(LINK_LIBRARIES CommonAPI location_client_api gps_utils)
|
||||
else()
|
||||
set(LINK_LIBRARIES -Wl,--as-needed CommonAPI location_client_api gps_utils)
|
||||
endif()
|
||||
|
||||
# Build Client
|
||||
add_executable(${PRJ_NAME_CLIENT} ${PRJ_CLIENT_SRCS})
|
||||
target_link_libraries(${PRJ_NAME_CLIENT} ${LINK_LIBRARIES})
|
||||
|
||||
# Build service
|
||||
add_executable(${PRJ_NAME_SERVICE} ${PRJ_SERVICE_SRCS})
|
||||
target_link_libraries(${PRJ_NAME_SERVICE} ${LINK_LIBRARIES})
|
||||
|
||||
# Build DBus library
|
||||
#add_library (${PRJ_NAME}-dbus SHARED ${PRJ_DBUS_LIB_SRCS})
|
||||
#target_link_libraries(${PRJ_NAME}-dbus CommonAPI-DBus)
|
||||
|
||||
# Build SOME/IP library
|
||||
add_library (${PRJ_NAME}-someip SHARED ${PRJ_SOMEIP_LIB_SRCS})
|
||||
target_link_libraries(${PRJ_NAME}-someip CommonAPI-SomeIP)
|
234
qcom/opensource/location/loc-fidl/CMakePresets.json
Normal file
234
qcom/opensource/location/loc-fidl/CMakePresets.json
Normal file
@@ -0,0 +1,234 @@
|
||||
{
|
||||
"version": 1,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 19,
|
||||
"patch": 0
|
||||
},
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "unix-makefiles",
|
||||
"hidden": true,
|
||||
"generator": "Unix Makefiles",
|
||||
"description": "Debug build using makefile generator",
|
||||
"cacheVariables": {
|
||||
"CMAKE_LINK_WHAT_YOU_USE": true,
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": true,
|
||||
"CMAKE_MODULE_PATH": "${sourceDir}/CMake/Module",
|
||||
"CMAKE_VERBOSE_MAKEFILE": true,
|
||||
"CMAKE_COLOR_MAKEFILE": true,
|
||||
"Python3_ROOT": "/usr"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "clang9_linux_x86_64",
|
||||
"inherits": "unix-makefiles",
|
||||
"description": "Debug build with Clang-9 for Linux x86-64",
|
||||
"binaryDir": "build/clang9_linux_x86_64",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install/linux_clang9",
|
||||
"CMAKE_TOOLCHAIN_FILE": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/CMake/Toolchain/clang9_linux_x86_64.cmake"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "clang11_linux_x86_64",
|
||||
"inherits": "unix-makefiles",
|
||||
"description": "Debug build with Clang-11 for Linux x86-64",
|
||||
"binaryDir": "build/clang11_linux_x86_64",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install/linux_clang11",
|
||||
"CMAKE_TOOLCHAIN_FILE": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/CMake/Toolchain/clang11_linux_x86_64.cmake"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "gcc6_linux_x86_64",
|
||||
"inherits": "unix-makefiles",
|
||||
"description": "Debug build with GCC-6 for Linux x86-64",
|
||||
"binaryDir": "build/gcc6_linux_x86_64",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install/linux_gcc6",
|
||||
"CMAKE_TOOLCHAIN_FILE": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/CMake/Toolchain/gcc6_linux_x86_64.cmake"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "gcc7_linux_x86_64",
|
||||
"inherits": "unix-makefiles",
|
||||
"description": "Debug build with GCC-7 for Linux x86-64",
|
||||
"binaryDir": "build/gcc7_linux_x86_64",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install/linux_gcc7",
|
||||
"CMAKE_TOOLCHAIN_FILE": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/CMake/Toolchain/gcc7_linux_x86_64.cmake"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "gcc7_linux_x86_64_openssl",
|
||||
"inherits": "gcc7_linux_x86_64",
|
||||
"description": "Debug build with GCC-7 for Linux x86-64 with OpenSSL enabled",
|
||||
"cacheVariables": {
|
||||
"AMSR_ENABLE_X509": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "gcc9_linux_x86_64",
|
||||
"inherits": "unix-makefiles",
|
||||
"description": "Debug build with GCC-9 for Linux x86-64",
|
||||
"binaryDir": "build/gcc9_linux_x86_64",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install/linux_gcc9",
|
||||
"CMAKE_TOOLCHAIN_FILE": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/CMake/Toolchain/gcc9_linux_x86_64.cmake"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "mips2019_linux_x86_64",
|
||||
"inherits": "unix-makefiles",
|
||||
"description": "Debug build with MIPS-2019 for Linux x86-64",
|
||||
"binaryDir": "build/mips2019_linux_x86_64",
|
||||
"cacheVariables": {
|
||||
"CCACHE_ENABLE": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install/linux_mips2019",
|
||||
"CMAKE_PREFIX_PATH": "/opt/mips",
|
||||
"CMAKE_TOOLCHAIN_FILE": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/CMake/Toolchain/mips2019_linux_x86_64.cmake"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "qcc5_qnx7_x86_64",
|
||||
"inherits": "unix-makefiles",
|
||||
"description": "Debug build with QCC-5 for QNX7 x86-64",
|
||||
"binaryDir": "build/qcc5_qnx7_x86_64",
|
||||
"cacheVariables": {
|
||||
"CCACHE_ENABLE": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install/qnx7_qcc5",
|
||||
"CMAKE_PREFIX_PATH": "$env{QNX_HOST}/usr",
|
||||
"CMAKE_TOOLCHAIN_FILE": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/CMake/Toolchain/qcc5_qnx7_x86_64.cmake"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "qcc8_qnx710_x86_64",
|
||||
"inherits": "unix-makefiles",
|
||||
"description": "Debug build with QCC-8 for QNX7.1 x86-64",
|
||||
"binaryDir": "build/qcc8_qnx710_x86_64",
|
||||
"cacheVariables": {
|
||||
"CCACHE_ENABLE": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install/qnx710_qcc8",
|
||||
"CMAKE_PREFIX_PATH": "$env{QNX_HOST}/usr",
|
||||
"CMAKE_TOOLCHAIN_FILE": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/CMake/Toolchain/qcc8_qnx710_x86_64.cmake"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "qcc8_qnx710_aarch64le",
|
||||
"inherits": "unix-makefiles",
|
||||
"description": "Debug build with QCC-8 for QNX7.1 aarch64le",
|
||||
"binaryDir": "build/qcc8_qnx710_aarch64le",
|
||||
"cacheVariables": {
|
||||
"CCACHE_ENABLE": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install/qnx710_qcc8",
|
||||
"CMAKE_PREFIX_PATH": "$env{QNX_HOST}/usr",
|
||||
"CMAKE_TOOLCHAIN_FILE": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/CMake/Toolchain/qcc8_qnx710_aarch64le.cmake"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "qcc8_qnx710_x86_64_openssl",
|
||||
"inherits": "qcc8_qnx710_x86_64",
|
||||
"description": "Debug build with QCC-8 for QNX7.1 x86-64 with OpenSSL enabled",
|
||||
"cacheVariables": {
|
||||
"AMSR_ENABLE_X509": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "cafecc_linux_x86_64",
|
||||
"inherits": "unix-makefiles",
|
||||
"description": "Debug build with cafeCC for Linux x86-64",
|
||||
"binaryDir": "build/cafecc_linux_x86_64",
|
||||
"cacheVariables": {
|
||||
"CCACHE_ENABLE": "ON",
|
||||
"TACO_EXECUTE_TEST": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install/linux_cafecc",
|
||||
"CMAKE_PREFIX_PATH": "/opt/bauhaus-suite",
|
||||
"CMAKE_TOOLCHAIN_FILE": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/CMake/Toolchain/cafecc_linux_x86_64.cmake"
|
||||
}
|
||||
},
|
||||
"environment": {
|
||||
"COMPILE_ONLY": "true",
|
||||
"BAUHAUS_CONFIG": "${sourceDir}/Infrastructure/bauhaus/bauhaus-config/cafecc_config_linux_gcc7_x86_64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "vca_linux_x86_64",
|
||||
"inherits": "unix-makefiles",
|
||||
"description": "Debug build with Vector Code Analyzer for Linux x86-64",
|
||||
"binaryDir": "build/vca_linux_x86_64",
|
||||
"cacheVariables": {
|
||||
"CCACHE_ENABLE": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"CMAKE_LINK_WHAT_YOU_USE": false,
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install/linux_vca",
|
||||
"CMAKE_PREFIX_PATH": "/opt/VectorCodeAnalyzer",
|
||||
"CMAKE_TOOLCHAIN_FILE": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/CMake/Toolchain/vca_linux_x86_64.cmake"
|
||||
},
|
||||
"Python3_ROOT": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "cafecc_qnx710_x86_64",
|
||||
"inherits": "unix-makefiles",
|
||||
"description": "Debug build with cafeCC for QNX7.1 x86-64",
|
||||
"binaryDir": "build/cafecc_qnx710_x86_64",
|
||||
"cacheVariables": {
|
||||
"CCACHE_ENABLE": "ON",
|
||||
"TACO_EXECUTE_TEST": "OFF",
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install/qnx_cafecc",
|
||||
"CMAKE_PREFIX_PATH": "/opt/bauhaus-suite",
|
||||
"CMAKE_TOOLCHAIN_FILE": {
|
||||
"type": "FILEPATH",
|
||||
"value": "${sourceDir}/CMake/Toolchain/cafecc_qnx710_x86_64.cmake"
|
||||
}
|
||||
},
|
||||
"environment": {
|
||||
"COMPILE_ONLY": "true",
|
||||
"BAUHAUS_CONFIG": "${sourceDir}/Infrastructure/bauhaus/bauhaus-config/cafecc_config_QNX710_x86_64"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
8
qcom/opensource/location/loc-fidl/commonapi4dbus.ini
Normal file
8
qcom/opensource/location/loc-fidl/commonapi4dbus.ini
Normal file
@@ -0,0 +1,8 @@
|
||||
[default]
|
||||
binding=dbus
|
||||
|
||||
[logging]
|
||||
console = true
|
||||
file = ./mylog.log
|
||||
dlt = false
|
||||
level = verbose
|
9
qcom/opensource/location/loc-fidl/commonapi4someip.ini
Normal file
9
qcom/opensource/location/loc-fidl/commonapi4someip.ini
Normal file
@@ -0,0 +1,9 @@
|
||||
[default]
|
||||
binding=someip
|
||||
tp=true
|
||||
|
||||
[logging]
|
||||
console = true
|
||||
file = ./mylog.log
|
||||
dlt = false
|
||||
level = verbose
|
150
qcom/opensource/location/loc-fidl/fidl/LocIdlAPI-Core.fdepl
Normal file
150
qcom/opensource/location/loc-fidl/fidl/LocIdlAPI-Core.fdepl
Normal file
@@ -0,0 +1,150 @@
|
||||
/** Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
SPDX-License-Identifier: BSD-3-Clause-Clear */
|
||||
|
||||
import "platform:/plugin/org.genivi.commonapi.core/deployment/CommonAPI_deployment_spec.fdepl"
|
||||
import "LocIdlAPI.fidl"
|
||||
|
||||
define org.genivi.commonapi.core.deployment for interface com.qualcomm.qti.location.LocIdlAPI {
|
||||
DefaultEnumBackingType = UInt32
|
||||
enumeration IDLLocationReportInfoFlagMask {
|
||||
EnumBackingType = UInt64
|
||||
}
|
||||
enumeration IDLGnssMeasurementsMultipathIndicator {
|
||||
EnumBackingType = UInt32
|
||||
GNSS_MEASUREMENTS_MULTIPATH_INDICATOR_UNKNOWN {
|
||||
}
|
||||
GNSS_MEASUREMENTS_MULTIPATH_INDICATOR_PRESENT{
|
||||
}
|
||||
GNSS_MEASUREMENTS_MULTIPATH_INDICATOR_NOT_PRESENT{
|
||||
}
|
||||
}
|
||||
|
||||
enumeration IDLLocOutputEngineType {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLGnssSvType {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLLocationResponse {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLGnssSignalTypeMask {
|
||||
EnumBackingType = UInt64
|
||||
}
|
||||
|
||||
enumeration IDLLocationReportPosDataMask {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLLocationReportNavSolutionMask {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLLocationTechnologyMask {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLLocationFlagsMask {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLGnssSvOptionsMask {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLLocationCapabilitiesMask {
|
||||
EnumBackingType = UInt64
|
||||
}
|
||||
|
||||
enumeration IDLLCALocationInfoFlagMask {
|
||||
EnumBackingType = UInt64
|
||||
}
|
||||
|
||||
enumeration IDLLocationReliability {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLGnssLocSvSystemEnumType {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLGnssSystemTimeStructTypeFlags {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLGnssGloTimeStructTypeFlags {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLDrCalibrationStatusMask {
|
||||
EnumBackingType = UInt64
|
||||
}
|
||||
|
||||
enumeration IDLLocReqEngineTypeMask {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLPositioningEngineMask {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLDrSolutionStatusMask {
|
||||
EnumBackingType = UInt64
|
||||
}
|
||||
|
||||
enumeration IDLGnssDataMask {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLGnssMeasurementsDataFlagsMask {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLGnssMeasurementsStateMask {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLGnssMeasurementsAdrStateMask {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLGnssMeasurementsMultipathIndicator {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLGnssMeasurementsClockFlagsMask {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLLeapSecondSysInfoMask {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLGeofenceBreachTypeMask {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLGnssReportCbInfoMask {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLEngineReportCbMask {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLAidingDataDeletionMask {
|
||||
EnumBackingType = UInt32
|
||||
}
|
||||
|
||||
enumeration IDLGnssConstellationType {
|
||||
EnumBackingType = UInt64
|
||||
}
|
||||
|
||||
enumeration MapMatchingFeedbackDataValidity {
|
||||
EnumBackingType = UInt64
|
||||
}
|
||||
}
|
||||
|
236
qcom/opensource/location/loc-fidl/fidl/LocIdlAPI-SomeIP.fdepl
Normal file
236
qcom/opensource/location/loc-fidl/fidl/LocIdlAPI-SomeIP.fdepl
Normal file
@@ -0,0 +1,236 @@
|
||||
/** Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
SPDX-License-Identifier: BSD-3-Clause-Clear */
|
||||
|
||||
import "platform:/plugin/org.genivi.commonapi.someip/deployment/CommonAPI-4-SOMEIP_deployment_spec.fdepl"
|
||||
import "LocIdlAPI.fidl"
|
||||
|
||||
define org.genivi.commonapi.someip.deployment for interface com.qualcomm.qti.location.LocIdlAPI {
|
||||
SomeIpServiceID = 60928 /** 0xEE00*/
|
||||
|
||||
attribute gnssCapabilitiesMask {
|
||||
SomeIpGetterID = 3000
|
||||
SomeIpSetterID = 3001
|
||||
SomeIpNotifierID = 33010
|
||||
SomeIpNotifierEventGroups = { 33000 } /*0x80E8*/
|
||||
|
||||
SomeIpAttributeReliable = true
|
||||
}
|
||||
|
||||
method startPositionSession:LocationReport {
|
||||
SomeIpMethodID = 32001 /** 0x7D01 */
|
||||
SomeIpReliable = true
|
||||
}
|
||||
|
||||
method startPositionSession:engineSpecificLocation {
|
||||
SomeIpMethodID = 32002 /** 0x7D02 */
|
||||
SomeIpReliable = true
|
||||
}
|
||||
|
||||
method stopPositionSession {
|
||||
SomeIpMethodID = 32003 /** 0x7D03 */
|
||||
}
|
||||
|
||||
method deleteAidingData {
|
||||
SomeIpMethodID = 32004 /** 0x7D04 */
|
||||
SomeIpReliable = true
|
||||
}
|
||||
|
||||
method configConstellations {
|
||||
SomeIpMethodID = 32005 /** 0x7D05 */
|
||||
SomeIpReliable = true
|
||||
}
|
||||
|
||||
method injectMapMatchedFeedbackData {
|
||||
SomeIpMethodID = 32006 /** 0x7D06 */
|
||||
SomeIpReliable = true
|
||||
}
|
||||
|
||||
broadcast GnssMeasurements {
|
||||
SomeIpEventID = 33001 /** 0x80E9 */
|
||||
SomeIpEventGroups = { 33000 }
|
||||
|
||||
out {
|
||||
}
|
||||
}
|
||||
|
||||
broadcast LocationReport {
|
||||
SomeIpEventID = 33002 /** 0x80EA */
|
||||
SomeIpEventGroups = { 33000 }
|
||||
out {
|
||||
}
|
||||
}
|
||||
|
||||
broadcast EngineLocations {
|
||||
SomeIpEventID = 33003 /** 0x80EB */
|
||||
SomeIpEventGroups = { 33000 }
|
||||
out {
|
||||
}
|
||||
}
|
||||
|
||||
broadcast GnssSv {
|
||||
SomeIpEventID = 33004 /** 0x80EC */
|
||||
SomeIpEventGroups = { 33000 }
|
||||
out {
|
||||
}
|
||||
}
|
||||
|
||||
broadcast GnssNmea {
|
||||
SomeIpEventID = 33005 /** 0x80ED */
|
||||
SomeIpEventGroups = { 33000 }
|
||||
out {
|
||||
}
|
||||
}
|
||||
|
||||
broadcast EngineNmea {
|
||||
SomeIpEventID = 33006 /** 0x80EE */
|
||||
SomeIpEventGroups = { 33000 }
|
||||
out {
|
||||
}
|
||||
}
|
||||
|
||||
broadcast GnssData {
|
||||
SomeIpEventID = 33007 /** 0x80EF */
|
||||
SomeIpEventGroups = { 33000 }
|
||||
out {
|
||||
}
|
||||
}
|
||||
|
||||
enumeration IDLGnssMeasurementsMultipathIndicator {
|
||||
SomeIpEnumWidth = 4
|
||||
IDL_GNSS_MEASUREMENTS_MULTIPATH_INDICATOR_UNKNOWN {
|
||||
}
|
||||
IDL_GNSS_MEASUREMENTS_MULTIPATH_INDICATOR_PRESENT{
|
||||
}
|
||||
IDL_GNSS_MEASUREMENTS_MULTIPATH_INDICATOR_NOT_PRESENT{
|
||||
}
|
||||
}
|
||||
|
||||
enumeration IDLLCALocationInfoFlagMask {
|
||||
SomeIpEnumWidth = 8
|
||||
}
|
||||
|
||||
enumeration IDLLocOutputEngineType {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLGnssSvType {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLLocationResponse {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLGnssSignalTypeMask {
|
||||
SomeIpEnumWidth = 8
|
||||
}
|
||||
|
||||
enumeration IDLLocationReportPosDataMask {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLLocationReportNavSolutionMask {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLLocationTechnologyMask {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLLocationFlagsMask {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLGnssSvOptionsMask {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLLocationCapabilitiesMask {
|
||||
SomeIpEnumWidth = 8
|
||||
}
|
||||
|
||||
enumeration IDLLocationReliability {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLGnssSvSystemEnumType {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLGnssSystemTimeStructTypeFlags {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLGnssGloTimeStructTypeFlags {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLDrCalibrationStatusMask {
|
||||
SomeIpEnumWidth = 8
|
||||
}
|
||||
|
||||
enumeration IDLLocReqEngineTypeMask {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLPositioningEngineMask {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLDrSolutionStatusMask {
|
||||
SomeIpEnumWidth = 8
|
||||
}
|
||||
|
||||
enumeration IDLGnssDataMask {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLGnssMeasurementsDataFlagsMask {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLGnssMeasurementsStateMask {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLGnssMeasurementsAdrStateMask {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLGnssMeasurementsMultipathIndicator {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLGnssMeasurementsClockFlagsMask {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLGnssReportCbInfoMask {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLEngineReportCbMask {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration IDLLocSessionStatus {
|
||||
SomeIpEnumWidth = 4
|
||||
}
|
||||
|
||||
enumeration MapMatchingFeedbackDataValidity {
|
||||
SomeIpEnumWidth = 8
|
||||
}
|
||||
}
|
||||
|
||||
define org.genivi.commonapi.someip.deployment for provider as Service {
|
||||
instance com.qualcomm.qti.location.LocIdlAPI {
|
||||
InstanceId = "com.qualcomm.qti.location.LocIdlAPI"
|
||||
|
||||
SomeIpInstanceID = 1 /**Instance 0x01*/
|
||||
|
||||
/** Actual entries configured through vsomeip-location.json files */
|
||||
SomeIpUnicastAddress = "192.168.1.1"
|
||||
SomeIpReliableUnicastPort = 30499
|
||||
SomeIpUnreliableUnicastPort = 30499
|
||||
}
|
||||
}
|
2219
qcom/opensource/location/loc-fidl/fidl/LocIdlAPI.fidl
Normal file
2219
qcom/opensource/location/loc-fidl/fidl/LocIdlAPI.fidl
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,398 @@
|
||||
/*
|
||||
* This file was generated by the CommonAPI Generators.
|
||||
* Used org.genivi.commonapi.core 3.2.0.v202012010850.
|
||||
* Used org.franca.core 0.13.1.201807231814.
|
||||
*
|
||||
* 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/.
|
||||
*/
|
||||
#ifndef V0_COM_QUALCOMM_QTI_LOCATION_Loc_Idl_API_PROXY_HPP_
|
||||
#define V0_COM_QUALCOMM_QTI_LOCATION_Loc_Idl_API_PROXY_HPP_
|
||||
|
||||
#include <v0/com/qualcomm/qti/location/LocIdlAPIProxyBase.hpp>
|
||||
|
||||
|
||||
#if !defined (COMMONAPI_INTERNAL_COMPILATION)
|
||||
#define COMMONAPI_INTERNAL_COMPILATION
|
||||
#define HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE
|
||||
#endif
|
||||
|
||||
#include <CommonAPI/AttributeExtension.hpp>
|
||||
#include <CommonAPI/Factory.hpp>
|
||||
|
||||
#if defined (HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE)
|
||||
#undef COMMONAPI_INTERNAL_COMPILATION
|
||||
#undef HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE
|
||||
#endif
|
||||
|
||||
namespace v0 {
|
||||
namespace com {
|
||||
namespace qualcomm {
|
||||
namespace qti {
|
||||
namespace location {
|
||||
|
||||
template <typename ... _AttributeExtensions>
|
||||
class LocIdlAPIProxy
|
||||
: virtual public LocIdlAPI,
|
||||
virtual public LocIdlAPIProxyBase,
|
||||
virtual public _AttributeExtensions... {
|
||||
public:
|
||||
LocIdlAPIProxy(std::shared_ptr<CommonAPI::Proxy> delegate);
|
||||
~LocIdlAPIProxy();
|
||||
|
||||
typedef LocIdlAPI InterfaceType;
|
||||
|
||||
|
||||
/**
|
||||
* Returns the CommonAPI address of the remote partner this proxy communicates with.
|
||||
*/
|
||||
virtual const CommonAPI::Address &getAddress() const;
|
||||
|
||||
/**
|
||||
* Returns true if the remote partner for this proxy is currently known to be available.
|
||||
*/
|
||||
virtual bool isAvailable() const;
|
||||
|
||||
/**
|
||||
* Returns true if the remote partner for this proxy is available.
|
||||
*/
|
||||
virtual bool isAvailableBlocking() const;
|
||||
|
||||
/**
|
||||
* Returns the wrapper class that is used to (de-)register for notifications about
|
||||
* the availability of the remote partner of this proxy.
|
||||
*/
|
||||
virtual CommonAPI::ProxyStatusEvent& getProxyStatusEvent();
|
||||
|
||||
/**
|
||||
* Returns the wrapper class that is used to access version information of the remote
|
||||
* partner of this proxy.
|
||||
*/
|
||||
virtual CommonAPI::InterfaceVersionAttribute& getInterfaceVersionAttribute();
|
||||
|
||||
virtual std::future<void> getCompletionFuture();
|
||||
|
||||
/**
|
||||
* Returns the wrapper class that provides access to the attribute gnssCapabilitiesMask.
|
||||
*/
|
||||
virtual GnssCapabilitiesMaskAttribute& getGnssCapabilitiesMaskAttribute() {
|
||||
return delegate_->getGnssCapabilitiesMaskAttribute();
|
||||
}
|
||||
/**
|
||||
* Returns the wrapper class that provides access to the broadcast GnssMeasurements.
|
||||
*/
|
||||
virtual GnssMeasurementsEvent& getGnssMeasurementsEvent() {
|
||||
return delegate_->getGnssMeasurementsEvent();
|
||||
}
|
||||
/**
|
||||
* Returns the wrapper class that provides access to the broadcast LocationReport.
|
||||
*/
|
||||
virtual LocationReportEvent& getLocationReportEvent() {
|
||||
return delegate_->getLocationReportEvent();
|
||||
}
|
||||
/**
|
||||
* Returns the wrapper class that provides access to the broadcast EngineLocations.
|
||||
*/
|
||||
virtual EngineLocationsEvent& getEngineLocationsEvent() {
|
||||
return delegate_->getEngineLocationsEvent();
|
||||
}
|
||||
/**
|
||||
* Returns the wrapper class that provides access to the broadcast GnssSv.
|
||||
*/
|
||||
virtual GnssSvEvent& getGnssSvEvent() {
|
||||
return delegate_->getGnssSvEvent();
|
||||
}
|
||||
/**
|
||||
* Returns the wrapper class that provides access to the broadcast GnssNmea.
|
||||
*/
|
||||
virtual GnssNmeaEvent& getGnssNmeaEvent() {
|
||||
return delegate_->getGnssNmeaEvent();
|
||||
}
|
||||
/**
|
||||
* Returns the wrapper class that provides access to the broadcast EngineNmea.
|
||||
*/
|
||||
virtual EngineNmeaEvent& getEngineNmeaEvent() {
|
||||
return delegate_->getEngineNmeaEvent();
|
||||
}
|
||||
/**
|
||||
* Returns the wrapper class that provides access to the broadcast GnssData.
|
||||
*/
|
||||
virtual GnssDataEvent& getGnssDataEvent() {
|
||||
return delegate_->getGnssDataEvent();
|
||||
}
|
||||
/**
|
||||
* Calls startPositionSession with synchronous semantics.
|
||||
*
|
||||
* All const parameters are input parameters to this method.
|
||||
* All non-const parameters will be filled with the returned values.
|
||||
* The CallStatus will be filled when the method returns and indicate either
|
||||
* "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
|
||||
* will be set.
|
||||
*/
|
||||
virtual void startPositionSession(uint32_t _intervalInMs, uint32_t _gnssReportCallbackMask, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info = nullptr);
|
||||
/**
|
||||
* Calls startPositionSession with asynchronous semantics.
|
||||
*
|
||||
* The provided callback will be called when the reply to this call arrives or
|
||||
* an error occurs during the call. The CallStatus will indicate either "SUCCESS"
|
||||
* or which type of error has occurred. In case of any error, ONLY the CallStatus
|
||||
* will have a defined value.
|
||||
* The std::future returned by this method will be fulfilled at arrival of the reply.
|
||||
* It will provide the same value for CallStatus as will be handed to the callback.
|
||||
*/
|
||||
virtual std::future<CommonAPI::CallStatus> startPositionSessionAsync(const uint32_t &_intervalInMs, const uint32_t &_gnssReportCallbackMask, StartPositionSessionAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr);
|
||||
/**
|
||||
* Calls startPositionSession with synchronous semantics.
|
||||
*
|
||||
* All const parameters are input parameters to this method.
|
||||
* All non-const parameters will be filled with the returned values.
|
||||
* The CallStatus will be filled when the method returns and indicate either
|
||||
* "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
|
||||
* will be set.
|
||||
*/
|
||||
virtual void startPositionSession(uint32_t _intervalInMs, uint32_t _locReqEngMask, uint32_t _engReportCallbackMask, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info = nullptr);
|
||||
/**
|
||||
* Calls startPositionSession with asynchronous semantics.
|
||||
*
|
||||
* The provided callback will be called when the reply to this call arrives or
|
||||
* an error occurs during the call. The CallStatus will indicate either "SUCCESS"
|
||||
* or which type of error has occurred. In case of any error, ONLY the CallStatus
|
||||
* will have a defined value.
|
||||
* The std::future returned by this method will be fulfilled at arrival of the reply.
|
||||
* It will provide the same value for CallStatus as will be handed to the callback.
|
||||
*/
|
||||
virtual std::future<CommonAPI::CallStatus> startPositionSessionAsync(const uint32_t &_intervalInMs, const uint32_t &_locReqEngMask, const uint32_t &_engReportCallbackMask, StartPositionSessionAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr);
|
||||
/**
|
||||
* Calls stopPositionSession with synchronous semantics.
|
||||
*
|
||||
* The CallStatus will be filled when the method returns and indicate either
|
||||
* "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
|
||||
* will be set.
|
||||
*/
|
||||
virtual void stopPositionSession(CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info = nullptr);
|
||||
/**
|
||||
* Calls stopPositionSession with asynchronous semantics.
|
||||
*
|
||||
* The provided callback will be called when the reply to this call arrives or
|
||||
* an error occurs during the call. The CallStatus will indicate either "SUCCESS"
|
||||
* or which type of error has occurred. In case of any error, ONLY the CallStatus
|
||||
* will have a defined value.
|
||||
* The std::future returned by this method will be fulfilled at arrival of the reply.
|
||||
* It will provide the same value for CallStatus as will be handed to the callback.
|
||||
*/
|
||||
virtual std::future<CommonAPI::CallStatus> stopPositionSessionAsync(StopPositionSessionAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr);
|
||||
/**
|
||||
* Calls deleteAidingData with synchronous semantics.
|
||||
*
|
||||
* All const parameters are input parameters to this method.
|
||||
* All non-const parameters will be filled with the returned values.
|
||||
* The CallStatus will be filled when the method returns and indicate either
|
||||
* "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
|
||||
* will be set.
|
||||
*/
|
||||
virtual void deleteAidingData(uint32_t _aidingDataMask, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info = nullptr);
|
||||
/**
|
||||
* Calls deleteAidingData with asynchronous semantics.
|
||||
*
|
||||
* The provided callback will be called when the reply to this call arrives or
|
||||
* an error occurs during the call. The CallStatus will indicate either "SUCCESS"
|
||||
* or which type of error has occurred. In case of any error, ONLY the CallStatus
|
||||
* will have a defined value.
|
||||
* The std::future returned by this method will be fulfilled at arrival of the reply.
|
||||
* It will provide the same value for CallStatus as will be handed to the callback.
|
||||
*/
|
||||
virtual std::future<CommonAPI::CallStatus> deleteAidingDataAsync(const uint32_t &_aidingDataMask, DeleteAidingDataAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr);
|
||||
/**
|
||||
* Calls configConstellations with synchronous semantics.
|
||||
*
|
||||
* All const parameters are input parameters to this method.
|
||||
* All non-const parameters will be filled with the returned values.
|
||||
* The CallStatus will be filled when the method returns and indicate either
|
||||
* "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
|
||||
* will be set.
|
||||
*/
|
||||
virtual void configConstellations(std::vector< LocIdlAPI::IDLGnssSvIdInfo > _svList, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info = nullptr);
|
||||
/**
|
||||
* Calls configConstellations with asynchronous semantics.
|
||||
*
|
||||
* The provided callback will be called when the reply to this call arrives or
|
||||
* an error occurs during the call. The CallStatus will indicate either "SUCCESS"
|
||||
* or which type of error has occurred. In case of any error, ONLY the CallStatus
|
||||
* will have a defined value.
|
||||
* The std::future returned by this method will be fulfilled at arrival of the reply.
|
||||
* It will provide the same value for CallStatus as will be handed to the callback.
|
||||
*/
|
||||
virtual std::future<CommonAPI::CallStatus> configConstellationsAsync(const std::vector< LocIdlAPI::IDLGnssSvIdInfo > &_svList, ConfigConstellationsAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr);
|
||||
/**
|
||||
* Calls injectMapMatchedFeedbackData with synchronous semantics.
|
||||
*
|
||||
* All const parameters are input parameters to this method.
|
||||
* All non-const parameters will be filled with the returned values.
|
||||
* The CallStatus will be filled when the method returns and indicate either
|
||||
* "SUCCESS" or which type of error has occurred. In case of an error, ONLY the CallStatus
|
||||
* will be set.
|
||||
*/
|
||||
virtual void injectMapMatchedFeedbackData(LocIdlAPI::MapMatchingFeedbackData _mmfData, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info = nullptr);
|
||||
/**
|
||||
* Calls injectMapMatchedFeedbackData with asynchronous semantics.
|
||||
*
|
||||
* The provided callback will be called when the reply to this call arrives or
|
||||
* an error occurs during the call. The CallStatus will indicate either "SUCCESS"
|
||||
* or which type of error has occurred. In case of any error, ONLY the CallStatus
|
||||
* will have a defined value.
|
||||
* The std::future returned by this method will be fulfilled at arrival of the reply.
|
||||
* It will provide the same value for CallStatus as will be handed to the callback.
|
||||
*/
|
||||
virtual std::future<CommonAPI::CallStatus> injectMapMatchedFeedbackDataAsync(const LocIdlAPI::MapMatchingFeedbackData &_mmfData, InjectMapMatchedFeedbackDataAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
std::shared_ptr< LocIdlAPIProxyBase> delegate_;
|
||||
};
|
||||
|
||||
typedef LocIdlAPIProxy<> LocIdlAPIProxyDefault;
|
||||
|
||||
namespace LocIdlAPIExtensions {
|
||||
template <template <typename > class _ExtensionType>
|
||||
class GnssCapabilitiesMaskAttributeExtension {
|
||||
public:
|
||||
typedef _ExtensionType< LocIdlAPIProxyBase::GnssCapabilitiesMaskAttribute> extension_type;
|
||||
|
||||
static_assert(std::is_base_of<typename CommonAPI::AttributeExtension< LocIdlAPIProxyBase::GnssCapabilitiesMaskAttribute>, extension_type>::value,
|
||||
"Not CommonAPI Attribute Extension!");
|
||||
|
||||
GnssCapabilitiesMaskAttributeExtension(LocIdlAPIProxyBase& proxy): attributeExtension_(proxy.getGnssCapabilitiesMaskAttribute()) {
|
||||
}
|
||||
|
||||
inline extension_type& getGnssCapabilitiesMaskAttributeExtension() {
|
||||
return attributeExtension_;
|
||||
}
|
||||
|
||||
private:
|
||||
extension_type attributeExtension_;
|
||||
};
|
||||
|
||||
} // namespace LocIdlAPIExtensions
|
||||
|
||||
//
|
||||
// LocIdlAPIProxy Implementation
|
||||
//
|
||||
template <typename ... _AttributeExtensions>
|
||||
LocIdlAPIProxy<_AttributeExtensions...>::LocIdlAPIProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
|
||||
_AttributeExtensions(*(std::dynamic_pointer_cast< LocIdlAPIProxyBase>(delegate)))...,
|
||||
delegate_(std::dynamic_pointer_cast< LocIdlAPIProxyBase>(delegate)) {
|
||||
}
|
||||
|
||||
template <typename ... _AttributeExtensions>
|
||||
LocIdlAPIProxy<_AttributeExtensions...>::~LocIdlAPIProxy() {
|
||||
}
|
||||
|
||||
template <typename ... _AttributeExtensions>
|
||||
void LocIdlAPIProxy<_AttributeExtensions...>::startPositionSession(uint32_t _intervalInMs, uint32_t _gnssReportCallbackMask, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info) {
|
||||
delegate_->startPositionSession(_intervalInMs, _gnssReportCallbackMask, _internalCallStatus, _resp, _info);
|
||||
}
|
||||
|
||||
template <typename ... _AttributeExtensions>
|
||||
std::future<CommonAPI::CallStatus> LocIdlAPIProxy<_AttributeExtensions...>::startPositionSessionAsync(const uint32_t &_intervalInMs, const uint32_t &_gnssReportCallbackMask, StartPositionSessionAsyncCallback _callback, const CommonAPI::CallInfo *_info) {
|
||||
return delegate_->startPositionSessionAsync(_intervalInMs, _gnssReportCallbackMask, _callback, _info);
|
||||
}
|
||||
template <typename ... _AttributeExtensions>
|
||||
void LocIdlAPIProxy<_AttributeExtensions...>::startPositionSession(uint32_t _intervalInMs, uint32_t _locReqEngMask, uint32_t _engReportCallbackMask, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info) {
|
||||
delegate_->startPositionSession(_intervalInMs, _locReqEngMask, _engReportCallbackMask, _internalCallStatus, _resp, _info);
|
||||
}
|
||||
|
||||
template <typename ... _AttributeExtensions>
|
||||
std::future<CommonAPI::CallStatus> LocIdlAPIProxy<_AttributeExtensions...>::startPositionSessionAsync(const uint32_t &_intervalInMs, const uint32_t &_locReqEngMask, const uint32_t &_engReportCallbackMask, StartPositionSessionAsyncCallback _callback, const CommonAPI::CallInfo *_info) {
|
||||
return delegate_->startPositionSessionAsync(_intervalInMs, _locReqEngMask, _engReportCallbackMask, _callback, _info);
|
||||
}
|
||||
template <typename ... _AttributeExtensions>
|
||||
void LocIdlAPIProxy<_AttributeExtensions...>::stopPositionSession(CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info) {
|
||||
delegate_->stopPositionSession(_internalCallStatus, _info);
|
||||
}
|
||||
|
||||
template <typename ... _AttributeExtensions>
|
||||
std::future<CommonAPI::CallStatus> LocIdlAPIProxy<_AttributeExtensions...>::stopPositionSessionAsync(StopPositionSessionAsyncCallback _callback, const CommonAPI::CallInfo *_info) {
|
||||
return delegate_->stopPositionSessionAsync(_callback, _info);
|
||||
}
|
||||
template <typename ... _AttributeExtensions>
|
||||
void LocIdlAPIProxy<_AttributeExtensions...>::deleteAidingData(uint32_t _aidingDataMask, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info) {
|
||||
delegate_->deleteAidingData(_aidingDataMask, _internalCallStatus, _resp, _info);
|
||||
}
|
||||
|
||||
template <typename ... _AttributeExtensions>
|
||||
std::future<CommonAPI::CallStatus> LocIdlAPIProxy<_AttributeExtensions...>::deleteAidingDataAsync(const uint32_t &_aidingDataMask, DeleteAidingDataAsyncCallback _callback, const CommonAPI::CallInfo *_info) {
|
||||
return delegate_->deleteAidingDataAsync(_aidingDataMask, _callback, _info);
|
||||
}
|
||||
template <typename ... _AttributeExtensions>
|
||||
void LocIdlAPIProxy<_AttributeExtensions...>::configConstellations(std::vector< LocIdlAPI::IDLGnssSvIdInfo > _svList, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info) {
|
||||
delegate_->configConstellations(_svList, _internalCallStatus, _resp, _info);
|
||||
}
|
||||
|
||||
template <typename ... _AttributeExtensions>
|
||||
std::future<CommonAPI::CallStatus> LocIdlAPIProxy<_AttributeExtensions...>::configConstellationsAsync(const std::vector< LocIdlAPI::IDLGnssSvIdInfo > &_svList, ConfigConstellationsAsyncCallback _callback, const CommonAPI::CallInfo *_info) {
|
||||
return delegate_->configConstellationsAsync(_svList, _callback, _info);
|
||||
}
|
||||
template <typename ... _AttributeExtensions>
|
||||
void LocIdlAPIProxy<_AttributeExtensions...>::injectMapMatchedFeedbackData(LocIdlAPI::MapMatchingFeedbackData _mmfData, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info) {
|
||||
delegate_->injectMapMatchedFeedbackData(_mmfData, _internalCallStatus, _resp, _info);
|
||||
}
|
||||
|
||||
template <typename ... _AttributeExtensions>
|
||||
std::future<CommonAPI::CallStatus> LocIdlAPIProxy<_AttributeExtensions...>::injectMapMatchedFeedbackDataAsync(const LocIdlAPI::MapMatchingFeedbackData &_mmfData, InjectMapMatchedFeedbackDataAsyncCallback _callback, const CommonAPI::CallInfo *_info) {
|
||||
return delegate_->injectMapMatchedFeedbackDataAsync(_mmfData, _callback, _info);
|
||||
}
|
||||
|
||||
template <typename ... _AttributeExtensions>
|
||||
const CommonAPI::Address &LocIdlAPIProxy<_AttributeExtensions...>::getAddress() const {
|
||||
return delegate_->getAddress();
|
||||
}
|
||||
|
||||
template <typename ... _AttributeExtensions>
|
||||
bool LocIdlAPIProxy<_AttributeExtensions...>::isAvailable() const {
|
||||
return delegate_->isAvailable();
|
||||
}
|
||||
|
||||
template <typename ... _AttributeExtensions>
|
||||
bool LocIdlAPIProxy<_AttributeExtensions...>::isAvailableBlocking() const {
|
||||
return delegate_->isAvailableBlocking();
|
||||
}
|
||||
|
||||
template <typename ... _AttributeExtensions>
|
||||
CommonAPI::ProxyStatusEvent& LocIdlAPIProxy<_AttributeExtensions...>::getProxyStatusEvent() {
|
||||
return delegate_->getProxyStatusEvent();
|
||||
}
|
||||
|
||||
template <typename ... _AttributeExtensions>
|
||||
CommonAPI::InterfaceVersionAttribute& LocIdlAPIProxy<_AttributeExtensions...>::getInterfaceVersionAttribute() {
|
||||
return delegate_->getInterfaceVersionAttribute();
|
||||
}
|
||||
|
||||
|
||||
template <typename ... _AttributeExtensions>
|
||||
std::future<void> LocIdlAPIProxy<_AttributeExtensions...>::getCompletionFuture() {
|
||||
return delegate_->getCompletionFuture();
|
||||
}
|
||||
|
||||
} // namespace location
|
||||
} // namespace qti
|
||||
} // namespace qualcomm
|
||||
} // namespace com
|
||||
} // namespace v0
|
||||
|
||||
namespace CommonAPI {
|
||||
template<template<typename > class _AttributeExtension>
|
||||
struct DefaultAttributeProxyHelper< ::v0::com::qualcomm::qti::location::LocIdlAPIProxy,
|
||||
_AttributeExtension> {
|
||||
typedef typename ::v0::com::qualcomm::qti::location::LocIdlAPIProxy<
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPIExtensions::GnssCapabilitiesMaskAttributeExtension<_AttributeExtension>
|
||||
> class_t;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// Compatibility
|
||||
namespace v0_2 = v0;
|
||||
|
||||
#endif // V0_COM_QUALCOMM_QTI_LOCATION_Loc_Idl_API_PROXY_HPP_
|
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
* This file was generated by the CommonAPI Generators.
|
||||
* Used org.genivi.commonapi.core 3.2.0.v202012010850.
|
||||
* Used org.franca.core 0.13.1.201807231814.
|
||||
*
|
||||
* 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/.
|
||||
*/
|
||||
#ifndef V0_COM_QUALCOMM_QTI_LOCATION_Loc_Idl_API_PROXY_BASE_HPP_
|
||||
#define V0_COM_QUALCOMM_QTI_LOCATION_Loc_Idl_API_PROXY_BASE_HPP_
|
||||
|
||||
#include <v0/com/qualcomm/qti/location/LocIdlAPI.hpp>
|
||||
|
||||
|
||||
|
||||
#if !defined (COMMONAPI_INTERNAL_COMPILATION)
|
||||
#define COMMONAPI_INTERNAL_COMPILATION
|
||||
#define HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE
|
||||
#endif
|
||||
|
||||
#include <CommonAPI/Deployment.hpp>
|
||||
#include <CommonAPI/InputStream.hpp>
|
||||
#include <CommonAPI/OutputStream.hpp>
|
||||
#include <CommonAPI/Struct.hpp>
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
#include <CommonAPI/Attribute.hpp>
|
||||
#include <CommonAPI/Event.hpp>
|
||||
#include <CommonAPI/Proxy.hpp>
|
||||
#include <functional>
|
||||
#include <future>
|
||||
|
||||
#if defined (HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE)
|
||||
#undef COMMONAPI_INTERNAL_COMPILATION
|
||||
#undef HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE
|
||||
#endif
|
||||
|
||||
namespace v0 {
|
||||
namespace com {
|
||||
namespace qualcomm {
|
||||
namespace qti {
|
||||
namespace location {
|
||||
|
||||
class LocIdlAPIProxyBase
|
||||
: virtual public CommonAPI::Proxy {
|
||||
public:
|
||||
typedef CommonAPI::ObservableAttribute<uint32_t> GnssCapabilitiesMaskAttribute;
|
||||
typedef CommonAPI::Event<
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssMeasurements
|
||||
> GnssMeasurementsEvent;
|
||||
typedef CommonAPI::Event<
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocationReport
|
||||
> LocationReportEvent;
|
||||
typedef CommonAPI::Event<
|
||||
std::vector< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocationReport >
|
||||
> EngineLocationsEvent;
|
||||
typedef CommonAPI::Event<
|
||||
std::vector< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssSv >
|
||||
> GnssSvEvent;
|
||||
typedef CommonAPI::Event<
|
||||
uint64_t, std::string
|
||||
> GnssNmeaEvent;
|
||||
typedef CommonAPI::Event<
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocOutputEngineType, uint64_t, std::string
|
||||
> EngineNmeaEvent;
|
||||
typedef CommonAPI::Event<
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssData
|
||||
> GnssDataEvent;
|
||||
|
||||
typedef std::function<void(const CommonAPI::CallStatus&, const LocIdlAPI::IDLLocationResponse&)> StartPositionSessionAsyncCallback;
|
||||
typedef std::function<void(const CommonAPI::CallStatus&)> StopPositionSessionAsyncCallback;
|
||||
typedef std::function<void(const CommonAPI::CallStatus&, const LocIdlAPI::IDLLocationResponse&)> DeleteAidingDataAsyncCallback;
|
||||
typedef std::function<void(const CommonAPI::CallStatus&, const LocIdlAPI::IDLLocationResponse&)> ConfigConstellationsAsyncCallback;
|
||||
typedef std::function<void(const CommonAPI::CallStatus&, const LocIdlAPI::IDLLocationResponse&)> InjectMapMatchedFeedbackDataAsyncCallback;
|
||||
|
||||
virtual GnssCapabilitiesMaskAttribute& getGnssCapabilitiesMaskAttribute() = 0;
|
||||
virtual GnssMeasurementsEvent& getGnssMeasurementsEvent() = 0;
|
||||
virtual LocationReportEvent& getLocationReportEvent() = 0;
|
||||
virtual EngineLocationsEvent& getEngineLocationsEvent() = 0;
|
||||
virtual GnssSvEvent& getGnssSvEvent() = 0;
|
||||
virtual GnssNmeaEvent& getGnssNmeaEvent() = 0;
|
||||
virtual EngineNmeaEvent& getEngineNmeaEvent() = 0;
|
||||
virtual GnssDataEvent& getGnssDataEvent() = 0;
|
||||
virtual void startPositionSession(uint32_t _intervalInMs, uint32_t _gnssReportCallbackMask, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info = nullptr) = 0;
|
||||
virtual std::future<CommonAPI::CallStatus> startPositionSessionAsync(const uint32_t &_intervalInMs, const uint32_t &_gnssReportCallbackMask, StartPositionSessionAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0;
|
||||
virtual void startPositionSession(uint32_t _intervalInMs, uint32_t _locReqEngMask, uint32_t _engReportCallbackMask, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info = nullptr) = 0;
|
||||
virtual std::future<CommonAPI::CallStatus> startPositionSessionAsync(const uint32_t &_intervalInMs, const uint32_t &_locReqEngMask, const uint32_t &_engReportCallbackMask, StartPositionSessionAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0;
|
||||
virtual void stopPositionSession(CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info = nullptr) = 0;
|
||||
virtual std::future<CommonAPI::CallStatus> stopPositionSessionAsync(StopPositionSessionAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0;
|
||||
virtual void deleteAidingData(uint32_t _aidingDataMask, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info = nullptr) = 0;
|
||||
virtual std::future<CommonAPI::CallStatus> deleteAidingDataAsync(const uint32_t &_aidingDataMask, DeleteAidingDataAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0;
|
||||
virtual void configConstellations(std::vector< LocIdlAPI::IDLGnssSvIdInfo > _svList, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info = nullptr) = 0;
|
||||
virtual std::future<CommonAPI::CallStatus> configConstellationsAsync(const std::vector< LocIdlAPI::IDLGnssSvIdInfo > &_svList, ConfigConstellationsAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0;
|
||||
virtual void injectMapMatchedFeedbackData(LocIdlAPI::MapMatchingFeedbackData _mmfData, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info = nullptr) = 0;
|
||||
virtual std::future<CommonAPI::CallStatus> injectMapMatchedFeedbackDataAsync(const LocIdlAPI::MapMatchingFeedbackData &_mmfData, InjectMapMatchedFeedbackDataAsyncCallback _callback = nullptr, const CommonAPI::CallInfo *_info = nullptr) = 0;
|
||||
|
||||
virtual std::future<void> getCompletionFuture() = 0;
|
||||
};
|
||||
|
||||
} // namespace location
|
||||
} // namespace qti
|
||||
} // namespace qualcomm
|
||||
} // namespace com
|
||||
} // namespace v0
|
||||
|
||||
|
||||
// Compatibility
|
||||
namespace v0_2 = v0;
|
||||
|
||||
#endif // V0_COM_QUALCOMM_QTI_LOCATION_Loc_Idl_API_PROXY_BASE_HPP_
|
@@ -0,0 +1,256 @@
|
||||
/*
|
||||
* This file was generated by the CommonAPI Generators.
|
||||
* Used org.genivi.commonapi.core 3.2.0.v202012010850.
|
||||
* Used org.franca.core 0.13.1.201807231814.
|
||||
*
|
||||
* 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/.
|
||||
*/
|
||||
#ifndef V0_COM_QUALCOMM_QTI_LOCATION_Loc_Idl_API_STUB_HPP_
|
||||
#define V0_COM_QUALCOMM_QTI_LOCATION_Loc_Idl_API_STUB_HPP_
|
||||
|
||||
#include <functional>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
|
||||
|
||||
#include <v0/com/qualcomm/qti/location/LocIdlAPI.hpp>
|
||||
|
||||
#if !defined (COMMONAPI_INTERNAL_COMPILATION)
|
||||
#define COMMONAPI_INTERNAL_COMPILATION
|
||||
#define HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE
|
||||
#endif
|
||||
|
||||
#include <CommonAPI/Deployment.hpp>
|
||||
#include <CommonAPI/InputStream.hpp>
|
||||
#include <CommonAPI/OutputStream.hpp>
|
||||
#include <CommonAPI/Struct.hpp>
|
||||
#include <cstdint>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
#include <mutex>
|
||||
|
||||
#include <CommonAPI/Stub.hpp>
|
||||
|
||||
#if defined (HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE)
|
||||
#undef COMMONAPI_INTERNAL_COMPILATION
|
||||
#undef HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE
|
||||
#endif
|
||||
|
||||
namespace v0 {
|
||||
namespace com {
|
||||
namespace qualcomm {
|
||||
namespace qti {
|
||||
namespace location {
|
||||
|
||||
/**
|
||||
* Receives messages from remote and handles all dispatching of deserialized calls
|
||||
* to a stub for the service LocIdlAPI. Also provides means to send broadcasts
|
||||
* and attribute-changed-notifications of observable attributes as defined by this service.
|
||||
* An application developer should not need to bother with this class.
|
||||
*/
|
||||
class LocIdlAPIStubAdapter
|
||||
: public virtual CommonAPI::StubAdapter,
|
||||
public virtual LocIdlAPI {
|
||||
public:
|
||||
///Notifies all remote listeners about a change of value of the attribute gnssCapabilitiesMask.
|
||||
virtual void fireGnssCapabilitiesMaskAttributeChanged(const uint32_t &gnssCapabilitiesMask) = 0;
|
||||
/**
|
||||
* Sends a broadcast event for GnssMeasurements. Should not be called directly.
|
||||
* Instead, the "fire<broadcastName>Event" methods of the stub should be used.
|
||||
*/
|
||||
virtual void fireGnssMeasurementsEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssMeasurements &_gnssMeasurements) = 0;
|
||||
/**
|
||||
* Sends a broadcast event for LocationReport. Should not be called directly.
|
||||
* Instead, the "fire<broadcastName>Event" methods of the stub should be used.
|
||||
*/
|
||||
virtual void fireLocationReportEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocationReport &_locationReport) = 0;
|
||||
/**
|
||||
* Sends a broadcast event for EngineLocations. Should not be called directly.
|
||||
* Instead, the "fire<broadcastName>Event" methods of the stub should be used.
|
||||
*/
|
||||
virtual void fireEngineLocationsEvent(const std::vector< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocationReport > &_engLocations) = 0;
|
||||
/**
|
||||
* Sends a broadcast event for GnssSv. Should not be called directly.
|
||||
* Instead, the "fire<broadcastName>Event" methods of the stub should be used.
|
||||
*/
|
||||
virtual void fireGnssSvEvent(const std::vector< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssSv > &_gnssSvs) = 0;
|
||||
/**
|
||||
* Sends a broadcast event for GnssNmea. Should not be called directly.
|
||||
* Instead, the "fire<broadcastName>Event" methods of the stub should be used.
|
||||
*/
|
||||
virtual void fireGnssNmeaEvent(const uint64_t &_timestamp, const std::string &_nmea) = 0;
|
||||
/**
|
||||
* Sends a broadcast event for EngineNmea. Should not be called directly.
|
||||
* Instead, the "fire<broadcastName>Event" methods of the stub should be used.
|
||||
*/
|
||||
virtual void fireEngineNmeaEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocOutputEngineType &_engType, const uint64_t &_timestamp, const std::string &_nmea) = 0;
|
||||
/**
|
||||
* Sends a broadcast event for GnssData. Should not be called directly.
|
||||
* Instead, the "fire<broadcastName>Event" methods of the stub should be used.
|
||||
*/
|
||||
virtual void fireGnssDataEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssData &_gnssData) = 0;
|
||||
|
||||
|
||||
virtual void deactivateManagedInstances() = 0;
|
||||
|
||||
void lockGnssCapabilitiesMaskAttribute(bool _lockAccess) {
|
||||
if (_lockAccess) {
|
||||
gnssCapabilitiesMaskMutex_.lock();
|
||||
} else {
|
||||
gnssCapabilitiesMaskMutex_.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Defines properties for storing the ClientIds of clients / proxies that have
|
||||
* subscribed to the selective broadcasts
|
||||
*/
|
||||
std::recursive_mutex gnssCapabilitiesMaskMutex_;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* Defines the necessary callbacks to handle remote set events related to the attributes
|
||||
* defined in the IDL description for LocIdlAPI.
|
||||
* For each attribute two callbacks are defined:
|
||||
* - a verification callback that allows to verify the requested value and to prevent setting
|
||||
* e.g. an invalid value ("onRemoteSet<AttributeName>").
|
||||
* - an action callback to do local work after the attribute value has been changed
|
||||
* ("onRemote<AttributeName>Changed").
|
||||
*
|
||||
* This class and the one below are the ones an application developer needs to have
|
||||
* a look at if he wants to implement a service.
|
||||
*/
|
||||
class LocIdlAPIStubRemoteEvent
|
||||
{
|
||||
public:
|
||||
virtual ~LocIdlAPIStubRemoteEvent() { }
|
||||
|
||||
/// Verification callback for remote set requests on the attribute gnssCapabilitiesMask
|
||||
virtual bool onRemoteSetGnssCapabilitiesMaskAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _value) = 0;
|
||||
/// Action callback for remote set requests on the attribute gnssCapabilitiesMask
|
||||
virtual void onRemoteGnssCapabilitiesMaskAttributeChanged() = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* Defines the interface that must be implemented by any class that should provide
|
||||
* the service LocIdlAPI to remote clients.
|
||||
* This class and the one above are the ones an application developer needs to have
|
||||
* a look at if he wants to implement a service.
|
||||
*/
|
||||
class LocIdlAPIStub
|
||||
: public virtual CommonAPI::Stub<LocIdlAPIStubAdapter, LocIdlAPIStubRemoteEvent>
|
||||
{
|
||||
public:
|
||||
typedef std::function<void (LocIdlAPI::IDLLocationResponse _resp)> startPositionSessionReply_t;
|
||||
typedef std::function<void (LocIdlAPI::IDLLocationResponse _resp)> startPositionSession1Reply_t;
|
||||
typedef std::function<void ()> stopPositionSessionReply_t;
|
||||
typedef std::function<void (LocIdlAPI::IDLLocationResponse _resp)> deleteAidingDataReply_t;
|
||||
typedef std::function<void (LocIdlAPI::IDLLocationResponse _resp)> configConstellationsReply_t;
|
||||
typedef std::function<void (LocIdlAPI::IDLLocationResponse _resp)> injectMapMatchedFeedbackDataReply_t;
|
||||
|
||||
virtual ~LocIdlAPIStub() {}
|
||||
void lockInterfaceVersionAttribute(bool _lockAccess) { static_cast<void>(_lockAccess); }
|
||||
bool hasElement(const uint32_t _id) const {
|
||||
return (_id < 14);
|
||||
}
|
||||
virtual const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client) = 0;
|
||||
|
||||
/// Provides getter access to the attribute gnssCapabilitiesMask
|
||||
virtual const uint32_t &getGnssCapabilitiesMaskAttribute(const std::shared_ptr<CommonAPI::ClientId> _client) = 0;
|
||||
/// sets attribute with the given value and propagates it to the adapter
|
||||
virtual void fireGnssCapabilitiesMaskAttributeChanged(uint32_t _value) {
|
||||
auto stubAdapter = CommonAPI::Stub<LocIdlAPIStubAdapter, LocIdlAPIStubRemoteEvent>::stubAdapter_.lock();
|
||||
if (stubAdapter)
|
||||
stubAdapter->fireGnssCapabilitiesMaskAttributeChanged(_value);
|
||||
}
|
||||
void lockGnssCapabilitiesMaskAttribute(bool _lockAccess) {
|
||||
auto stubAdapter = CommonAPI::Stub<LocIdlAPIStubAdapter, LocIdlAPIStubRemoteEvent>::stubAdapter_.lock();
|
||||
if (stubAdapter)
|
||||
stubAdapter->lockGnssCapabilitiesMaskAttribute(_lockAccess);
|
||||
}
|
||||
/// Sends a broadcast event for GnssMeasurements.
|
||||
virtual void fireGnssMeasurementsEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssMeasurements &_gnssMeasurements) {
|
||||
auto stubAdapter = CommonAPI::Stub<LocIdlAPIStubAdapter, LocIdlAPIStubRemoteEvent>::stubAdapter_.lock();
|
||||
if (stubAdapter)
|
||||
stubAdapter->fireGnssMeasurementsEvent(_gnssMeasurements);
|
||||
}
|
||||
/// Sends a broadcast event for LocationReport.
|
||||
virtual void fireLocationReportEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocationReport &_locationReport) {
|
||||
auto stubAdapter = CommonAPI::Stub<LocIdlAPIStubAdapter, LocIdlAPIStubRemoteEvent>::stubAdapter_.lock();
|
||||
if (stubAdapter)
|
||||
stubAdapter->fireLocationReportEvent(_locationReport);
|
||||
}
|
||||
/// Sends a broadcast event for EngineLocations.
|
||||
virtual void fireEngineLocationsEvent(const std::vector< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocationReport > &_engLocations) {
|
||||
auto stubAdapter = CommonAPI::Stub<LocIdlAPIStubAdapter, LocIdlAPIStubRemoteEvent>::stubAdapter_.lock();
|
||||
if (stubAdapter)
|
||||
stubAdapter->fireEngineLocationsEvent(_engLocations);
|
||||
}
|
||||
/// Sends a broadcast event for GnssSv.
|
||||
virtual void fireGnssSvEvent(const std::vector< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssSv > &_gnssSvs) {
|
||||
auto stubAdapter = CommonAPI::Stub<LocIdlAPIStubAdapter, LocIdlAPIStubRemoteEvent>::stubAdapter_.lock();
|
||||
if (stubAdapter)
|
||||
stubAdapter->fireGnssSvEvent(_gnssSvs);
|
||||
}
|
||||
/// Sends a broadcast event for GnssNmea.
|
||||
virtual void fireGnssNmeaEvent(const uint64_t &_timestamp, const std::string &_nmea) {
|
||||
auto stubAdapter = CommonAPI::Stub<LocIdlAPIStubAdapter, LocIdlAPIStubRemoteEvent>::stubAdapter_.lock();
|
||||
if (stubAdapter)
|
||||
stubAdapter->fireGnssNmeaEvent(_timestamp, _nmea);
|
||||
}
|
||||
/// Sends a broadcast event for EngineNmea.
|
||||
virtual void fireEngineNmeaEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocOutputEngineType &_engType, const uint64_t &_timestamp, const std::string &_nmea) {
|
||||
auto stubAdapter = CommonAPI::Stub<LocIdlAPIStubAdapter, LocIdlAPIStubRemoteEvent>::stubAdapter_.lock();
|
||||
if (stubAdapter)
|
||||
stubAdapter->fireEngineNmeaEvent(_engType, _timestamp, _nmea);
|
||||
}
|
||||
/// Sends a broadcast event for GnssData.
|
||||
virtual void fireGnssDataEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssData &_gnssData) {
|
||||
auto stubAdapter = CommonAPI::Stub<LocIdlAPIStubAdapter, LocIdlAPIStubRemoteEvent>::stubAdapter_.lock();
|
||||
if (stubAdapter)
|
||||
stubAdapter->fireGnssDataEvent(_gnssData);
|
||||
}
|
||||
/// This is the method that will be called on remote calls on the method startPositionSession.
|
||||
virtual void startPositionSession(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _intervalInMs, uint32_t _gnssReportCallbackMask, startPositionSessionReply_t _reply) = 0;
|
||||
/// This is the method that will be called on remote calls on the method startPositionSession.
|
||||
virtual void startPositionSession(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _intervalInMs, uint32_t _locReqEngMask, uint32_t _engReportCallbackMask, startPositionSession1Reply_t _reply) = 0;
|
||||
/// This is the method that will be called on remote calls on the method stopPositionSession.
|
||||
virtual void stopPositionSession(const std::shared_ptr<CommonAPI::ClientId> _client, stopPositionSessionReply_t _reply) = 0;
|
||||
/// This is the method that will be called on remote calls on the method deleteAidingData.
|
||||
virtual void deleteAidingData(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _aidingDataMask, deleteAidingDataReply_t _reply) = 0;
|
||||
/// This is the method that will be called on remote calls on the method configConstellations.
|
||||
virtual void configConstellations(const std::shared_ptr<CommonAPI::ClientId> _client, std::vector< LocIdlAPI::IDLGnssSvIdInfo > _svList, configConstellationsReply_t _reply) = 0;
|
||||
/// This is the method that will be called on remote calls on the method injectMapMatchedFeedbackData.
|
||||
virtual void injectMapMatchedFeedbackData(const std::shared_ptr<CommonAPI::ClientId> _client, LocIdlAPI::MapMatchingFeedbackData _mmfData, injectMapMatchedFeedbackDataReply_t _reply) = 0;
|
||||
|
||||
|
||||
using CommonAPI::Stub<LocIdlAPIStubAdapter, LocIdlAPIStubRemoteEvent>::initStubAdapter;
|
||||
typedef CommonAPI::Stub<LocIdlAPIStubAdapter, LocIdlAPIStubRemoteEvent>::StubAdapterType StubAdapterType;
|
||||
typedef CommonAPI::Stub<LocIdlAPIStubAdapter, LocIdlAPIStubRemoteEvent>::RemoteEventHandlerType RemoteEventHandlerType;
|
||||
typedef LocIdlAPIStubRemoteEvent RemoteEventType;
|
||||
typedef LocIdlAPI StubInterface;
|
||||
virtual LocIdlAPIStubRemoteEvent* initStubAdapter(const std::shared_ptr<LocIdlAPIStubAdapter> &_stubAdapter){
|
||||
CommonAPI::Stub<LocIdlAPIStubAdapter, LocIdlAPIStubRemoteEvent>::stubAdapter_ = _stubAdapter;
|
||||
return mspLocIdlAPIStubRemoteEvent.get();
|
||||
}
|
||||
private:
|
||||
std::shared_ptr<LocIdlAPIStubRemoteEvent> mspLocIdlAPIStubRemoteEvent;
|
||||
};
|
||||
|
||||
} // namespace location
|
||||
} // namespace qti
|
||||
} // namespace qualcomm
|
||||
} // namespace com
|
||||
} // namespace v0
|
||||
|
||||
|
||||
// Compatibility
|
||||
namespace v0_2 = v0;
|
||||
|
||||
#endif // V0_COM_QUALCOMM_QTI_LOCATION_Loc_Idl_API_STUB_HPP_
|
@@ -0,0 +1,232 @@
|
||||
/*
|
||||
* This file was generated by the CommonAPI Generators.
|
||||
* Used org.genivi.commonapi.core 3.2.0.v202012010850.
|
||||
* Used org.franca.core 0.13.1.201807231814.
|
||||
*
|
||||
* 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/.
|
||||
*/
|
||||
#ifndef V0_COM_QUALCOMM_QTI_LOCATION_Loc_Idl_API_STUB_DEFAULT_HPP_
|
||||
#define V0_COM_QUALCOMM_QTI_LOCATION_Loc_Idl_API_STUB_DEFAULT_HPP_
|
||||
|
||||
|
||||
#include <CommonAPI/Export.hpp>
|
||||
|
||||
#include <v0/com/qualcomm/qti/location/LocIdlAPIStub.hpp>
|
||||
#include <cassert>
|
||||
#include <sstream>
|
||||
|
||||
# if defined(_MSC_VER)
|
||||
# if _MSC_VER >= 1300
|
||||
/*
|
||||
* Diamond inheritance is used for the CommonAPI::Proxy base class.
|
||||
* The Microsoft compiler put warning (C4250) using a desired c++ feature: "Delegating to a sister class"
|
||||
* A powerful technique that arises from using virtual inheritance is to delegate a method from a class in another class
|
||||
* by using a common abstract base class. This is also called cross delegation.
|
||||
*/
|
||||
# pragma warning( disable : 4250 )
|
||||
# endif
|
||||
# endif
|
||||
|
||||
namespace v0 {
|
||||
namespace com {
|
||||
namespace qualcomm {
|
||||
namespace qti {
|
||||
namespace location {
|
||||
|
||||
/**
|
||||
* Provides a default implementation for LocIdlAPIStubRemoteEvent and
|
||||
* LocIdlAPIStub. Method callbacks have an empty implementation,
|
||||
* remote set calls on attributes will always change the value of the attribute
|
||||
* to the one received.
|
||||
*
|
||||
* Override this stub if you only want to provide a subset of the functionality
|
||||
* that would be defined for this service, and/or if you do not need any non-default
|
||||
* behaviour.
|
||||
*/
|
||||
class COMMONAPI_EXPORT_CLASS_EXPLICIT LocIdlAPIStubDefault
|
||||
: public virtual LocIdlAPIStub {
|
||||
public:
|
||||
COMMONAPI_EXPORT LocIdlAPIStubDefault()
|
||||
: remoteEventHandler_(this),
|
||||
interfaceVersion_(LocIdlAPI::getInterfaceVersion()) {
|
||||
}
|
||||
|
||||
COMMONAPI_EXPORT const CommonAPI::Version& getInterfaceVersion(std::shared_ptr<CommonAPI::ClientId> _client) {
|
||||
(void)_client;
|
||||
return interfaceVersion_;
|
||||
}
|
||||
|
||||
COMMONAPI_EXPORT LocIdlAPIStubRemoteEvent* initStubAdapter(const std::shared_ptr< LocIdlAPIStubAdapter> &_adapter) {
|
||||
CommonAPI::Stub<LocIdlAPIStubAdapter, LocIdlAPIStubRemoteEvent>::stubAdapter_ = _adapter;
|
||||
return &remoteEventHandler_;
|
||||
}
|
||||
|
||||
COMMONAPI_EXPORT virtual const uint32_t &getGnssCapabilitiesMaskAttribute() {
|
||||
return gnssCapabilitiesMaskAttributeValue_;
|
||||
}
|
||||
COMMONAPI_EXPORT virtual const uint32_t &getGnssCapabilitiesMaskAttribute(const std::shared_ptr<CommonAPI::ClientId> _client) {
|
||||
(void)_client;
|
||||
return getGnssCapabilitiesMaskAttribute();
|
||||
}
|
||||
COMMONAPI_EXPORT virtual void setGnssCapabilitiesMaskAttribute(uint32_t _value) {
|
||||
const bool valueChanged = trySetGnssCapabilitiesMaskAttribute(std::move(_value));
|
||||
if (valueChanged) {
|
||||
fireGnssCapabilitiesMaskAttributeChanged(gnssCapabilitiesMaskAttributeValue_);
|
||||
}
|
||||
}
|
||||
COMMONAPI_EXPORT virtual void setGnssCapabilitiesMaskAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _value) {
|
||||
(void)_client;
|
||||
setGnssCapabilitiesMaskAttribute(_value);
|
||||
}
|
||||
COMMONAPI_EXPORT virtual void fireGnssMeasurementsEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssMeasurements &_gnssMeasurements) {
|
||||
LocIdlAPIStub::fireGnssMeasurementsEvent(_gnssMeasurements);
|
||||
}
|
||||
COMMONAPI_EXPORT virtual void fireLocationReportEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocationReport &_locationReport) {
|
||||
LocIdlAPIStub::fireLocationReportEvent(_locationReport);
|
||||
}
|
||||
COMMONAPI_EXPORT virtual void fireEngineLocationsEvent(const std::vector< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocationReport > &_engLocations) {
|
||||
LocIdlAPIStub::fireEngineLocationsEvent(_engLocations);
|
||||
}
|
||||
COMMONAPI_EXPORT virtual void fireGnssSvEvent(const std::vector< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssSv > &_gnssSvs) {
|
||||
LocIdlAPIStub::fireGnssSvEvent(_gnssSvs);
|
||||
}
|
||||
COMMONAPI_EXPORT virtual void fireGnssNmeaEvent(const uint64_t &_timestamp, const std::string &_nmea) {
|
||||
LocIdlAPIStub::fireGnssNmeaEvent(_timestamp, _nmea);
|
||||
}
|
||||
COMMONAPI_EXPORT virtual void fireEngineNmeaEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocOutputEngineType &_engType, const uint64_t &_timestamp, const std::string &_nmea) {
|
||||
if (!_engType.validate()) {
|
||||
return;
|
||||
}
|
||||
LocIdlAPIStub::fireEngineNmeaEvent(_engType, _timestamp, _nmea);
|
||||
}
|
||||
COMMONAPI_EXPORT virtual void fireGnssDataEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssData &_gnssData) {
|
||||
LocIdlAPIStub::fireGnssDataEvent(_gnssData);
|
||||
}
|
||||
COMMONAPI_EXPORT virtual void startPositionSession(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _intervalInMs, uint32_t _gnssReportCallbackMask, startPositionSessionReply_t _reply) {
|
||||
(void)_client;
|
||||
(void)_intervalInMs;
|
||||
(void)_gnssReportCallbackMask;
|
||||
LocIdlAPI::IDLLocationResponse resp = LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_UNKNOWN;
|
||||
if (!resp.validate()) {
|
||||
return;
|
||||
}
|
||||
_reply(resp);
|
||||
}
|
||||
COMMONAPI_EXPORT virtual void startPositionSession(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _intervalInMs, uint32_t _locReqEngMask, uint32_t _engReportCallbackMask, startPositionSession1Reply_t _reply) {
|
||||
(void)_client;
|
||||
(void)_intervalInMs;
|
||||
(void)_locReqEngMask;
|
||||
(void)_engReportCallbackMask;
|
||||
LocIdlAPI::IDLLocationResponse resp = LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_UNKNOWN;
|
||||
if (!resp.validate()) {
|
||||
return;
|
||||
}
|
||||
_reply(resp);
|
||||
}
|
||||
COMMONAPI_EXPORT virtual void stopPositionSession(const std::shared_ptr<CommonAPI::ClientId> _client, stopPositionSessionReply_t _reply) {
|
||||
(void)_client;
|
||||
_reply();
|
||||
}
|
||||
COMMONAPI_EXPORT virtual void deleteAidingData(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _aidingDataMask, deleteAidingDataReply_t _reply) {
|
||||
(void)_client;
|
||||
(void)_aidingDataMask;
|
||||
LocIdlAPI::IDLLocationResponse resp = LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_UNKNOWN;
|
||||
if (!resp.validate()) {
|
||||
return;
|
||||
}
|
||||
_reply(resp);
|
||||
}
|
||||
COMMONAPI_EXPORT virtual void configConstellations(const std::shared_ptr<CommonAPI::ClientId> _client, std::vector< LocIdlAPI::IDLGnssSvIdInfo > _svList, configConstellationsReply_t _reply) {
|
||||
(void)_client;
|
||||
(void)_svList;
|
||||
LocIdlAPI::IDLLocationResponse resp = LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_UNKNOWN;
|
||||
if (!resp.validate()) {
|
||||
return;
|
||||
}
|
||||
_reply(resp);
|
||||
}
|
||||
COMMONAPI_EXPORT virtual void injectMapMatchedFeedbackData(const std::shared_ptr<CommonAPI::ClientId> _client, LocIdlAPI::MapMatchingFeedbackData _mmfData, injectMapMatchedFeedbackDataReply_t _reply) {
|
||||
(void)_client;
|
||||
(void)_mmfData;
|
||||
LocIdlAPI::IDLLocationResponse resp = LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_UNKNOWN;
|
||||
if (!resp.validate()) {
|
||||
return;
|
||||
}
|
||||
_reply(resp);
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
COMMONAPI_EXPORT virtual bool trySetGnssCapabilitiesMaskAttribute(uint32_t _value) {
|
||||
if (!validateGnssCapabilitiesMaskAttributeRequestedValue(_value))
|
||||
return false;
|
||||
|
||||
bool valueChanged;
|
||||
std::shared_ptr<LocIdlAPIStubAdapter> stubAdapter = CommonAPI::Stub<LocIdlAPIStubAdapter, LocIdlAPIStubRemoteEvent>::stubAdapter_.lock();
|
||||
if(stubAdapter) {
|
||||
stubAdapter->lockGnssCapabilitiesMaskAttribute(true);
|
||||
valueChanged = (gnssCapabilitiesMaskAttributeValue_ != _value);
|
||||
gnssCapabilitiesMaskAttributeValue_ = std::move(_value);
|
||||
stubAdapter->lockGnssCapabilitiesMaskAttribute(false);
|
||||
} else {
|
||||
valueChanged = (gnssCapabilitiesMaskAttributeValue_ != _value);
|
||||
gnssCapabilitiesMaskAttributeValue_ = std::move(_value);
|
||||
}
|
||||
|
||||
return valueChanged;
|
||||
}
|
||||
COMMONAPI_EXPORT virtual bool validateGnssCapabilitiesMaskAttributeRequestedValue(const uint32_t &_value) {
|
||||
(void)_value;
|
||||
return true;
|
||||
}
|
||||
COMMONAPI_EXPORT virtual void onRemoteGnssCapabilitiesMaskAttributeChanged() {
|
||||
// No operation in default
|
||||
}
|
||||
class COMMONAPI_EXPORT_CLASS_EXPLICIT RemoteEventHandler: public virtual LocIdlAPIStubRemoteEvent {
|
||||
public:
|
||||
COMMONAPI_EXPORT RemoteEventHandler(LocIdlAPIStubDefault *_defaultStub)
|
||||
:
|
||||
defaultStub_(_defaultStub) {
|
||||
}
|
||||
|
||||
COMMONAPI_EXPORT virtual void onRemoteGnssCapabilitiesMaskAttributeChanged() {
|
||||
assert(defaultStub_ !=NULL);
|
||||
defaultStub_->onRemoteGnssCapabilitiesMaskAttributeChanged();
|
||||
}
|
||||
|
||||
COMMONAPI_EXPORT virtual bool onRemoteSetGnssCapabilitiesMaskAttribute(uint32_t _value) {
|
||||
assert(defaultStub_ !=NULL);
|
||||
return defaultStub_->trySetGnssCapabilitiesMaskAttribute(std::move(_value));
|
||||
}
|
||||
|
||||
COMMONAPI_EXPORT virtual bool onRemoteSetGnssCapabilitiesMaskAttribute(const std::shared_ptr<CommonAPI::ClientId> _client, uint32_t _value) {
|
||||
(void)_client;
|
||||
return onRemoteSetGnssCapabilitiesMaskAttribute(_value);
|
||||
}
|
||||
|
||||
private:
|
||||
LocIdlAPIStubDefault *defaultStub_;
|
||||
};
|
||||
protected:
|
||||
LocIdlAPIStubDefault::RemoteEventHandler remoteEventHandler_;
|
||||
|
||||
private:
|
||||
|
||||
uint32_t gnssCapabilitiesMaskAttributeValue_ {};
|
||||
|
||||
CommonAPI::Version interfaceVersion_;
|
||||
};
|
||||
|
||||
} // namespace location
|
||||
} // namespace qti
|
||||
} // namespace qualcomm
|
||||
} // namespace com
|
||||
} // namespace v0
|
||||
|
||||
|
||||
// Compatibility
|
||||
namespace v0_2 = v0;
|
||||
|
||||
#endif // V0_COM_QUALCOMM_QTI_LOCATION_Loc_Idl_API_STUB_DEFAULT
|
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* This file was generated by the CommonAPI Generators.
|
||||
* Used org.genivi.commonapi.someip 3.2.0.v202012010944.
|
||||
* Used org.franca.core 0.13.1.201807231814.
|
||||
*
|
||||
* 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/.
|
||||
*/
|
||||
#include <v0/com/qualcomm/qti/location/LocIdlAPISomeIPDeployment.hpp>
|
||||
|
||||
namespace v0 {
|
||||
namespace com {
|
||||
namespace qualcomm {
|
||||
namespace qti {
|
||||
namespace location {
|
||||
namespace LocIdlAPI_ {
|
||||
|
||||
// Type-specific deployments
|
||||
IDLGnssReportCbInfoMaskDeployment_t IDLGnssReportCbInfoMaskDeployment(32, false);
|
||||
IDLEngineReportCbMaskDeployment_t IDLEngineReportCbMaskDeployment(32, false);
|
||||
IDLLocationCapabilitiesMaskDeployment_t IDLLocationCapabilitiesMaskDeployment(64, false);
|
||||
IDLGnssSvOptionsMaskDeployment_t IDLGnssSvOptionsMaskDeployment(32, false);
|
||||
IDLLocationFlagsMaskDeployment_t IDLLocationFlagsMaskDeployment(32, false);
|
||||
IDLLocationTechnologyMaskDeployment_t IDLLocationTechnologyMaskDeployment(32, false);
|
||||
IDLLocationReportNavSolutionMaskDeployment_t IDLLocationReportNavSolutionMaskDeployment(32, false);
|
||||
IDLLocationReportPosDataMaskDeployment_t IDLLocationReportPosDataMaskDeployment(32, false);
|
||||
IDLGnssSignalTypeMaskDeployment_t IDLGnssSignalTypeMaskDeployment(64, false);
|
||||
IDLLocationResponseDeployment_t IDLLocationResponseDeployment(32, false);
|
||||
IDLGnssSvTypeDeployment_t IDLGnssSvTypeDeployment(32, false);
|
||||
IDLLCALocationInfoFlagMaskDeployment_t IDLLCALocationInfoFlagMaskDeployment(64, false);
|
||||
IDLLocationReliabilityDeployment_t IDLLocationReliabilityDeployment(32, false);
|
||||
IDLGnssSvSystemEnumTypeDeployment_t IDLGnssSvSystemEnumTypeDeployment(32, false);
|
||||
IDLGnssSystemTimeStructTypeFlagsDeployment_t IDLGnssSystemTimeStructTypeFlagsDeployment(32, false);
|
||||
IDLGnssGloTimeStructTypeFlagsDeployment_t IDLGnssGloTimeStructTypeFlagsDeployment(32, false);
|
||||
IDLDrCalibrationStatusMaskDeployment_t IDLDrCalibrationStatusMaskDeployment(64, false);
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSystemTimeDeployment_t IDLGnssSystemTimeDeployment(0, &::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvSystemEnumTypeDeployment, static_cast< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLSystemTimeStructUnionDeployment_t* >(nullptr));
|
||||
IDLLocReqEngineTypeMaskDeployment_t IDLLocReqEngineTypeMaskDeployment(32, false);
|
||||
IDLLocOutputEngineTypeDeployment_t IDLLocOutputEngineTypeDeployment(32, false);
|
||||
IDLPositioningEngineMaskDeployment_t IDLPositioningEngineMaskDeployment(32, false);
|
||||
IDLDrSolutionStatusMaskDeployment_t IDLDrSolutionStatusMaskDeployment(64, false);
|
||||
IDLLocSessionStatusDeployment_t IDLLocSessionStatusDeployment(32, false);
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationReportDeployment_t IDLLocationReportDeployment(0, static_cast< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationDeployment_t* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint64_t>* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint16_t>* >(nullptr), static_cast< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationReportSvUsedInPositionDeployment_t* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr), static_cast< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationReportPositionDynamicsDeployment_t* >(nullptr), &::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSystemTimeDeployment, static_cast< CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssMeasUsageInfoDeployment_t >* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint8_t>* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint8_t>* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint64_t>* >(nullptr), &::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocOutputEngineTypeDeployment, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLLAInfoDeployment_t* >(nullptr), static_cast< CommonAPI::SomeIP::ArrayDeployment< CommonAPI::EmptyDeployment >* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint64_t>* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::SomeIP::ArrayDeployment< CommonAPI::SomeIP::IntegerDeployment<uint16_t> >* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint64_t>* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint64_t>* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint64_t>* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<int16_t>* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint8_t>* >(nullptr));
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvDeployment_t IDLGnssSvDeployment(0, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint16_t>* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint16_t>* >(nullptr), &::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvTypeDeployment, static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr));
|
||||
IDLGnssDataMaskDeployment_t IDLGnssDataMaskDeployment(32, false);
|
||||
IDLGnssMeasurementsDataFlagsMaskDeployment_t IDLGnssMeasurementsDataFlagsMaskDeployment(32, false);
|
||||
IDLGnssMeasurementsStateMaskDeployment_t IDLGnssMeasurementsStateMaskDeployment(32, false);
|
||||
IDLGnssMeasurementsAdrStateMaskDeployment_t IDLGnssMeasurementsAdrStateMaskDeployment(32, false);
|
||||
IDLGnssMeasurementsMultipathIndicatorDeployment_t IDLGnssMeasurementsMultipathIndicatorDeployment(32, false);
|
||||
IDLGnssMeasurementsClockFlagsMaskDeployment_t IDLGnssMeasurementsClockFlagsMaskDeployment(32, false);
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssMeasurementsDataDeployment_t IDLGnssMeasurementsDataDeployment(0, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint16_t>* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint8_t>* >(nullptr), &::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvTypeDeployment, static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<int64_t>* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<int64_t>* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<int64_t>* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::EmptyDeployment* >(nullptr));
|
||||
CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssMeasurementsDataDeployment_t > IDLGnssMeasurements_measurementsDeployment(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssMeasurementsDataDeployment, 0, 0, 4);
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssMeasurementsDeployment_t IDLGnssMeasurementsDeployment(0, static_cast< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssMeasurementsClockDeployment_t* >(nullptr), &::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssMeasurements_measurementsDeployment, static_cast< CommonAPI::EmptyDeployment* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<int16_t>* >(nullptr));
|
||||
MapMatchingFeedbackDataValidityDeployment_t MapMatchingFeedbackDataValidityDeployment(64, false);
|
||||
|
||||
// Attribute-specific deployments
|
||||
|
||||
// Argument-specific deployment
|
||||
|
||||
// Broadcast-specific deployments
|
||||
CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationReportDeployment_t > EngineLocations_engLocationsDeployment(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationReportDeployment, 0, 0, 4);
|
||||
CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvDeployment_t > GnssSv_gnssSvsDeployment(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvDeployment, 0, 0, 4);
|
||||
|
||||
} // namespace LocIdlAPI_
|
||||
} // namespace location
|
||||
} // namespace qti
|
||||
} // namespace qualcomm
|
||||
} // namespace com
|
||||
} // namespace v0
|
@@ -0,0 +1,613 @@
|
||||
/*
|
||||
* This file was generated by the CommonAPI Generators.
|
||||
* Used org.genivi.commonapi.someip 3.2.0.v202012010944.
|
||||
* Used org.franca.core 0.13.1.201807231814.
|
||||
*
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
#ifndef V0_COM_QUALCOMM_QTI_LOCATION_Loc_Idl_API_SOMEIP_DEPLOYMENT_HPP_
|
||||
#define V0_COM_QUALCOMM_QTI_LOCATION_Loc_Idl_API_SOMEIP_DEPLOYMENT_HPP_
|
||||
|
||||
|
||||
#if !defined (COMMONAPI_INTERNAL_COMPILATION)
|
||||
#define COMMONAPI_INTERNAL_COMPILATION
|
||||
#define HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE
|
||||
#endif
|
||||
#include <CommonAPI/SomeIP/Deployment.hpp>
|
||||
#if defined (HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE)
|
||||
#undef COMMONAPI_INTERNAL_COMPILATION
|
||||
#undef HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE
|
||||
#endif
|
||||
|
||||
namespace v0 {
|
||||
namespace com {
|
||||
namespace qualcomm {
|
||||
namespace qti {
|
||||
namespace location {
|
||||
namespace LocIdlAPI_ {
|
||||
|
||||
// Interface-specific deployment types
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLGnssReportCbInfoMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLEngineReportCbMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLLocationCapabilitiesMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLGnssSvOptionsMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLLocationFlagsMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLLocationTechnologyMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLLocationReportNavSolutionMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLLocationReportPosDataMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLGnssSignalTypeMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLLocationResponseDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLGnssSvTypeDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLLCALocationInfoFlagMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLLocationReliabilityDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLGnssSvSystemEnumTypeDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLGnssSystemTimeStructTypeFlagsDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLGnssGloTimeStructTypeFlagsDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLDrCalibrationStatusMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLLocReqEngineTypeMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLLocOutputEngineTypeDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLPositioningEngineMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLDrSolutionStatusMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLLocSessionStatusDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLGnssSignalTypesDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLGnssDataMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLGnssMeasurementsDataFlagsMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLGnssMeasurementsStateMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLGnssMeasurementsAdrStateMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLGnssMeasurementsMultipathIndicatorDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLGnssMeasurementsClockFlagsMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLAidingDataDeletionMaskDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> IDLGnssConstellationTypeDeployment_t;
|
||||
typedef CommonAPI::SomeIP::EnumerationDeployment<uint8_t> MapMatchingFeedbackDataValidityDeployment_t;
|
||||
typedef CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>
|
||||
> IDLLocationReportSvUsedInPositionDeployment_t;
|
||||
typedef CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
> IDLGnssMeasUsageInfoDeployment_t;
|
||||
typedef CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment
|
||||
> IDLLocationReportPositionDynamicsDeployment_t;
|
||||
typedef CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
> IDLGnssSystemTimeStructTypeDeployment_t;
|
||||
typedef CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint8_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
> IDLGnssGloTimeStructTypeDeployment_t;
|
||||
typedef CommonAPI::SomeIP::VariantDeployment<
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint8_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>
|
||||
> IDLSystemTimeStructUnionDeployment_t;
|
||||
typedef CommonAPI::SomeIP::StructDeployment<
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvSystemEnumTypeDeployment_t,
|
||||
CommonAPI::SomeIP::VariantDeployment<
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint8_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>
|
||||
>
|
||||
> IDLGnssSystemTimeDeployment_t;
|
||||
typedef CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::EmptyDeployment
|
||||
> IDLLocationDeployment_t;
|
||||
typedef CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment
|
||||
> IDLLLAInfoDeployment_t;
|
||||
typedef CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::EmptyDeployment
|
||||
>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>
|
||||
>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment
|
||||
>,
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvSystemEnumTypeDeployment_t,
|
||||
CommonAPI::SomeIP::VariantDeployment<
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint8_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>
|
||||
>
|
||||
>,
|
||||
CommonAPI::SomeIP::ArrayDeployment<
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>
|
||||
>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint8_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint8_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocOutputEngineTypeDeployment_t,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment
|
||||
>,
|
||||
CommonAPI::SomeIP::ArrayDeployment<
|
||||
CommonAPI::EmptyDeployment
|
||||
>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::ArrayDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>
|
||||
>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<int16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint8_t>
|
||||
> IDLLocationReportDeployment_t;
|
||||
typedef CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvTypeDeployment_t,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment
|
||||
> IDLGnssSvDeployment_t;
|
||||
typedef CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::ArrayDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::SomeIP::ArrayDeployment<
|
||||
CommonAPI::EmptyDeployment
|
||||
>,
|
||||
CommonAPI::SomeIP::ArrayDeployment<
|
||||
CommonAPI::EmptyDeployment
|
||||
>
|
||||
> IDLGnssDataDeployment_t;
|
||||
typedef CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint8_t>,
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvTypeDeployment_t,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<int64_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<int64_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<int64_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment
|
||||
> IDLGnssMeasurementsDataDeployment_t;
|
||||
typedef CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<int16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<int64_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<int64_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>
|
||||
> IDLGnssMeasurementsClockDeployment_t;
|
||||
typedef CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<int16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<int64_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<int64_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>
|
||||
>,
|
||||
CommonAPI::SomeIP::ArrayDeployment<
|
||||
CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint16_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint8_t>,
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvTypeDeployment_t,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<int64_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<int64_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<int64_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment
|
||||
>
|
||||
>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::SomeIP::IntegerDeployment<int16_t>
|
||||
> IDLGnssMeasurementsDeployment_t;
|
||||
typedef CommonAPI::SomeIP::StructDeployment<
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssConstellationTypeDeployment_t,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
> IDLGnssSvIdInfoDeployment_t;
|
||||
typedef CommonAPI::SomeIP::StructDeployment<
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint64_t>,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment,
|
||||
CommonAPI::EmptyDeployment
|
||||
> MapMatchingFeedbackDataDeployment_t;
|
||||
|
||||
// Type-specific deployments
|
||||
COMMONAPI_EXPORT extern IDLGnssReportCbInfoMaskDeployment_t IDLGnssReportCbInfoMaskDeployment;
|
||||
COMMONAPI_EXPORT extern IDLEngineReportCbMaskDeployment_t IDLEngineReportCbMaskDeployment;
|
||||
COMMONAPI_EXPORT extern IDLLocationCapabilitiesMaskDeployment_t IDLLocationCapabilitiesMaskDeployment;
|
||||
COMMONAPI_EXPORT extern IDLGnssSvOptionsMaskDeployment_t IDLGnssSvOptionsMaskDeployment;
|
||||
COMMONAPI_EXPORT extern IDLLocationFlagsMaskDeployment_t IDLLocationFlagsMaskDeployment;
|
||||
COMMONAPI_EXPORT extern IDLLocationTechnologyMaskDeployment_t IDLLocationTechnologyMaskDeployment;
|
||||
COMMONAPI_EXPORT extern IDLLocationReportNavSolutionMaskDeployment_t IDLLocationReportNavSolutionMaskDeployment;
|
||||
COMMONAPI_EXPORT extern IDLLocationReportPosDataMaskDeployment_t IDLLocationReportPosDataMaskDeployment;
|
||||
COMMONAPI_EXPORT extern IDLGnssSignalTypeMaskDeployment_t IDLGnssSignalTypeMaskDeployment;
|
||||
COMMONAPI_EXPORT extern IDLLocationResponseDeployment_t IDLLocationResponseDeployment;
|
||||
COMMONAPI_EXPORT extern IDLGnssSvTypeDeployment_t IDLGnssSvTypeDeployment;
|
||||
COMMONAPI_EXPORT extern IDLLCALocationInfoFlagMaskDeployment_t IDLLCALocationInfoFlagMaskDeployment;
|
||||
COMMONAPI_EXPORT extern IDLLocationReliabilityDeployment_t IDLLocationReliabilityDeployment;
|
||||
COMMONAPI_EXPORT extern IDLGnssSvSystemEnumTypeDeployment_t IDLGnssSvSystemEnumTypeDeployment;
|
||||
COMMONAPI_EXPORT extern IDLGnssSystemTimeStructTypeFlagsDeployment_t IDLGnssSystemTimeStructTypeFlagsDeployment;
|
||||
COMMONAPI_EXPORT extern IDLGnssGloTimeStructTypeFlagsDeployment_t IDLGnssGloTimeStructTypeFlagsDeployment;
|
||||
COMMONAPI_EXPORT extern IDLDrCalibrationStatusMaskDeployment_t IDLDrCalibrationStatusMaskDeployment;
|
||||
COMMONAPI_EXPORT extern ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSystemTimeDeployment_t IDLGnssSystemTimeDeployment;
|
||||
COMMONAPI_EXPORT extern IDLLocReqEngineTypeMaskDeployment_t IDLLocReqEngineTypeMaskDeployment;
|
||||
COMMONAPI_EXPORT extern IDLLocOutputEngineTypeDeployment_t IDLLocOutputEngineTypeDeployment;
|
||||
COMMONAPI_EXPORT extern IDLPositioningEngineMaskDeployment_t IDLPositioningEngineMaskDeployment;
|
||||
COMMONAPI_EXPORT extern IDLDrSolutionStatusMaskDeployment_t IDLDrSolutionStatusMaskDeployment;
|
||||
COMMONAPI_EXPORT extern IDLLocSessionStatusDeployment_t IDLLocSessionStatusDeployment;
|
||||
COMMONAPI_EXPORT extern ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationReportDeployment_t IDLLocationReportDeployment;
|
||||
COMMONAPI_EXPORT extern ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvDeployment_t IDLGnssSvDeployment;
|
||||
COMMONAPI_EXPORT extern IDLGnssDataMaskDeployment_t IDLGnssDataMaskDeployment;
|
||||
COMMONAPI_EXPORT extern IDLGnssMeasurementsDataFlagsMaskDeployment_t IDLGnssMeasurementsDataFlagsMaskDeployment;
|
||||
COMMONAPI_EXPORT extern IDLGnssMeasurementsStateMaskDeployment_t IDLGnssMeasurementsStateMaskDeployment;
|
||||
COMMONAPI_EXPORT extern IDLGnssMeasurementsAdrStateMaskDeployment_t IDLGnssMeasurementsAdrStateMaskDeployment;
|
||||
COMMONAPI_EXPORT extern IDLGnssMeasurementsMultipathIndicatorDeployment_t IDLGnssMeasurementsMultipathIndicatorDeployment;
|
||||
COMMONAPI_EXPORT extern IDLGnssMeasurementsClockFlagsMaskDeployment_t IDLGnssMeasurementsClockFlagsMaskDeployment;
|
||||
COMMONAPI_EXPORT extern ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssMeasurementsDataDeployment_t IDLGnssMeasurementsDataDeployment;
|
||||
COMMONAPI_EXPORT extern CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssMeasurementsDataDeployment_t > IDLGnssMeasurements_measurementsDeployment;
|
||||
COMMONAPI_EXPORT extern ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssMeasurementsDeployment_t IDLGnssMeasurementsDeployment;
|
||||
COMMONAPI_EXPORT extern MapMatchingFeedbackDataValidityDeployment_t MapMatchingFeedbackDataValidityDeployment;
|
||||
|
||||
// Attribute-specific deployments
|
||||
|
||||
// Argument-specific deployment
|
||||
|
||||
// Broadcast-specific deployments
|
||||
COMMONAPI_EXPORT extern CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationReportDeployment_t > EngineLocations_engLocationsDeployment;
|
||||
COMMONAPI_EXPORT extern CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvDeployment_t > GnssSv_gnssSvsDeployment;
|
||||
|
||||
} // namespace LocIdlAPI_
|
||||
} // namespace location
|
||||
} // namespace qti
|
||||
} // namespace qualcomm
|
||||
} // namespace com
|
||||
} // namespace v0
|
||||
|
||||
#endif // V0_COM_QUALCOMM_QTI_LOCATION_Loc_Idl_API_SOMEIP_DEPLOYMENT_HPP_
|
@@ -0,0 +1,461 @@
|
||||
/*
|
||||
* This file was generated by the CommonAPI Generators.
|
||||
* Used org.genivi.commonapi.someip 3.2.0.v202012010944.
|
||||
* Used org.franca.core 0.13.1.201807231814.
|
||||
*
|
||||
* 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/.
|
||||
*/
|
||||
#include <v0/com/qualcomm/qti/location/LocIdlAPISomeIPProxy.hpp>
|
||||
|
||||
#if !defined (COMMONAPI_INTERNAL_COMPILATION)
|
||||
#define COMMONAPI_INTERNAL_COMPILATION
|
||||
#define HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE
|
||||
#endif
|
||||
|
||||
#include <CommonAPI/SomeIP/AddressTranslator.hpp>
|
||||
|
||||
#if defined (HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE)
|
||||
#undef COMMONAPI_INTERNAL_COMPILATION
|
||||
#undef HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE
|
||||
#endif
|
||||
|
||||
namespace v0 {
|
||||
namespace com {
|
||||
namespace qualcomm {
|
||||
namespace qti {
|
||||
namespace location {
|
||||
|
||||
std::shared_ptr<CommonAPI::SomeIP::Proxy> createLocIdlAPISomeIPProxy(
|
||||
const CommonAPI::SomeIP::Address &_address,
|
||||
const std::shared_ptr<CommonAPI::SomeIP::ProxyConnection> &_connection) {
|
||||
return std::make_shared< LocIdlAPISomeIPProxy>(_address, _connection);
|
||||
}
|
||||
|
||||
void initializeLocIdlAPISomeIPProxy() {
|
||||
CommonAPI::SomeIP::AddressTranslator::get()->insert(
|
||||
"local:com.qualcomm.qti.location.LocIdlAPI:v0_2:com.qualcomm.qti.location.LocIdlAPI",
|
||||
0xee00, 0x1, 0, 2);
|
||||
CommonAPI::SomeIP::Factory::get()->registerProxyCreateMethod(
|
||||
"com.qualcomm.qti.location.LocIdlAPI:v0_2",
|
||||
&createLocIdlAPISomeIPProxy);
|
||||
}
|
||||
|
||||
INITIALIZER(registerLocIdlAPISomeIPProxy) {
|
||||
CommonAPI::SomeIP::Factory::get()->registerInterface(initializeLocIdlAPISomeIPProxy);
|
||||
}
|
||||
|
||||
LocIdlAPISomeIPProxy::LocIdlAPISomeIPProxy(
|
||||
const CommonAPI::SomeIP::Address &_address,
|
||||
const std::shared_ptr<CommonAPI::SomeIP::ProxyConnection> &_connection)
|
||||
: CommonAPI::SomeIP::Proxy(_address, _connection),
|
||||
gnssCapabilitiesMask_(*this, CommonAPI::SomeIP::eventgroup_id_t(0x80e8), CommonAPI::SomeIP::event_id_t(0x80f2), CommonAPI::SomeIP::method_id_t(0xbb8), true, CommonAPI::SomeIP::reliability_type_e::RT_RELIABLE, false, CommonAPI::SomeIP::method_id_t(0xbb9), true, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr)),
|
||||
gnssMeasurements_(*this, 0x80e8, CommonAPI::SomeIP::event_id_t(0x80e9), CommonAPI::SomeIP::event_type_e::ET_EVENT , CommonAPI::SomeIP::reliability_type_e::RT_UNRELIABLE, false, std::make_tuple(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssMeasurementsDeployment)),
|
||||
locationReport_(*this, 0x80e8, CommonAPI::SomeIP::event_id_t(0x80ea), CommonAPI::SomeIP::event_type_e::ET_EVENT , CommonAPI::SomeIP::reliability_type_e::RT_UNRELIABLE, false, std::make_tuple(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationReportDeployment)),
|
||||
engineLocations_(*this, 0x80e8, CommonAPI::SomeIP::event_id_t(0x80eb), CommonAPI::SomeIP::event_type_e::ET_EVENT , CommonAPI::SomeIP::reliability_type_e::RT_UNRELIABLE, false, std::make_tuple(&::v0::com::qualcomm::qti::location::LocIdlAPI_::EngineLocations_engLocationsDeployment)),
|
||||
gnssSv_(*this, 0x80e8, CommonAPI::SomeIP::event_id_t(0x80ec), CommonAPI::SomeIP::event_type_e::ET_EVENT , CommonAPI::SomeIP::reliability_type_e::RT_UNRELIABLE, false, std::make_tuple(&::v0::com::qualcomm::qti::location::LocIdlAPI_::GnssSv_gnssSvsDeployment)),
|
||||
gnssNmea_(*this, 0x80e8, CommonAPI::SomeIP::event_id_t(0x80ed), CommonAPI::SomeIP::event_type_e::ET_EVENT , CommonAPI::SomeIP::reliability_type_e::RT_UNRELIABLE, false, std::make_tuple(static_cast< CommonAPI::SomeIP::IntegerDeployment<uint64_t>* >(nullptr), static_cast< CommonAPI::SomeIP::StringDeployment* >(nullptr))),
|
||||
engineNmea_(*this, 0x80e8, CommonAPI::SomeIP::event_id_t(0x80ee), CommonAPI::SomeIP::event_type_e::ET_EVENT , CommonAPI::SomeIP::reliability_type_e::RT_UNRELIABLE, false, std::make_tuple(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocOutputEngineTypeDeployment, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint64_t>* >(nullptr), static_cast< CommonAPI::SomeIP::StringDeployment* >(nullptr))),
|
||||
gnssData_(*this, 0x80e8, CommonAPI::SomeIP::event_id_t(0x80ef), CommonAPI::SomeIP::event_type_e::ET_EVENT , CommonAPI::SomeIP::reliability_type_e::RT_UNRELIABLE, false, std::make_tuple(static_cast< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssDataDeployment_t* >(nullptr)))
|
||||
{
|
||||
}
|
||||
|
||||
LocIdlAPISomeIPProxy::~LocIdlAPISomeIPProxy() {
|
||||
completed_.set_value();
|
||||
}
|
||||
|
||||
LocIdlAPISomeIPProxy::GnssCapabilitiesMaskAttribute& LocIdlAPISomeIPProxy::getGnssCapabilitiesMaskAttribute() {
|
||||
return gnssCapabilitiesMask_;
|
||||
}
|
||||
|
||||
LocIdlAPISomeIPProxy::GnssMeasurementsEvent& LocIdlAPISomeIPProxy::getGnssMeasurementsEvent() {
|
||||
return gnssMeasurements_;
|
||||
}
|
||||
LocIdlAPISomeIPProxy::LocationReportEvent& LocIdlAPISomeIPProxy::getLocationReportEvent() {
|
||||
return locationReport_;
|
||||
}
|
||||
LocIdlAPISomeIPProxy::EngineLocationsEvent& LocIdlAPISomeIPProxy::getEngineLocationsEvent() {
|
||||
return engineLocations_;
|
||||
}
|
||||
LocIdlAPISomeIPProxy::GnssSvEvent& LocIdlAPISomeIPProxy::getGnssSvEvent() {
|
||||
return gnssSv_;
|
||||
}
|
||||
LocIdlAPISomeIPProxy::GnssNmeaEvent& LocIdlAPISomeIPProxy::getGnssNmeaEvent() {
|
||||
return gnssNmea_;
|
||||
}
|
||||
LocIdlAPISomeIPProxy::EngineNmeaEvent& LocIdlAPISomeIPProxy::getEngineNmeaEvent() {
|
||||
return engineNmea_;
|
||||
}
|
||||
LocIdlAPISomeIPProxy::GnssDataEvent& LocIdlAPISomeIPProxy::getGnssDataEvent() {
|
||||
return gnssData_;
|
||||
}
|
||||
|
||||
void LocIdlAPISomeIPProxy::startPositionSession(uint32_t _intervalInMs, uint32_t _gnssReportCallbackMask, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info) {
|
||||
CommonAPI::Deployable< uint32_t, CommonAPI::SomeIP::IntegerDeployment<uint32_t>> deploy_intervalInMs(_intervalInMs, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr));
|
||||
CommonAPI::Deployable< uint32_t, CommonAPI::SomeIP::IntegerDeployment<uint32_t>> deploy_gnssReportCallbackMask(_gnssReportCallbackMask, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr));
|
||||
CommonAPI::Deployable< LocIdlAPI::IDLLocationResponse, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t> deploy_resp(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment);
|
||||
CommonAPI::SomeIP::ProxyHelper<
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
uint32_t,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::Deployable<
|
||||
uint32_t,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>
|
||||
>,
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
LocIdlAPI::IDLLocationResponse,
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t
|
||||
>
|
||||
>
|
||||
>::callMethodWithReply(
|
||||
*this,
|
||||
CommonAPI::SomeIP::method_id_t(0x7d01),
|
||||
true,
|
||||
false,
|
||||
(_info ? _info : &CommonAPI::SomeIP::defaultCallInfo),
|
||||
deploy_intervalInMs, deploy_gnssReportCallbackMask,
|
||||
_internalCallStatus,
|
||||
deploy_resp);
|
||||
_resp = deploy_resp.getValue();
|
||||
}
|
||||
|
||||
std::future<CommonAPI::CallStatus> LocIdlAPISomeIPProxy::startPositionSessionAsync(const uint32_t &_intervalInMs, const uint32_t &_gnssReportCallbackMask, StartPositionSessionAsyncCallback _callback, const CommonAPI::CallInfo *_info) {
|
||||
CommonAPI::Deployable< uint32_t, CommonAPI::SomeIP::IntegerDeployment<uint32_t>> deploy_intervalInMs(_intervalInMs, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr));
|
||||
CommonAPI::Deployable< uint32_t, CommonAPI::SomeIP::IntegerDeployment<uint32_t>> deploy_gnssReportCallbackMask(_gnssReportCallbackMask, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr));
|
||||
CommonAPI::Deployable< LocIdlAPI::IDLLocationResponse, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t> deploy_resp(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment);
|
||||
return CommonAPI::SomeIP::ProxyHelper<
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
uint32_t,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::Deployable<
|
||||
uint32_t,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>
|
||||
>,
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
LocIdlAPI::IDLLocationResponse,
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t
|
||||
>
|
||||
>
|
||||
>::callMethodAsync(
|
||||
*this,
|
||||
CommonAPI::SomeIP::method_id_t(0x7d01),
|
||||
true,
|
||||
false,
|
||||
(_info ? _info : &CommonAPI::SomeIP::defaultCallInfo),
|
||||
deploy_intervalInMs, deploy_gnssReportCallbackMask,
|
||||
[_callback] (CommonAPI::CallStatus _internalCallStatus, CommonAPI::Deployable< LocIdlAPI::IDLLocationResponse, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t > _resp) {
|
||||
if (_callback)
|
||||
_callback(_internalCallStatus, _resp.getValue());
|
||||
},
|
||||
std::make_tuple(deploy_resp));
|
||||
}
|
||||
|
||||
void LocIdlAPISomeIPProxy::startPositionSession(uint32_t _intervalInMs, uint32_t _locReqEngMask, uint32_t _engReportCallbackMask, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info) {
|
||||
CommonAPI::Deployable< uint32_t, CommonAPI::SomeIP::IntegerDeployment<uint32_t>> deploy_intervalInMs(_intervalInMs, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr));
|
||||
CommonAPI::Deployable< uint32_t, CommonAPI::SomeIP::IntegerDeployment<uint32_t>> deploy_locReqEngMask(_locReqEngMask, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr));
|
||||
CommonAPI::Deployable< uint32_t, CommonAPI::SomeIP::IntegerDeployment<uint32_t>> deploy_engReportCallbackMask(_engReportCallbackMask, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr));
|
||||
CommonAPI::Deployable< LocIdlAPI::IDLLocationResponse, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t> deploy_resp(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment);
|
||||
CommonAPI::SomeIP::ProxyHelper<
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
uint32_t,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::Deployable<
|
||||
uint32_t,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::Deployable<
|
||||
uint32_t,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>
|
||||
>,
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
LocIdlAPI::IDLLocationResponse,
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t
|
||||
>
|
||||
>
|
||||
>::callMethodWithReply(
|
||||
*this,
|
||||
CommonAPI::SomeIP::method_id_t(0x7d02),
|
||||
true,
|
||||
false,
|
||||
(_info ? _info : &CommonAPI::SomeIP::defaultCallInfo),
|
||||
deploy_intervalInMs, deploy_locReqEngMask, deploy_engReportCallbackMask,
|
||||
_internalCallStatus,
|
||||
deploy_resp);
|
||||
_resp = deploy_resp.getValue();
|
||||
}
|
||||
|
||||
std::future<CommonAPI::CallStatus> LocIdlAPISomeIPProxy::startPositionSessionAsync(const uint32_t &_intervalInMs, const uint32_t &_locReqEngMask, const uint32_t &_engReportCallbackMask, StartPositionSessionAsyncCallback _callback, const CommonAPI::CallInfo *_info) {
|
||||
CommonAPI::Deployable< uint32_t, CommonAPI::SomeIP::IntegerDeployment<uint32_t>> deploy_intervalInMs(_intervalInMs, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr));
|
||||
CommonAPI::Deployable< uint32_t, CommonAPI::SomeIP::IntegerDeployment<uint32_t>> deploy_locReqEngMask(_locReqEngMask, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr));
|
||||
CommonAPI::Deployable< uint32_t, CommonAPI::SomeIP::IntegerDeployment<uint32_t>> deploy_engReportCallbackMask(_engReportCallbackMask, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr));
|
||||
CommonAPI::Deployable< LocIdlAPI::IDLLocationResponse, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t> deploy_resp(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment);
|
||||
return CommonAPI::SomeIP::ProxyHelper<
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
uint32_t,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::Deployable<
|
||||
uint32_t,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>,
|
||||
CommonAPI::Deployable<
|
||||
uint32_t,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>
|
||||
>,
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
LocIdlAPI::IDLLocationResponse,
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t
|
||||
>
|
||||
>
|
||||
>::callMethodAsync(
|
||||
*this,
|
||||
CommonAPI::SomeIP::method_id_t(0x7d02),
|
||||
true,
|
||||
false,
|
||||
(_info ? _info : &CommonAPI::SomeIP::defaultCallInfo),
|
||||
deploy_intervalInMs, deploy_locReqEngMask, deploy_engReportCallbackMask,
|
||||
[_callback] (CommonAPI::CallStatus _internalCallStatus, CommonAPI::Deployable< LocIdlAPI::IDLLocationResponse, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t > _resp) {
|
||||
if (_callback)
|
||||
_callback(_internalCallStatus, _resp.getValue());
|
||||
},
|
||||
std::make_tuple(deploy_resp));
|
||||
}
|
||||
|
||||
void LocIdlAPISomeIPProxy::stopPositionSession(CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info) {
|
||||
CommonAPI::SomeIP::ProxyHelper<
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
>,
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
>
|
||||
>::callMethodWithReply(
|
||||
*this,
|
||||
CommonAPI::SomeIP::method_id_t(0x7d03),
|
||||
false,
|
||||
false,
|
||||
(_info ? _info : &CommonAPI::SomeIP::defaultCallInfo),
|
||||
_internalCallStatus);
|
||||
}
|
||||
|
||||
std::future<CommonAPI::CallStatus> LocIdlAPISomeIPProxy::stopPositionSessionAsync(StopPositionSessionAsyncCallback _callback, const CommonAPI::CallInfo *_info) {
|
||||
return CommonAPI::SomeIP::ProxyHelper<
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
>,
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
>
|
||||
>::callMethodAsync(
|
||||
*this,
|
||||
CommonAPI::SomeIP::method_id_t(0x7d03),
|
||||
false,
|
||||
false,
|
||||
(_info ? _info : &CommonAPI::SomeIP::defaultCallInfo),
|
||||
[_callback] (CommonAPI::CallStatus _internalCallStatus) {
|
||||
if (_callback)
|
||||
_callback(_internalCallStatus);
|
||||
},
|
||||
std::make_tuple());
|
||||
}
|
||||
|
||||
void LocIdlAPISomeIPProxy::deleteAidingData(uint32_t _aidingDataMask, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info) {
|
||||
CommonAPI::Deployable< uint32_t, CommonAPI::SomeIP::IntegerDeployment<uint32_t>> deploy_aidingDataMask(_aidingDataMask, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr));
|
||||
CommonAPI::Deployable< LocIdlAPI::IDLLocationResponse, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t> deploy_resp(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment);
|
||||
CommonAPI::SomeIP::ProxyHelper<
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
uint32_t,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>
|
||||
>,
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
LocIdlAPI::IDLLocationResponse,
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t
|
||||
>
|
||||
>
|
||||
>::callMethodWithReply(
|
||||
*this,
|
||||
CommonAPI::SomeIP::method_id_t(0x7d04),
|
||||
true,
|
||||
false,
|
||||
(_info ? _info : &CommonAPI::SomeIP::defaultCallInfo),
|
||||
deploy_aidingDataMask,
|
||||
_internalCallStatus,
|
||||
deploy_resp);
|
||||
_resp = deploy_resp.getValue();
|
||||
}
|
||||
|
||||
std::future<CommonAPI::CallStatus> LocIdlAPISomeIPProxy::deleteAidingDataAsync(const uint32_t &_aidingDataMask, DeleteAidingDataAsyncCallback _callback, const CommonAPI::CallInfo *_info) {
|
||||
CommonAPI::Deployable< uint32_t, CommonAPI::SomeIP::IntegerDeployment<uint32_t>> deploy_aidingDataMask(_aidingDataMask, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr));
|
||||
CommonAPI::Deployable< LocIdlAPI::IDLLocationResponse, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t> deploy_resp(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment);
|
||||
return CommonAPI::SomeIP::ProxyHelper<
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
uint32_t,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>
|
||||
>,
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
LocIdlAPI::IDLLocationResponse,
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t
|
||||
>
|
||||
>
|
||||
>::callMethodAsync(
|
||||
*this,
|
||||
CommonAPI::SomeIP::method_id_t(0x7d04),
|
||||
true,
|
||||
false,
|
||||
(_info ? _info : &CommonAPI::SomeIP::defaultCallInfo),
|
||||
deploy_aidingDataMask,
|
||||
[_callback] (CommonAPI::CallStatus _internalCallStatus, CommonAPI::Deployable< LocIdlAPI::IDLLocationResponse, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t > _resp) {
|
||||
if (_callback)
|
||||
_callback(_internalCallStatus, _resp.getValue());
|
||||
},
|
||||
std::make_tuple(deploy_resp));
|
||||
}
|
||||
|
||||
void LocIdlAPISomeIPProxy::configConstellations(std::vector< LocIdlAPI::IDLGnssSvIdInfo > _svList, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info) {
|
||||
CommonAPI::Deployable< std::vector< LocIdlAPI::IDLGnssSvIdInfo >, CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvIdInfoDeployment_t >> deploy_svList(_svList, static_cast< CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvIdInfoDeployment_t >* >(nullptr));
|
||||
CommonAPI::Deployable< LocIdlAPI::IDLLocationResponse, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t> deploy_resp(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment);
|
||||
CommonAPI::SomeIP::ProxyHelper<
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
std::vector< LocIdlAPI::IDLGnssSvIdInfo >,
|
||||
CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvIdInfoDeployment_t >
|
||||
>
|
||||
>,
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
LocIdlAPI::IDLLocationResponse,
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t
|
||||
>
|
||||
>
|
||||
>::callMethodWithReply(
|
||||
*this,
|
||||
CommonAPI::SomeIP::method_id_t(0x7d05),
|
||||
true,
|
||||
false,
|
||||
(_info ? _info : &CommonAPI::SomeIP::defaultCallInfo),
|
||||
deploy_svList,
|
||||
_internalCallStatus,
|
||||
deploy_resp);
|
||||
_resp = deploy_resp.getValue();
|
||||
}
|
||||
|
||||
std::future<CommonAPI::CallStatus> LocIdlAPISomeIPProxy::configConstellationsAsync(const std::vector< LocIdlAPI::IDLGnssSvIdInfo > &_svList, ConfigConstellationsAsyncCallback _callback, const CommonAPI::CallInfo *_info) {
|
||||
CommonAPI::Deployable< std::vector< LocIdlAPI::IDLGnssSvIdInfo >, CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvIdInfoDeployment_t >> deploy_svList(_svList, static_cast< CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvIdInfoDeployment_t >* >(nullptr));
|
||||
CommonAPI::Deployable< LocIdlAPI::IDLLocationResponse, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t> deploy_resp(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment);
|
||||
return CommonAPI::SomeIP::ProxyHelper<
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
std::vector< LocIdlAPI::IDLGnssSvIdInfo >,
|
||||
CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvIdInfoDeployment_t >
|
||||
>
|
||||
>,
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
LocIdlAPI::IDLLocationResponse,
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t
|
||||
>
|
||||
>
|
||||
>::callMethodAsync(
|
||||
*this,
|
||||
CommonAPI::SomeIP::method_id_t(0x7d05),
|
||||
true,
|
||||
false,
|
||||
(_info ? _info : &CommonAPI::SomeIP::defaultCallInfo),
|
||||
deploy_svList,
|
||||
[_callback] (CommonAPI::CallStatus _internalCallStatus, CommonAPI::Deployable< LocIdlAPI::IDLLocationResponse, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t > _resp) {
|
||||
if (_callback)
|
||||
_callback(_internalCallStatus, _resp.getValue());
|
||||
},
|
||||
std::make_tuple(deploy_resp));
|
||||
}
|
||||
|
||||
void LocIdlAPISomeIPProxy::injectMapMatchedFeedbackData(LocIdlAPI::MapMatchingFeedbackData _mmfData, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info) {
|
||||
CommonAPI::Deployable< LocIdlAPI::MapMatchingFeedbackData, ::v0::com::qualcomm::qti::location::LocIdlAPI_::MapMatchingFeedbackDataDeployment_t> deploy_mmfData(_mmfData, static_cast< ::v0::com::qualcomm::qti::location::LocIdlAPI_::MapMatchingFeedbackDataDeployment_t* >(nullptr));
|
||||
CommonAPI::Deployable< LocIdlAPI::IDLLocationResponse, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t> deploy_resp(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment);
|
||||
CommonAPI::SomeIP::ProxyHelper<
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
LocIdlAPI::MapMatchingFeedbackData,
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::MapMatchingFeedbackDataDeployment_t
|
||||
>
|
||||
>,
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
LocIdlAPI::IDLLocationResponse,
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t
|
||||
>
|
||||
>
|
||||
>::callMethodWithReply(
|
||||
*this,
|
||||
CommonAPI::SomeIP::method_id_t(0x7d06),
|
||||
true,
|
||||
false,
|
||||
(_info ? _info : &CommonAPI::SomeIP::defaultCallInfo),
|
||||
deploy_mmfData,
|
||||
_internalCallStatus,
|
||||
deploy_resp);
|
||||
_resp = deploy_resp.getValue();
|
||||
}
|
||||
|
||||
std::future<CommonAPI::CallStatus> LocIdlAPISomeIPProxy::injectMapMatchedFeedbackDataAsync(const LocIdlAPI::MapMatchingFeedbackData &_mmfData, InjectMapMatchedFeedbackDataAsyncCallback _callback, const CommonAPI::CallInfo *_info) {
|
||||
CommonAPI::Deployable< LocIdlAPI::MapMatchingFeedbackData, ::v0::com::qualcomm::qti::location::LocIdlAPI_::MapMatchingFeedbackDataDeployment_t> deploy_mmfData(_mmfData, static_cast< ::v0::com::qualcomm::qti::location::LocIdlAPI_::MapMatchingFeedbackDataDeployment_t* >(nullptr));
|
||||
CommonAPI::Deployable< LocIdlAPI::IDLLocationResponse, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t> deploy_resp(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment);
|
||||
return CommonAPI::SomeIP::ProxyHelper<
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
LocIdlAPI::MapMatchingFeedbackData,
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::MapMatchingFeedbackDataDeployment_t
|
||||
>
|
||||
>,
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
LocIdlAPI::IDLLocationResponse,
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t
|
||||
>
|
||||
>
|
||||
>::callMethodAsync(
|
||||
*this,
|
||||
CommonAPI::SomeIP::method_id_t(0x7d06),
|
||||
true,
|
||||
false,
|
||||
(_info ? _info : &CommonAPI::SomeIP::defaultCallInfo),
|
||||
deploy_mmfData,
|
||||
[_callback] (CommonAPI::CallStatus _internalCallStatus, CommonAPI::Deployable< LocIdlAPI::IDLLocationResponse, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t > _resp) {
|
||||
if (_callback)
|
||||
_callback(_internalCallStatus, _resp.getValue());
|
||||
},
|
||||
std::make_tuple(deploy_resp));
|
||||
}
|
||||
|
||||
void LocIdlAPISomeIPProxy::getOwnVersion(uint16_t& ownVersionMajor, uint16_t& ownVersionMinor) const {
|
||||
ownVersionMajor = 0;
|
||||
ownVersionMinor = 2;
|
||||
}
|
||||
|
||||
std::future<void> LocIdlAPISomeIPProxy::getCompletionFuture() {
|
||||
return completed_.get_future();
|
||||
}
|
||||
|
||||
} // namespace location
|
||||
} // namespace qti
|
||||
} // namespace qualcomm
|
||||
} // namespace com
|
||||
} // namespace v0
|
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
* This file was generated by the CommonAPI Generators.
|
||||
* Used org.genivi.commonapi.someip 3.2.0.v202012010944.
|
||||
* Used org.franca.core 0.13.1.201807231814.
|
||||
*
|
||||
* 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/.
|
||||
*/
|
||||
#ifndef V0_COM_QUALCOMM_QTI_LOCATION_LOC_IDL_API_SOMEIP_PROXY_HPP_
|
||||
#define V0_COM_QUALCOMM_QTI_LOCATION_LOC_IDL_API_SOMEIP_PROXY_HPP_
|
||||
|
||||
#include <v0/com/qualcomm/qti/location/LocIdlAPIProxyBase.hpp>
|
||||
#include <v0/com/qualcomm/qti/location/LocIdlAPISomeIPDeployment.hpp>
|
||||
|
||||
#if !defined (COMMONAPI_INTERNAL_COMPILATION)
|
||||
#define COMMONAPI_INTERNAL_COMPILATION
|
||||
#define HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE
|
||||
#endif
|
||||
|
||||
#include <CommonAPI/SomeIP/Factory.hpp>
|
||||
#include <CommonAPI/SomeIP/Proxy.hpp>
|
||||
#include <CommonAPI/SomeIP/Types.hpp>
|
||||
#include <CommonAPI/SomeIP/Attribute.hpp>
|
||||
#include <CommonAPI/SomeIP/Event.hpp>
|
||||
|
||||
#if defined (HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE)
|
||||
#undef COMMONAPI_INTERNAL_COMPILATION
|
||||
#undef HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
# if defined(_MSC_VER)
|
||||
# if _MSC_VER >= 1300
|
||||
/*
|
||||
* Diamond inheritance is used for the CommonAPI::Proxy base class.
|
||||
* The Microsoft compiler put warning (C4250) using a desired c++ feature: "Delegating to a sister class"
|
||||
* A powerful technique that arises from using virtual inheritance is to delegate a method from a class in another class
|
||||
* by using a common abstract base class. This is also called cross delegation.
|
||||
*/
|
||||
# pragma warning( disable : 4250 )
|
||||
# endif
|
||||
# endif
|
||||
|
||||
namespace v0 {
|
||||
namespace com {
|
||||
namespace qualcomm {
|
||||
namespace qti {
|
||||
namespace location {
|
||||
|
||||
class LocIdlAPISomeIPProxy
|
||||
: virtual public LocIdlAPIProxyBase,
|
||||
virtual public CommonAPI::SomeIP::Proxy {
|
||||
public:
|
||||
LocIdlAPISomeIPProxy(
|
||||
const CommonAPI::SomeIP::Address &_address,
|
||||
const std::shared_ptr<CommonAPI::SomeIP::ProxyConnection> &_connection);
|
||||
|
||||
virtual ~LocIdlAPISomeIPProxy();
|
||||
|
||||
virtual GnssCapabilitiesMaskAttribute& getGnssCapabilitiesMaskAttribute();
|
||||
|
||||
virtual GnssMeasurementsEvent& getGnssMeasurementsEvent();
|
||||
|
||||
virtual LocationReportEvent& getLocationReportEvent();
|
||||
|
||||
virtual EngineLocationsEvent& getEngineLocationsEvent();
|
||||
|
||||
virtual GnssSvEvent& getGnssSvEvent();
|
||||
|
||||
virtual GnssNmeaEvent& getGnssNmeaEvent();
|
||||
|
||||
virtual EngineNmeaEvent& getEngineNmeaEvent();
|
||||
|
||||
virtual GnssDataEvent& getGnssDataEvent();
|
||||
|
||||
virtual void startPositionSession(uint32_t _intervalInMs, uint32_t _gnssReportCallbackMask, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info);
|
||||
|
||||
virtual std::future<CommonAPI::CallStatus> startPositionSessionAsync(const uint32_t &_intervalInMs, const uint32_t &_gnssReportCallbackMask, StartPositionSessionAsyncCallback _callback, const CommonAPI::CallInfo *_info);
|
||||
|
||||
virtual void startPositionSession(uint32_t _intervalInMs, uint32_t _locReqEngMask, uint32_t _engReportCallbackMask, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info);
|
||||
|
||||
virtual std::future<CommonAPI::CallStatus> startPositionSessionAsync(const uint32_t &_intervalInMs, const uint32_t &_locReqEngMask, const uint32_t &_engReportCallbackMask, StartPositionSessionAsyncCallback _callback, const CommonAPI::CallInfo *_info);
|
||||
|
||||
virtual void stopPositionSession(CommonAPI::CallStatus &_internalCallStatus, const CommonAPI::CallInfo *_info);
|
||||
|
||||
virtual std::future<CommonAPI::CallStatus> stopPositionSessionAsync(StopPositionSessionAsyncCallback _callback, const CommonAPI::CallInfo *_info);
|
||||
|
||||
virtual void deleteAidingData(uint32_t _aidingDataMask, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info);
|
||||
|
||||
virtual std::future<CommonAPI::CallStatus> deleteAidingDataAsync(const uint32_t &_aidingDataMask, DeleteAidingDataAsyncCallback _callback, const CommonAPI::CallInfo *_info);
|
||||
|
||||
virtual void configConstellations(std::vector< LocIdlAPI::IDLGnssSvIdInfo > _svList, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info);
|
||||
|
||||
virtual std::future<CommonAPI::CallStatus> configConstellationsAsync(const std::vector< LocIdlAPI::IDLGnssSvIdInfo > &_svList, ConfigConstellationsAsyncCallback _callback, const CommonAPI::CallInfo *_info);
|
||||
|
||||
virtual void injectMapMatchedFeedbackData(LocIdlAPI::MapMatchingFeedbackData _mmfData, CommonAPI::CallStatus &_internalCallStatus, LocIdlAPI::IDLLocationResponse &_resp, const CommonAPI::CallInfo *_info);
|
||||
|
||||
virtual std::future<CommonAPI::CallStatus> injectMapMatchedFeedbackDataAsync(const LocIdlAPI::MapMatchingFeedbackData &_mmfData, InjectMapMatchedFeedbackDataAsyncCallback _callback, const CommonAPI::CallInfo *_info);
|
||||
|
||||
virtual void getOwnVersion(uint16_t &_major, uint16_t &_minor) const;
|
||||
|
||||
virtual std::future<void> getCompletionFuture();
|
||||
|
||||
private:
|
||||
CommonAPI::SomeIP::ObservableAttribute<CommonAPI::SomeIP::Attribute<GnssCapabilitiesMaskAttribute, CommonAPI::SomeIP::IntegerDeployment<uint32_t>>> gnssCapabilitiesMask_;
|
||||
CommonAPI::SomeIP::Event<GnssMeasurementsEvent, CommonAPI::Deployable< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssMeasurements, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssMeasurementsDeployment_t >> gnssMeasurements_;
|
||||
CommonAPI::SomeIP::Event<LocationReportEvent, CommonAPI::Deployable< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocationReport, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationReportDeployment_t >> locationReport_;
|
||||
CommonAPI::SomeIP::Event<EngineLocationsEvent, CommonAPI::Deployable< std::vector< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocationReport >, CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationReportDeployment_t > >> engineLocations_;
|
||||
CommonAPI::SomeIP::Event<GnssSvEvent, CommonAPI::Deployable< std::vector< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssSv >, CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvDeployment_t > >> gnssSv_;
|
||||
CommonAPI::SomeIP::Event<GnssNmeaEvent, CommonAPI::Deployable< uint64_t, CommonAPI::SomeIP::IntegerDeployment<uint64_t> >, CommonAPI::Deployable< std::string, CommonAPI::SomeIP::StringDeployment >> gnssNmea_;
|
||||
CommonAPI::SomeIP::Event<EngineNmeaEvent, CommonAPI::Deployable< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocOutputEngineType, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocOutputEngineTypeDeployment_t >, CommonAPI::Deployable< uint64_t, CommonAPI::SomeIP::IntegerDeployment<uint64_t> >, CommonAPI::Deployable< std::string, CommonAPI::SomeIP::StringDeployment >> engineNmea_;
|
||||
CommonAPI::SomeIP::Event<GnssDataEvent, CommonAPI::Deployable< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssData, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssDataDeployment_t >> gnssData_;
|
||||
|
||||
std::promise<void> completed_;
|
||||
};
|
||||
|
||||
} // namespace location
|
||||
} // namespace qti
|
||||
} // namespace qualcomm
|
||||
} // namespace com
|
||||
} // namespace v0
|
||||
|
||||
#endif // V0_COM_QUALCOMM_QTI_LOCATION_Loc_Idl_API_SOMEIP_PROXY_HPP_
|
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* This file was generated by the CommonAPI Generators.
|
||||
* Used org.genivi.commonapi.someip 3.2.0.v202012010944.
|
||||
* Used org.franca.core 0.13.1.201807231814.
|
||||
*
|
||||
* 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/.
|
||||
*/
|
||||
#include <v0/com/qualcomm/qti/location/LocIdlAPISomeIPStubAdapter.hpp>
|
||||
#include <v0/com/qualcomm/qti/location/LocIdlAPI.hpp>
|
||||
|
||||
#if !defined (COMMONAPI_INTERNAL_COMPILATION)
|
||||
#define COMMONAPI_INTERNAL_COMPILATION
|
||||
#define HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE
|
||||
#endif
|
||||
|
||||
#include <CommonAPI/SomeIP/AddressTranslator.hpp>
|
||||
|
||||
#if defined (HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE)
|
||||
#undef COMMONAPI_INTERNAL_COMPILATION
|
||||
#undef HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE
|
||||
#endif
|
||||
|
||||
namespace v0 {
|
||||
namespace com {
|
||||
namespace qualcomm {
|
||||
namespace qti {
|
||||
namespace location {
|
||||
|
||||
std::shared_ptr<CommonAPI::SomeIP::StubAdapter> createLocIdlAPISomeIPStubAdapter(
|
||||
const CommonAPI::SomeIP::Address &_address,
|
||||
const std::shared_ptr<CommonAPI::SomeIP::ProxyConnection> &_connection,
|
||||
const std::shared_ptr<CommonAPI::StubBase> &_stub) {
|
||||
return std::make_shared< LocIdlAPISomeIPStubAdapter<::v0::com::qualcomm::qti::location::LocIdlAPIStub>>(_address, _connection, _stub);
|
||||
}
|
||||
|
||||
void initializeLocIdlAPISomeIPStubAdapter() {
|
||||
CommonAPI::SomeIP::AddressTranslator::get()->insert(
|
||||
"local:com.qualcomm.qti.location.LocIdlAPI:v0_2:com.qualcomm.qti.location.LocIdlAPI",
|
||||
0xee00, 0x1, 0, 2);
|
||||
CommonAPI::SomeIP::Factory::get()->registerStubAdapterCreateMethod(
|
||||
"com.qualcomm.qti.location.LocIdlAPI:v0_2",
|
||||
&createLocIdlAPISomeIPStubAdapter);
|
||||
}
|
||||
|
||||
INITIALIZER(registerLocIdlAPISomeIPStubAdapter) {
|
||||
CommonAPI::SomeIP::Factory::get()->registerInterface(initializeLocIdlAPISomeIPStubAdapter);
|
||||
}
|
||||
|
||||
} // namespace location
|
||||
} // namespace qti
|
||||
} // namespace qualcomm
|
||||
} // namespace com
|
||||
} // namespace v0
|
@@ -0,0 +1,414 @@
|
||||
/*
|
||||
* This file was generated by the CommonAPI Generators.
|
||||
* Used org.genivi.commonapi.someip 3.2.0.v202012010944.
|
||||
* Used org.franca.core 0.13.1.201807231814.
|
||||
*
|
||||
* 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/.
|
||||
*/
|
||||
#ifndef V0_COM_QUALCOMM_QTI_LOCATION_LOC_IDL_API_SOMEIP_STUB_ADAPTER_HPP_
|
||||
#define V0_COM_QUALCOMM_QTI_LOCATION_LOC_IDL_API_SOMEIP_STUB_ADAPTER_HPP_
|
||||
|
||||
#include <v0/com/qualcomm/qti/location/LocIdlAPIStub.hpp>
|
||||
#include <v0/com/qualcomm/qti/location/LocIdlAPISomeIPDeployment.hpp>
|
||||
|
||||
#if !defined (COMMONAPI_INTERNAL_COMPILATION)
|
||||
#define COMMONAPI_INTERNAL_COMPILATION
|
||||
#define HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE
|
||||
#endif
|
||||
|
||||
#include <CommonAPI/SomeIP/AddressTranslator.hpp>
|
||||
#include <CommonAPI/SomeIP/StubAdapterHelper.hpp>
|
||||
#include <CommonAPI/SomeIP/StubAdapter.hpp>
|
||||
#include <CommonAPI/SomeIP/Factory.hpp>
|
||||
#include <CommonAPI/SomeIP/Types.hpp>
|
||||
#include <CommonAPI/SomeIP/Constants.hpp>
|
||||
|
||||
#if defined (HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE)
|
||||
#undef COMMONAPI_INTERNAL_COMPILATION
|
||||
#undef HAS_DEFINED_COMMONAPI_INTERNAL_COMPILATION_HERE
|
||||
#endif
|
||||
|
||||
namespace v0 {
|
||||
namespace com {
|
||||
namespace qualcomm {
|
||||
namespace qti {
|
||||
namespace location {
|
||||
|
||||
template <typename _Stub = ::v0::com::qualcomm::qti::location::LocIdlAPIStub, typename... _Stubs>
|
||||
class LocIdlAPISomeIPStubAdapterInternal
|
||||
: public virtual LocIdlAPIStubAdapter,
|
||||
public CommonAPI::SomeIP::StubAdapterHelper< _Stub, _Stubs...>,
|
||||
public std::enable_shared_from_this< LocIdlAPISomeIPStubAdapterInternal<_Stub, _Stubs...>>
|
||||
{
|
||||
public:
|
||||
typedef CommonAPI::SomeIP::StubAdapterHelper< _Stub, _Stubs...> LocIdlAPISomeIPStubAdapterHelper;
|
||||
|
||||
~LocIdlAPISomeIPStubAdapterInternal() {
|
||||
deactivateManagedInstances();
|
||||
LocIdlAPISomeIPStubAdapterHelper::deinit();
|
||||
}
|
||||
|
||||
void fireGnssCapabilitiesMaskAttributeChanged(const uint32_t &_value);
|
||||
|
||||
void fireGnssMeasurementsEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssMeasurements &_gnssMeasurements);
|
||||
|
||||
void fireLocationReportEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocationReport &_locationReport);
|
||||
|
||||
void fireEngineLocationsEvent(const std::vector< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocationReport > &_engLocations);
|
||||
|
||||
void fireGnssSvEvent(const std::vector< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssSv > &_gnssSvs);
|
||||
|
||||
void fireGnssNmeaEvent(const uint64_t &_timestamp, const std::string &_nmea);
|
||||
|
||||
void fireEngineNmeaEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocOutputEngineType &_engType, const uint64_t &_timestamp, const std::string &_nmea);
|
||||
|
||||
void fireGnssDataEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssData &_gnssData);
|
||||
|
||||
void deactivateManagedInstances() {}
|
||||
|
||||
CommonAPI::SomeIP::GetAttributeStubDispatcher<
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPIStub,
|
||||
CommonAPI::Version
|
||||
> getLocIdlAPIInterfaceVersionStubDispatcher;
|
||||
|
||||
CommonAPI::SomeIP::GetAttributeStubDispatcher<
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPIStub,
|
||||
uint32_t,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
> getGnssCapabilitiesMaskAttributeStubDispatcher;
|
||||
|
||||
CommonAPI::SomeIP::SetObservableAttributeStubDispatcher<
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPIStub,
|
||||
uint32_t,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
> setGnssCapabilitiesMaskAttributeStubDispatcher;
|
||||
|
||||
CommonAPI::SomeIP::MethodWithReplyStubDispatcher<
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPIStub,
|
||||
std::tuple< uint32_t, uint32_t>,
|
||||
std::tuple< LocIdlAPI::IDLLocationResponse>,
|
||||
std::tuple< CommonAPI::SomeIP::IntegerDeployment<uint32_t>, CommonAPI::SomeIP::IntegerDeployment<uint32_t>>,
|
||||
std::tuple< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t>
|
||||
> startPositionSessionStubDispatcher;
|
||||
|
||||
CommonAPI::SomeIP::MethodWithReplyStubDispatcher<
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPIStub,
|
||||
std::tuple< uint32_t, uint32_t, uint32_t>,
|
||||
std::tuple< LocIdlAPI::IDLLocationResponse>,
|
||||
std::tuple< CommonAPI::SomeIP::IntegerDeployment<uint32_t>, CommonAPI::SomeIP::IntegerDeployment<uint32_t>, CommonAPI::SomeIP::IntegerDeployment<uint32_t>>,
|
||||
std::tuple< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t>
|
||||
> startPositionSessionStubDispatcher1;
|
||||
|
||||
CommonAPI::SomeIP::MethodWithReplyStubDispatcher<
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPIStub,
|
||||
std::tuple< >,
|
||||
std::tuple< >,
|
||||
std::tuple< >,
|
||||
std::tuple< >
|
||||
> stopPositionSessionStubDispatcher;
|
||||
|
||||
CommonAPI::SomeIP::MethodWithReplyStubDispatcher<
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPIStub,
|
||||
std::tuple< uint32_t>,
|
||||
std::tuple< LocIdlAPI::IDLLocationResponse>,
|
||||
std::tuple< CommonAPI::SomeIP::IntegerDeployment<uint32_t>>,
|
||||
std::tuple< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t>
|
||||
> deleteAidingDataStubDispatcher;
|
||||
|
||||
CommonAPI::SomeIP::MethodWithReplyStubDispatcher<
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPIStub,
|
||||
std::tuple< std::vector< LocIdlAPI::IDLGnssSvIdInfo >>,
|
||||
std::tuple< LocIdlAPI::IDLLocationResponse>,
|
||||
std::tuple< CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvIdInfoDeployment_t >>,
|
||||
std::tuple< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t>
|
||||
> configConstellationsStubDispatcher;
|
||||
|
||||
CommonAPI::SomeIP::MethodWithReplyStubDispatcher<
|
||||
::v0::com::qualcomm::qti::location::LocIdlAPIStub,
|
||||
std::tuple< LocIdlAPI::MapMatchingFeedbackData>,
|
||||
std::tuple< LocIdlAPI::IDLLocationResponse>,
|
||||
std::tuple< ::v0::com::qualcomm::qti::location::LocIdlAPI_::MapMatchingFeedbackDataDeployment_t>,
|
||||
std::tuple< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment_t>
|
||||
> injectMapMatchedFeedbackDataStubDispatcher;
|
||||
|
||||
LocIdlAPISomeIPStubAdapterInternal(
|
||||
const CommonAPI::SomeIP::Address &_address,
|
||||
const std::shared_ptr<CommonAPI::SomeIP::ProxyConnection> &_connection,
|
||||
const std::shared_ptr<CommonAPI::StubBase> &_stub):
|
||||
CommonAPI::SomeIP::StubAdapter(_address, _connection),
|
||||
LocIdlAPISomeIPStubAdapterHelper(
|
||||
_address,
|
||||
_connection,
|
||||
std::dynamic_pointer_cast< LocIdlAPIStub>(_stub)),
|
||||
getLocIdlAPIInterfaceVersionStubDispatcher(&LocIdlAPIStub::lockInterfaceVersionAttribute, &LocIdlAPIStub::getInterfaceVersion, false, true),
|
||||
getGnssCapabilitiesMaskAttributeStubDispatcher(
|
||||
&::v0::com::qualcomm::qti::location::LocIdlAPIStub::lockGnssCapabilitiesMaskAttribute,
|
||||
&::v0::com::qualcomm::qti::location::LocIdlAPIStub::getGnssCapabilitiesMaskAttribute,
|
||||
false,
|
||||
_stub->hasElement(0)),
|
||||
setGnssCapabilitiesMaskAttributeStubDispatcher(
|
||||
&::v0::com::qualcomm::qti::location::LocIdlAPIStub::lockGnssCapabilitiesMaskAttribute,
|
||||
&::v0::com::qualcomm::qti::location::LocIdlAPIStub::getGnssCapabilitiesMaskAttribute,
|
||||
&LocIdlAPIStubRemoteEvent::onRemoteSetGnssCapabilitiesMaskAttribute,
|
||||
&LocIdlAPIStubRemoteEvent::onRemoteGnssCapabilitiesMaskAttributeChanged,
|
||||
&LocIdlAPIStubAdapter::fireGnssCapabilitiesMaskAttributeChanged,
|
||||
false,
|
||||
_stub->hasElement(0))
|
||||
,
|
||||
startPositionSessionStubDispatcher(
|
||||
&LocIdlAPIStub::startPositionSession,
|
||||
false,
|
||||
_stub->hasElement(8),
|
||||
std::make_tuple(static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr)),
|
||||
std::make_tuple(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment))
|
||||
|
||||
,
|
||||
startPositionSessionStubDispatcher1(
|
||||
&LocIdlAPIStub::startPositionSession,
|
||||
false,
|
||||
_stub->hasElement(9),
|
||||
std::make_tuple(static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr), static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr)),
|
||||
std::make_tuple(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment))
|
||||
|
||||
,
|
||||
stopPositionSessionStubDispatcher(
|
||||
&LocIdlAPIStub::stopPositionSession,
|
||||
false,
|
||||
_stub->hasElement(10),
|
||||
std::make_tuple(),
|
||||
std::make_tuple())
|
||||
|
||||
,
|
||||
deleteAidingDataStubDispatcher(
|
||||
&LocIdlAPIStub::deleteAidingData,
|
||||
false,
|
||||
_stub->hasElement(11),
|
||||
std::make_tuple(static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr)),
|
||||
std::make_tuple(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment))
|
||||
|
||||
,
|
||||
configConstellationsStubDispatcher(
|
||||
&LocIdlAPIStub::configConstellations,
|
||||
false,
|
||||
_stub->hasElement(12),
|
||||
std::make_tuple(static_cast< CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvIdInfoDeployment_t >* >(nullptr)),
|
||||
std::make_tuple(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment))
|
||||
|
||||
,
|
||||
injectMapMatchedFeedbackDataStubDispatcher(
|
||||
&LocIdlAPIStub::injectMapMatchedFeedbackData,
|
||||
false,
|
||||
_stub->hasElement(13),
|
||||
std::make_tuple(static_cast< ::v0::com::qualcomm::qti::location::LocIdlAPI_::MapMatchingFeedbackDataDeployment_t* >(nullptr)),
|
||||
std::make_tuple(&::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationResponseDeployment))
|
||||
|
||||
{
|
||||
LocIdlAPISomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0xbb8) }, &getGnssCapabilitiesMaskAttributeStubDispatcher );
|
||||
LocIdlAPISomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0xbb9) }, &setGnssCapabilitiesMaskAttributeStubDispatcher );
|
||||
LocIdlAPISomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x7d01) }, &startPositionSessionStubDispatcher );
|
||||
LocIdlAPISomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x7d02) }, &startPositionSessionStubDispatcher1 );
|
||||
LocIdlAPISomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x7d03) }, &stopPositionSessionStubDispatcher );
|
||||
LocIdlAPISomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x7d04) }, &deleteAidingDataStubDispatcher );
|
||||
LocIdlAPISomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x7d05) }, &configConstellationsStubDispatcher );
|
||||
LocIdlAPISomeIPStubAdapterHelper::addStubDispatcher( { CommonAPI::SomeIP::method_id_t(0x7d06) }, &injectMapMatchedFeedbackDataStubDispatcher );
|
||||
std::shared_ptr<CommonAPI::SomeIP::ClientId> itsClient = std::make_shared<CommonAPI::SomeIP::ClientId>(0xFFFF, 0xFFFFFFFF, 0xFFFFFFFF);
|
||||
|
||||
// Provided events/fields
|
||||
{
|
||||
std::set<CommonAPI::SomeIP::eventgroup_id_t> itsEventGroups;
|
||||
itsEventGroups.insert(CommonAPI::SomeIP::eventgroup_id_t(0x80e8));
|
||||
CommonAPI::SomeIP::StubAdapter::registerEvent(CommonAPI::SomeIP::event_id_t(0x80e9), itsEventGroups, CommonAPI::SomeIP::event_type_e::ET_EVENT, CommonAPI::SomeIP::reliability_type_e::RT_UNRELIABLE);
|
||||
}
|
||||
{
|
||||
std::set<CommonAPI::SomeIP::eventgroup_id_t> itsEventGroups;
|
||||
itsEventGroups.insert(CommonAPI::SomeIP::eventgroup_id_t(0x80e8));
|
||||
CommonAPI::SomeIP::StubAdapter::registerEvent(CommonAPI::SomeIP::event_id_t(0x80ea), itsEventGroups, CommonAPI::SomeIP::event_type_e::ET_EVENT, CommonAPI::SomeIP::reliability_type_e::RT_UNRELIABLE);
|
||||
}
|
||||
{
|
||||
std::set<CommonAPI::SomeIP::eventgroup_id_t> itsEventGroups;
|
||||
itsEventGroups.insert(CommonAPI::SomeIP::eventgroup_id_t(0x80e8));
|
||||
CommonAPI::SomeIP::StubAdapter::registerEvent(CommonAPI::SomeIP::event_id_t(0x80eb), itsEventGroups, CommonAPI::SomeIP::event_type_e::ET_EVENT, CommonAPI::SomeIP::reliability_type_e::RT_UNRELIABLE);
|
||||
}
|
||||
{
|
||||
std::set<CommonAPI::SomeIP::eventgroup_id_t> itsEventGroups;
|
||||
itsEventGroups.insert(CommonAPI::SomeIP::eventgroup_id_t(0x80e8));
|
||||
CommonAPI::SomeIP::StubAdapter::registerEvent(CommonAPI::SomeIP::event_id_t(0x80ec), itsEventGroups, CommonAPI::SomeIP::event_type_e::ET_EVENT, CommonAPI::SomeIP::reliability_type_e::RT_UNRELIABLE);
|
||||
}
|
||||
{
|
||||
std::set<CommonAPI::SomeIP::eventgroup_id_t> itsEventGroups;
|
||||
itsEventGroups.insert(CommonAPI::SomeIP::eventgroup_id_t(0x80e8));
|
||||
CommonAPI::SomeIP::StubAdapter::registerEvent(CommonAPI::SomeIP::event_id_t(0x80ed), itsEventGroups, CommonAPI::SomeIP::event_type_e::ET_EVENT, CommonAPI::SomeIP::reliability_type_e::RT_UNRELIABLE);
|
||||
}
|
||||
{
|
||||
std::set<CommonAPI::SomeIP::eventgroup_id_t> itsEventGroups;
|
||||
itsEventGroups.insert(CommonAPI::SomeIP::eventgroup_id_t(0x80e8));
|
||||
CommonAPI::SomeIP::StubAdapter::registerEvent(CommonAPI::SomeIP::event_id_t(0x80ee), itsEventGroups, CommonAPI::SomeIP::event_type_e::ET_EVENT, CommonAPI::SomeIP::reliability_type_e::RT_UNRELIABLE);
|
||||
}
|
||||
{
|
||||
std::set<CommonAPI::SomeIP::eventgroup_id_t> itsEventGroups;
|
||||
itsEventGroups.insert(CommonAPI::SomeIP::eventgroup_id_t(0x80e8));
|
||||
CommonAPI::SomeIP::StubAdapter::registerEvent(CommonAPI::SomeIP::event_id_t(0x80ef), itsEventGroups, CommonAPI::SomeIP::event_type_e::ET_EVENT, CommonAPI::SomeIP::reliability_type_e::RT_UNRELIABLE);
|
||||
}
|
||||
if (_stub->hasElement(0)) {
|
||||
std::set<CommonAPI::SomeIP::eventgroup_id_t> itsEventGroups;
|
||||
itsEventGroups.insert(CommonAPI::SomeIP::eventgroup_id_t(CommonAPI::SomeIP::eventgroup_id_t(0x80e8)));
|
||||
CommonAPI::SomeIP::StubAdapter::registerEvent(CommonAPI::SomeIP::event_id_t(0x80f2), itsEventGroups, CommonAPI::SomeIP::event_type_e::ET_FIELD, CommonAPI::SomeIP::reliability_type_e::RT_RELIABLE);
|
||||
fireGnssCapabilitiesMaskAttributeChanged(std::dynamic_pointer_cast< ::v0::com::qualcomm::qti::location::LocIdlAPIStub>(_stub)->getGnssCapabilitiesMaskAttribute(itsClient));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Register/Unregister event handlers for selective broadcasts
|
||||
void registerSelectiveEventHandlers();
|
||||
void unregisterSelectiveEventHandlers();
|
||||
|
||||
};
|
||||
|
||||
template <typename _Stub, typename... _Stubs>
|
||||
void LocIdlAPISomeIPStubAdapterInternal<_Stub, _Stubs...>::fireGnssCapabilitiesMaskAttributeChanged(const uint32_t &_value) {
|
||||
CommonAPI::Deployable< uint32_t, CommonAPI::SomeIP::IntegerDeployment<uint32_t>> deployedValue(_value, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint32_t>* >(nullptr));
|
||||
CommonAPI::SomeIP::StubEventHelper<
|
||||
CommonAPI::SomeIP::SerializableArguments<
|
||||
CommonAPI::Deployable<
|
||||
uint32_t,
|
||||
CommonAPI::SomeIP::IntegerDeployment<uint32_t>
|
||||
>
|
||||
>
|
||||
>::sendEvent(
|
||||
*this,
|
||||
CommonAPI::SomeIP::event_id_t(0x80f2),
|
||||
false,
|
||||
deployedValue
|
||||
);
|
||||
}
|
||||
|
||||
template <typename _Stub, typename... _Stubs>
|
||||
void LocIdlAPISomeIPStubAdapterInternal<_Stub, _Stubs...>::fireGnssMeasurementsEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssMeasurements &_gnssMeasurements) {
|
||||
CommonAPI::Deployable< LocIdlAPI::IDLGnssMeasurements, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssMeasurementsDeployment_t> deployed_gnssMeasurements(_gnssMeasurements, &::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssMeasurementsDeployment);
|
||||
CommonAPI::SomeIP::StubEventHelper<CommonAPI::SomeIP::SerializableArguments< CommonAPI::Deployable< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssMeasurements, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssMeasurementsDeployment_t >
|
||||
>>
|
||||
::sendEvent(
|
||||
*this,
|
||||
CommonAPI::SomeIP::event_id_t(0x80e9),
|
||||
false,
|
||||
deployed_gnssMeasurements
|
||||
);
|
||||
}
|
||||
|
||||
template <typename _Stub, typename... _Stubs>
|
||||
void LocIdlAPISomeIPStubAdapterInternal<_Stub, _Stubs...>::fireLocationReportEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocationReport &_locationReport) {
|
||||
CommonAPI::Deployable< LocIdlAPI::IDLLocationReport, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationReportDeployment_t> deployed_locationReport(_locationReport, &::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationReportDeployment);
|
||||
CommonAPI::SomeIP::StubEventHelper<CommonAPI::SomeIP::SerializableArguments< CommonAPI::Deployable< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocationReport, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationReportDeployment_t >
|
||||
>>
|
||||
::sendEvent(
|
||||
*this,
|
||||
CommonAPI::SomeIP::event_id_t(0x80ea),
|
||||
false,
|
||||
deployed_locationReport
|
||||
);
|
||||
}
|
||||
|
||||
template <typename _Stub, typename... _Stubs>
|
||||
void LocIdlAPISomeIPStubAdapterInternal<_Stub, _Stubs...>::fireEngineLocationsEvent(const std::vector< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocationReport > &_engLocations) {
|
||||
CommonAPI::Deployable< std::vector< LocIdlAPI::IDLLocationReport >, CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationReportDeployment_t >> deployed_engLocations(_engLocations, &::v0::com::qualcomm::qti::location::LocIdlAPI_::EngineLocations_engLocationsDeployment);
|
||||
CommonAPI::SomeIP::StubEventHelper<CommonAPI::SomeIP::SerializableArguments< CommonAPI::Deployable< std::vector< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocationReport >, CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocationReportDeployment_t > >
|
||||
>>
|
||||
::sendEvent(
|
||||
*this,
|
||||
CommonAPI::SomeIP::event_id_t(0x80eb),
|
||||
false,
|
||||
deployed_engLocations
|
||||
);
|
||||
}
|
||||
|
||||
template <typename _Stub, typename... _Stubs>
|
||||
void LocIdlAPISomeIPStubAdapterInternal<_Stub, _Stubs...>::fireGnssSvEvent(const std::vector< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssSv > &_gnssSvs) {
|
||||
CommonAPI::Deployable< std::vector< LocIdlAPI::IDLGnssSv >, CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvDeployment_t >> deployed_gnssSvs(_gnssSvs, &::v0::com::qualcomm::qti::location::LocIdlAPI_::GnssSv_gnssSvsDeployment);
|
||||
CommonAPI::SomeIP::StubEventHelper<CommonAPI::SomeIP::SerializableArguments< CommonAPI::Deployable< std::vector< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssSv >, CommonAPI::SomeIP::ArrayDeployment< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssSvDeployment_t > >
|
||||
>>
|
||||
::sendEvent(
|
||||
*this,
|
||||
CommonAPI::SomeIP::event_id_t(0x80ec),
|
||||
false,
|
||||
deployed_gnssSvs
|
||||
);
|
||||
}
|
||||
|
||||
template <typename _Stub, typename... _Stubs>
|
||||
void LocIdlAPISomeIPStubAdapterInternal<_Stub, _Stubs...>::fireGnssNmeaEvent(const uint64_t &_timestamp, const std::string &_nmea) {
|
||||
CommonAPI::Deployable< uint64_t, CommonAPI::SomeIP::IntegerDeployment<uint64_t>> deployed_timestamp(_timestamp, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint64_t>* >(nullptr));
|
||||
CommonAPI::Deployable< std::string, CommonAPI::SomeIP::StringDeployment> deployed_nmea(_nmea, static_cast< CommonAPI::SomeIP::StringDeployment* >(nullptr));
|
||||
CommonAPI::SomeIP::StubEventHelper<CommonAPI::SomeIP::SerializableArguments< CommonAPI::Deployable< uint64_t, CommonAPI::SomeIP::IntegerDeployment<uint64_t> >
|
||||
, CommonAPI::Deployable< std::string, CommonAPI::SomeIP::StringDeployment >
|
||||
>>
|
||||
::sendEvent(
|
||||
*this,
|
||||
CommonAPI::SomeIP::event_id_t(0x80ed),
|
||||
false,
|
||||
deployed_timestamp
|
||||
, deployed_nmea
|
||||
);
|
||||
}
|
||||
|
||||
template <typename _Stub, typename... _Stubs>
|
||||
void LocIdlAPISomeIPStubAdapterInternal<_Stub, _Stubs...>::fireEngineNmeaEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocOutputEngineType &_engType, const uint64_t &_timestamp, const std::string &_nmea) {
|
||||
CommonAPI::Deployable< LocIdlAPI::IDLLocOutputEngineType, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocOutputEngineTypeDeployment_t> deployed_engType(_engType, &::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocOutputEngineTypeDeployment);
|
||||
CommonAPI::Deployable< uint64_t, CommonAPI::SomeIP::IntegerDeployment<uint64_t>> deployed_timestamp(_timestamp, static_cast< CommonAPI::SomeIP::IntegerDeployment<uint64_t>* >(nullptr));
|
||||
CommonAPI::Deployable< std::string, CommonAPI::SomeIP::StringDeployment> deployed_nmea(_nmea, static_cast< CommonAPI::SomeIP::StringDeployment* >(nullptr));
|
||||
CommonAPI::SomeIP::StubEventHelper<CommonAPI::SomeIP::SerializableArguments< CommonAPI::Deployable< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLLocOutputEngineType, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLLocOutputEngineTypeDeployment_t >
|
||||
, CommonAPI::Deployable< uint64_t, CommonAPI::SomeIP::IntegerDeployment<uint64_t> >
|
||||
, CommonAPI::Deployable< std::string, CommonAPI::SomeIP::StringDeployment >
|
||||
>>
|
||||
::sendEvent(
|
||||
*this,
|
||||
CommonAPI::SomeIP::event_id_t(0x80ee),
|
||||
false,
|
||||
deployed_engType
|
||||
, deployed_timestamp
|
||||
, deployed_nmea
|
||||
);
|
||||
}
|
||||
|
||||
template <typename _Stub, typename... _Stubs>
|
||||
void LocIdlAPISomeIPStubAdapterInternal<_Stub, _Stubs...>::fireGnssDataEvent(const ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssData &_gnssData) {
|
||||
CommonAPI::Deployable< LocIdlAPI::IDLGnssData, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssDataDeployment_t> deployed_gnssData(_gnssData, static_cast< ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssDataDeployment_t* >(nullptr));
|
||||
CommonAPI::SomeIP::StubEventHelper<CommonAPI::SomeIP::SerializableArguments< CommonAPI::Deployable< ::v0::com::qualcomm::qti::location::LocIdlAPI::IDLGnssData, ::v0::com::qualcomm::qti::location::LocIdlAPI_::IDLGnssDataDeployment_t >
|
||||
>>
|
||||
::sendEvent(
|
||||
*this,
|
||||
CommonAPI::SomeIP::event_id_t(0x80ef),
|
||||
false,
|
||||
deployed_gnssData
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
template <typename _Stub, typename... _Stubs>
|
||||
void LocIdlAPISomeIPStubAdapterInternal<_Stub, _Stubs...>::registerSelectiveEventHandlers() {
|
||||
}
|
||||
|
||||
template <typename _Stub, typename... _Stubs>
|
||||
void LocIdlAPISomeIPStubAdapterInternal<_Stub, _Stubs...>::unregisterSelectiveEventHandlers() {
|
||||
}
|
||||
|
||||
template <typename _Stub = ::v0::com::qualcomm::qti::location::LocIdlAPIStub, typename... _Stubs>
|
||||
class LocIdlAPISomeIPStubAdapter
|
||||
: public LocIdlAPISomeIPStubAdapterInternal<_Stub, _Stubs...> {
|
||||
public:
|
||||
LocIdlAPISomeIPStubAdapter(const CommonAPI::SomeIP::Address &_address,
|
||||
const std::shared_ptr<CommonAPI::SomeIP::ProxyConnection> &_connection,
|
||||
const std::shared_ptr<CommonAPI::StubBase> &_stub)
|
||||
: CommonAPI::SomeIP::StubAdapter(_address, _connection),
|
||||
LocIdlAPISomeIPStubAdapterInternal<_Stub, _Stubs...>(_address, _connection, _stub) {
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace location
|
||||
} // namespace qti
|
||||
} // namespace qualcomm
|
||||
} // namespace com
|
||||
} // namespace v0
|
||||
|
||||
#endif // V0_COM_QUALCOMM_QTI_LOCATION_Loc_Idl_API_SOMEIP_STUB_ADAPTER_HPP_
|
9
qcom/opensource/location/loc-fidl/src/CMakeLists.txt
Normal file
9
qcom/opensource/location/loc-fidl/src/CMakeLists.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
macro(SYSR_INCLUDE_DIR subdir)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I =/usr/include/${subdir}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I =/usr/include/${subdir}")
|
||||
endmacro()
|
||||
|
||||
add_subdirectory( LocIdlService )
|
||||
add_subdirectory( LocIdlClient )
|
@@ -0,0 +1,186 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set(PRJ_NAME LocIdlAPI)
|
||||
|
||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||
|
||||
OPTION(USE_FILE "Set to OFF to disable file logging" OFF )
|
||||
message(STATUS "USE_FILE is set to value: ${USE_FILE}")
|
||||
|
||||
OPTION(USE_CONSOLE "Set to OFF to disable console logging" OFF )
|
||||
message(STATUS "USE_CONSOLE is set to value: ${USE_CONSOLE}")
|
||||
|
||||
IF(USE_FILE)
|
||||
add_definitions(-DUSE_FILE)
|
||||
ENDIF(USE_FILE)
|
||||
IF(USE_CONSOLE)
|
||||
add_definitions(-DUSE_CONSOLE)
|
||||
ENDIF(USE_CONSOLE)
|
||||
|
||||
add_definitions(-D__LINUX__)
|
||||
add_definitions(-DOFF_TARGET)
|
||||
add_definitions(-std=c++14)
|
||||
add_definitions(-DUSE_GLIB)
|
||||
add_definitions(-DUSE_ANDROID_LOGGING)
|
||||
add_definitions(-DBASE_PATH=/var/tmp/location)
|
||||
|
||||
SET(MAX_LOG_LEVEL "DEBUG" CACHE STRING "maximum log level")
|
||||
message(STATUS "MAX_LOG_LEVEL is set to value: ${MAX_LOG_LEVEL}")
|
||||
add_definitions(-DCOMMONAPI_LOGLEVEL=COMMONAPI_LOGLEVEL_${MAX_LOG_LEVEL})
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "QNX")
|
||||
set (OS "QNX")
|
||||
set (NO_DEPRECATED_REGISTER "")
|
||||
set (Boost_USE_STATIC_LIBS ON)
|
||||
endif (${CMAKE_SYSTEM_NAME} MATCHES "QNX")
|
||||
|
||||
if (MSVC)
|
||||
# Visual C++ is not always sure whether he is really C++
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /EHsc /wd\\\"4503\\\"")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd\\\"4503\\\"")
|
||||
else()
|
||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -Wall -O0 -std=c++11 -D_GLIBCXX_USE_NANOSLEEP -DQNX")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O0 -std=c++11 -D_GLIBCXX_USE_NANOSLEEP")
|
||||
endif()
|
||||
|
||||
message(STATUS "Compiler options: ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
|
||||
"Choose the type of build, options are: Debug Release." FORCE)
|
||||
endif(NOT CMAKE_BUILD_TYPE)
|
||||
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
||||
|
||||
OPTION(USE_INSTALLED_COMMONAPI "Set to OFF to use the local (build tree) version of CommonAPI" ON)
|
||||
message(STATUS "USE_INSTALLED_COMMONAPI is set to value: ${USE_INSTALLED_COMMONAPI}")
|
||||
|
||||
if ("${USE_INSTALLED_COMMONAPI}" STREQUAL "ON")
|
||||
FIND_PACKAGE(CommonAPI 3.2.0 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
|
||||
#FIND_PACKAGE(CommonAPI-DBus 3.2.0 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
|
||||
else()
|
||||
FIND_PACKAGE(CommonAPI 3.2.0 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
|
||||
#FIND_PACKAGE(CommonAPI-DBus 3.2.0 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
|
||||
endif()
|
||||
|
||||
message(STATUS "CommonAPI_CONSIDERED_CONFIGS: ${CommonAPI_CONSIDERED_CONFIGS}")
|
||||
message(STATUS "COMMONAPI_INCLUDE_DIRS: ${COMMONAPI_INCLUDE_DIRS}")
|
||||
message(STATUS "CommonAPI-DBus_CONSIDERED_CONFIGS: ${CommonAPI-DBus_CONSIDERED_CONFIGS}")
|
||||
message(STATUS "COMMONAPI_DBUS_INCLUDE_DIRS: ${COMMONAPI_DBUS_INCLUDE_DIRS}")
|
||||
|
||||
# CommonAPI
|
||||
include(FindPkgConfig)
|
||||
###############################################################################
|
||||
# find DBus by using the 'pkg-config' tool
|
||||
if (MSVC)
|
||||
#Not beautiful, but it works
|
||||
if (DBus_DIR)
|
||||
if (DBus_BUILD_DIR)
|
||||
set(DBus_INCLUDE_DIRS "${DBus_DIR};${DBus_BUILD_DIR};")
|
||||
else ()
|
||||
message (FATAL_ERROR "DBus_BUILD_DIR not set! Cannot continue.")
|
||||
endif ()
|
||||
else()
|
||||
message (FATAL_ERROR "DBus_DIR not set! Cannot continue.")
|
||||
endif ()
|
||||
else()
|
||||
# pkg_check_modules(DBus REQUIRED dbus-1>=1.4)
|
||||
endif()
|
||||
|
||||
SYSR_INCLUDE_DIR(qcom-gps-utils)
|
||||
|
||||
# SOME/IP
|
||||
find_package (CommonAPI-SomeIP 3.2.0 REQUIRED)
|
||||
find_package (vsomeip3 3.1.20 REQUIRED)
|
||||
|
||||
# Source Files
|
||||
set(PRJ_SRC_PATH ../../src/LocIdlClient)
|
||||
set(PRJ_SRC_GEN_PATH ../../src-gen)
|
||||
set(PRJ_SRC_GEN_COMMONAPI_PATH ${PRJ_SRC_GEN_PATH}/core/v0/com/qualcomm/qti/location)
|
||||
set(PRJ_SRC_GEN_COMMONAPI_DBUS_PATH ${PRJ_SRC_GEN_PATH}/dbus/v0/com/qualcomm/qti/location)
|
||||
set(PRJ_SRC_GEN_COMMONAPI_SOMEIP_PATH ${PRJ_SRC_GEN_PATH}/someip/v0/com/qualcomm/qti/location)
|
||||
|
||||
set(PRJ_NAME_CLIENT ${PRJ_NAME}Client)
|
||||
|
||||
# Application
|
||||
FILE(GLOB PRJ_PROXY_GEN_SRCS ${PRJ_SRC_GEN_COMMONAPI_PATH}/*Proxy.cpp)
|
||||
FILE(GLOB PRJ_STUB_GEN_SRCS ${PRJ_SRC_GEN_COMMONAPI_PATH}/*Stub*.cpp)
|
||||
FILE(GLOB PRJ_STUB_IMPL_SRCS ${PRJ_SRC_COMMONAPI_PATH}/*Stub*.cpp)
|
||||
set(PRJ_CLIENT_SRCS ${PRJ_SRC_PATH}/${PRJ_NAME_CLIENT}.cpp ${PRJ_PROXY_GEN_SRCS})
|
||||
|
||||
# Boost
|
||||
#find_package( Boost 1.71 COMPONENTS system thread log REQUIRED )
|
||||
include_directories( ${Boost_INCLUDE_DIR} )
|
||||
|
||||
SYSR_INCLUDE_DIR(open-avb)
|
||||
# DBus library
|
||||
FILE(GLOB PRJ_DBUS_LIB_SRCS ${PRJ_SRC_GEN_COMMONAPI_DBUS_PATH}/*cpp)
|
||||
|
||||
# SOME/IP library
|
||||
FILE(GLOB PRJ_SOMEIP_LIB_SRCS ${PRJ_SRC_GEN_COMMONAPI_SOMEIP_PATH}/*cpp)
|
||||
|
||||
# Paths
|
||||
OPTION(USE_INSTALLED_DBUS "Set to OFF to use the local (patched) version of dbus" ON)
|
||||
message(STATUS "USE_INSTALLED_DBUS is set to value: ${USE_INSTALLED_DBUS}")
|
||||
|
||||
include_directories(
|
||||
../../src-gen/core
|
||||
../../src-gen/someip
|
||||
${COMMONAPI_INCLUDE_DIRS}
|
||||
${COMMONAPI_SOMEIP_INCLUDE_DIRS}
|
||||
${VSOMEIP_INCLUDE_DIRS}
|
||||
${SDK_USR_INC_PATH}/
|
||||
)
|
||||
|
||||
if ("${USE_INSTALLED_DBUS}" STREQUAL "ON")
|
||||
link_directories(
|
||||
${COMMONAPI_LIBDIR}
|
||||
${COMMONAPI_SOMEIP_CMAKE_DIR}/build
|
||||
${Boost_LIBRARY_DIR}
|
||||
)
|
||||
else()
|
||||
link_directories(
|
||||
${COMMONAPI_LIBDIR}
|
||||
${COMMONAPI_SOMEIP_CMAKE_DIR}/build
|
||||
${DBus_INCLUDE_DIRS}/dbus/.libs
|
||||
${Boost_LIBRARY_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
set(LINK_LIBRARIES CommonAPI gptp gps_utils log)
|
||||
else()
|
||||
set(LINK_LIBRARIES -Wl,--as-needed CommonAPI gptp gps_utils log)
|
||||
endif()
|
||||
|
||||
# Build Client
|
||||
add_executable(${PRJ_NAME_CLIENT} ${PRJ_CLIENT_SRCS})
|
||||
target_link_libraries(${PRJ_NAME_CLIENT} ${LINK_LIBRARIES})
|
||||
|
||||
# Build SOME/IP library
|
||||
add_library (${PRJ_NAME_CLIENT}-someip SHARED ${PRJ_SOMEIP_LIB_SRCS})
|
||||
target_link_libraries(${PRJ_NAME_CLIENT}-someip CommonAPI-SomeIP)
|
||||
install (
|
||||
# TARGETS ${PRJ_NAME_CLIENT} ${PRJ_NAME_SERVICE}
|
||||
TARGETS ${PRJ_NAME_CLIENT}
|
||||
RUNTIME DESTINATION "${INSTALL_BIN_DIR}" COMPONENT bin)
|
||||
|
||||
install (
|
||||
TARGETS ${PRJ_NAME}-someip
|
||||
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT shlib
|
||||
)
|
||||
|
||||
#set(EXAMPLE_CONFIG_FILES ${PRJ_SRC_PATH}/vsomeip-client.json)
|
||||
set(EXAMPLE_CONFIG_FILES
|
||||
"vsomeip-client.json"
|
||||
)
|
||||
|
||||
set(EXAMPLE_CONFIG_FILES
|
||||
"vsomeip-client.json"
|
||||
"commonapi4someip.ini"
|
||||
"vsomeip-local.json"
|
||||
)
|
||||
|
||||
install (
|
||||
FILES ${EXAMPLE_CONFIG_FILES} DESTINATION /etc COMPONENT config
|
||||
)
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
[default]
|
||||
binding=someip
|
||||
tp=true
|
||||
|
||||
[logging]
|
||||
console = true
|
||||
file = ./mylog.log
|
||||
dlt = false
|
||||
level = verbose
|
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"unicast" : "10.131.6.75",
|
||||
"netmask" : "255.255.0.0",
|
||||
"logging" :
|
||||
{
|
||||
"level" : "debug",
|
||||
"console" : "true",
|
||||
"file" : { "enable" : "true", "path" : "/var/log/vsomeip.log" },
|
||||
"dlt" : "false"
|
||||
},
|
||||
"applications" :
|
||||
[
|
||||
{
|
||||
"name" : "client-sample",
|
||||
"id" : "0x1343"
|
||||
}
|
||||
],
|
||||
"services" :
|
||||
[
|
||||
{
|
||||
"service" : "0x1234",
|
||||
"instance" : "0x5678",
|
||||
"unreliable" : "30509",
|
||||
"unicast":"192.168.1.9",
|
||||
"someip-tp":
|
||||
{
|
||||
"client-to-service": ["0x9471","0x9472"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"routing" : "client-sample",
|
||||
"service-discovery" :
|
||||
{
|
||||
"enable" : "true",
|
||||
"multicast" : "224.244.224.245",
|
||||
"port" : "30490",
|
||||
"protocol" : "udp"
|
||||
}
|
||||
}
|
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"unicast" : "10.131.4.37",
|
||||
"logging" :
|
||||
{
|
||||
"level" : "debug",
|
||||
"console" : "true",
|
||||
"file" : { "enable" : "false", "path" : "/var/log/vsomeip.log" },
|
||||
"dlt" : "false"
|
||||
},
|
||||
"applications" :
|
||||
[
|
||||
{
|
||||
"name" : "client-sample",
|
||||
"id" : "0x1343"
|
||||
},
|
||||
{
|
||||
"name" : "service-sample",
|
||||
"id" : "0x1277"
|
||||
}
|
||||
],
|
||||
"services" :
|
||||
[
|
||||
{
|
||||
"service" : "0x1234",
|
||||
"instance" : "0x5678",
|
||||
"reliable" : { "port" : "30509", "enable-magic-cookies" : "false" },
|
||||
"unreliable" : "31000"
|
||||
}
|
||||
],
|
||||
"routing" : "client-sample",
|
||||
"service-discovery" :
|
||||
{
|
||||
"enable" : "true",
|
||||
"multicast" : "224.244.224.245",
|
||||
"port" : "30490",
|
||||
"protocol" : "udp"
|
||||
}
|
||||
}
|
@@ -0,0 +1,202 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set(PRJ_NAME LocIdlAPI)
|
||||
|
||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
OPTION(USE_FILE "Set to OFF to disable file logging" OFF )
|
||||
message(STATUS "USE_FILE is set to value: ${USE_FILE}")
|
||||
|
||||
OPTION(USE_CONSOLE "Set to OFF to disable console logging" OFF )
|
||||
message(STATUS "USE_CONSOLE is set to value: ${USE_CONSOLE}")
|
||||
|
||||
IF(USE_FILE)
|
||||
add_definitions(-DUSE_FILE)
|
||||
ENDIF(USE_FILE)
|
||||
IF(USE_CONSOLE)
|
||||
add_definitions(-DUSE_CONSOLE)
|
||||
ENDIF(USE_CONSOLE)
|
||||
|
||||
add_definitions(-D__LINUX__)
|
||||
add_definitions(-DOFF_TARGET)
|
||||
add_definitions(-std=c++14)
|
||||
add_definitions(-DBASE_PATH=/var/tmp/location)
|
||||
add_definitions(-DUSE_ANDROID_LOGGING)
|
||||
|
||||
SET(MAX_LOG_LEVEL "DEBUG" CACHE STRING "maximum log level")
|
||||
message(STATUS "MAX_LOG_LEVEL is set to value: ${MAX_LOG_LEVEL}")
|
||||
add_definitions(-DCOMMONAPI_LOGLEVEL=COMMONAPI_LOGLEVEL_${MAX_LOG_LEVEL})
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "QNX")
|
||||
set (OS "QNX")
|
||||
set (NO_DEPRECATED_REGISTER "")
|
||||
set (Boost_USE_STATIC_LIBS ON)
|
||||
endif (${CMAKE_SYSTEM_NAME} MATCHES "QNX")
|
||||
|
||||
if (MSVC)
|
||||
# Visual C++ is not always sure whether he is really C++
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /EHsc /wd\\\"4503\\\"")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd\\\"4503\\\"")
|
||||
else()
|
||||
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -Wall -O0 -std=c++11 -D_GLIBCXX_USE_NANOSLEEP -DQNX")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O0 -std=c++11 -D_GLIBCXX_USE_NANOSLEEP")
|
||||
endif()
|
||||
|
||||
message(STATUS "Compiler options: ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
|
||||
"Choose the type of build, options are: Debug Release." FORCE)
|
||||
endif(NOT CMAKE_BUILD_TYPE)
|
||||
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
||||
|
||||
OPTION(USE_INSTALLED_COMMONAPI "Set to OFF to use the local (build tree) version of CommonAPI" ON)
|
||||
message(STATUS "USE_INSTALLED_COMMONAPI is set to value: ${USE_INSTALLED_COMMONAPI}")
|
||||
|
||||
if ("${USE_INSTALLED_COMMONAPI}" STREQUAL "ON")
|
||||
FIND_PACKAGE(CommonAPI 3.2.0 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
|
||||
#FIND_PACKAGE(CommonAPI-DBus 3.2.0 REQUIRED CONFIG NO_CMAKE_PACKAGE_REGISTRY)
|
||||
else()
|
||||
FIND_PACKAGE(CommonAPI 3.2.0 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
|
||||
#FIND_PACKAGE(CommonAPI-DBus 3.2.0 REQUIRED CONFIG NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH)
|
||||
endif()
|
||||
|
||||
message(STATUS "CommonAPI_CONSIDERED_CONFIGS: ${CommonAPI_CONSIDERED_CONFIGS}")
|
||||
message(STATUS "COMMONAPI_INCLUDE_DIRS: ${COMMONAPI_INCLUDE_DIRS}")
|
||||
message(STATUS "CommonAPI-DBus_CONSIDERED_CONFIGS: ${CommonAPI-DBus_CONSIDERED_CONFIGS}")
|
||||
message(STATUS "COMMONAPI_DBUS_INCLUDE_DIRS: ${COMMONAPI_DBUS_INCLUDE_DIRS}")
|
||||
|
||||
# CommonAPI
|
||||
include(FindPkgConfig)
|
||||
###############################################################################
|
||||
# find DBus by using the 'pkg-config' tool
|
||||
if (MSVC)
|
||||
#Not beautiful, but it works
|
||||
if (DBus_DIR)
|
||||
if (DBus_BUILD_DIR)
|
||||
set(DBus_INCLUDE_DIRS "${DBus_DIR};${DBus_BUILD_DIR};")
|
||||
else ()
|
||||
message (FATAL_ERROR "DBus_BUILD_DIR not set! Cannot continue.")
|
||||
endif ()
|
||||
else()
|
||||
message (FATAL_ERROR "DBus_DIR not set! Cannot continue.")
|
||||
endif ()
|
||||
else()
|
||||
# pkg_check_modules(DBus REQUIRED dbus-1>=1.4)
|
||||
endif()
|
||||
|
||||
SYSR_INCLUDE_DIR(qcom-gps-utils)
|
||||
SYSR_INCLUDE_DIR(location-client-api)
|
||||
SYSR_INCLUDE_DIR(open-avb)
|
||||
SYSR_INCLUDE_DIR(location-integration-api)
|
||||
SYSR_INCLUDE_DIR(loc-diag-iface-hdr)
|
||||
|
||||
check_cxx_compiler_flag("-DPOWER_DAEMON_MGR_ENABLED" FLAG_POWER_DAEMON_MGR_ENABLED)
|
||||
|
||||
if (FLAG_POWER_DAEMON_MGR_ENABLED)
|
||||
add_definitions(-DPOWER_DAEMON_MGR_ENABLED)
|
||||
SYSR_INCLUDE_DIR(powermanager)
|
||||
else()
|
||||
message(STATUS "Flag -DPOWER_DAEMON_MGR_ENABLED is not supported.")
|
||||
endif()
|
||||
|
||||
# SOME/IP
|
||||
find_package (CommonAPI-SomeIP 3.2.0 REQUIRED)
|
||||
find_package (vsomeip3 3.1.20 REQUIRED)
|
||||
|
||||
# Source Files
|
||||
set(PRJ_SRC_PATH ../../src/LocIdlService)
|
||||
set(PRJ_SRC_GEN_PATH ../../src-gen)
|
||||
set(PRJ_SRC_GEN_COMMONAPI_PATH ${PRJ_SRC_GEN_PATH}/core/v0/com/qualcomm/qti/location)
|
||||
set(PRJ_SRC_GEN_COMMONAPI_DBUS_PATH ${PRJ_SRC_GEN_PATH}/dbus/v0/com/qualcomm/qti/location)
|
||||
set(PRJ_SRC_GEN_COMMONAPI_SOMEIP_PATH ${PRJ_SRC_GEN_PATH}/someip/v0/com/qualcomm/qti/location)
|
||||
|
||||
set(PRJ_NAME_SERVICE ${PRJ_NAME}Service)
|
||||
|
||||
# Application
|
||||
FILE(GLOB PRJ_PROXY_GEN_SRCS ${PRJ_SRC_GEN_COMMONAPI_PATH}/*Proxy.cpp)
|
||||
FILE(GLOB PRJ_STUB_GEN_SRCS ${PRJ_SRC_GEN_COMMONAPI_PATH}/*Stub*.cpp)
|
||||
FILE(GLOB PRJ_STUB_IMPL_SRCS ${PRJ_SRC_COMMONAPI_PATH}/*Stub*.cpp)
|
||||
set(PRJ_SERVICE_SRCS ${PRJ_SRC_PATH}/${PRJ_NAME_SERVICE}.cpp ${PRJ_SRC_PATH}/${PRJ_NAME}StubImpl.cpp ${PRJ_STUB_GEN_SRCS} ${PRJ_STUB_IMPL_SRCS} ${PRJ_SRC_PATH}/LocLcaIdlConverter.cpp ${PRJ_SRC_PATH}/LocIdlPowerEvtManager.cpp ${PRJ_SRC_PATH}/LocIdlServiceLog.cpp)
|
||||
|
||||
# Boost
|
||||
#find_package( Boost 1.71 COMPONENTS system thread log REQUIRED )
|
||||
include_directories( ${Boost_INCLUDE_DIR} )
|
||||
|
||||
# DBus library
|
||||
FILE(GLOB PRJ_DBUS_LIB_SRCS ${PRJ_SRC_GEN_COMMONAPI_DBUS_PATH}/*cpp)
|
||||
|
||||
# SOME/IP library
|
||||
FILE(GLOB PRJ_SOMEIP_LIB_SRCS ${PRJ_SRC_GEN_COMMONAPI_SOMEIP_PATH}/*cpp)
|
||||
|
||||
# Paths
|
||||
OPTION(USE_INSTALLED_DBUS "Set to OFF to use the local (patched) version of dbus" ON)
|
||||
message(STATUS "USE_INSTALLED_DBUS is set to value: ${USE_INSTALLED_DBUS}")
|
||||
|
||||
include_directories(
|
||||
../../src-gen/core
|
||||
../../src-gen/someip
|
||||
${COMMONAPI_INCLUDE_DIRS}
|
||||
${COMMONAPI_SOMEIP_INCLUDE_DIRS}
|
||||
${VSOMEIP_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
if ("${USE_INSTALLED_DBUS}" STREQUAL "ON")
|
||||
link_directories(
|
||||
${COMMONAPI_LIBDIR}
|
||||
${COMMONAPI_SOMEIP_CMAKE_DIR}/build
|
||||
${Boost_LIBRARY_DIR}
|
||||
)
|
||||
else()
|
||||
link_directories(
|
||||
${COMMONAPI_LIBDIR}
|
||||
${COMMONAPI_SOMEIP_CMAKE_DIR}/build
|
||||
${DBus_INCLUDE_DIRS}/dbus/.libs
|
||||
${Boost_LIBRARY_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
set(LINK_LIBRARIES CommonAPI location_client_api gps_utils gptp location_integration_api log)
|
||||
else()
|
||||
set(LINK_LIBRARIES -Wl,--as-needed CommonAPI location_client_api gps_utils gptp location_integration_api log)
|
||||
endif()
|
||||
|
||||
# Build service
|
||||
add_executable(${PRJ_NAME_SERVICE} ${PRJ_SERVICE_SRCS})
|
||||
if (FLAG_POWER_DAEMON_MGR_ENABLED)
|
||||
target_link_libraries(${PRJ_NAME_SERVICE} ${LINK_LIBRARIES} powermanager)
|
||||
else ()
|
||||
target_link_libraries(${PRJ_NAME_SERVICE} ${LINK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
# Build DBus library
|
||||
#add_library (${PRJ_NAME}-dbus SHARED ${PRJ_DBUS_LIB_SRCS})
|
||||
#target_link_libraries(${PRJ_NAME}-dbus CommonAPI-DBus)
|
||||
|
||||
# Build SOME/IP library
|
||||
add_library (${PRJ_NAME}-someip SHARED ${PRJ_SOMEIP_LIB_SRCS})
|
||||
target_link_libraries(${PRJ_NAME}-someip CommonAPI-SomeIP)
|
||||
install (
|
||||
# TARGETS ${PRJ_NAME_CLIENT} ${PRJ_NAME_SERVICE}
|
||||
TARGETS ${PRJ_NAME_SERVICE}
|
||||
RUNTIME DESTINATION "${INSTALL_BIN_DIR}" COMPONENT bin)
|
||||
|
||||
install (
|
||||
TARGETS ${PRJ_NAME}-someip
|
||||
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT shlib
|
||||
)
|
||||
|
||||
|
||||
set(EXAMPLE_CONFIG_FILES
|
||||
"vsomeip-location.json"
|
||||
"vsomeip-service.json"
|
||||
"commonapi4someip.ini"
|
||||
"vsomeip-local.json"
|
||||
)
|
||||
|
||||
install (
|
||||
FILES ${EXAMPLE_CONFIG_FILES} DESTINATION /etc COMPONENT config
|
||||
)
|
||||
|
@@ -0,0 +1,896 @@
|
||||
/*
|
||||
Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted (subject to the limitations in the
|
||||
disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
|
||||
*/
|
||||
|
||||
#define LOG_TAG "LOC_IDL_SERVICE"
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
#include <stdio.h>
|
||||
#include <functional>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <CommonAPI/CommonAPI.hpp>
|
||||
#include "LocIdlAPIStubImpl.hpp"
|
||||
#include "LocIdlAPIService.h"
|
||||
#include "gptp_helper.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace v0::com::qualcomm::qti::location;
|
||||
using namespace location_client;
|
||||
|
||||
static bool capabilitiesReceived = false;
|
||||
static uint32_t posCount = 0;
|
||||
static uint32_t latentPosCount = 0;
|
||||
static bool exitFromMemUsageMsgTask = false;
|
||||
/** Latency threshold for Position reports in msec */
|
||||
#define MAX_POSITION_LATENCY 20
|
||||
#define IDL_MAX_RETRY 5
|
||||
|
||||
static void onConfigResponseCb(location_integration::LocConfigTypeEnum requestType,
|
||||
location_integration::LocIntegrationResponse response) {
|
||||
LOC_LOGd("<<< onConfigResponseCb, type %d, err %d\n", requestType, response);
|
||||
}
|
||||
|
||||
class LocationTrackingSessCbHandler {
|
||||
public:
|
||||
LocationTrackingSessCbHandler(const LocIdlAPIService *pClientApiService,
|
||||
const uint32_t &reportCbMask) {
|
||||
if (NULL != pClientApiService) {
|
||||
LOC_LOGd(" ==== LocationTrackingSessCbHandler --> ");
|
||||
memset(&mCallbackOptions, 0, sizeof(GnssReportCbs));
|
||||
if (reportCbMask & LocIdlAPI::IDLGnssReportCbInfoMask::IDL_LOC_CB_INFO_BIT) {
|
||||
mCallbackOptions.gnssLocationCallback =
|
||||
[pClientApiService] (const ::GnssLocation n) {
|
||||
//Convert Location report from LCA to FIDL format
|
||||
if (pClientApiService->mLcaIdlConverter) {
|
||||
LocIdlAPI::IDLLocationReport idlLocRpt =
|
||||
pClientApiService->parseLocationReport(n);
|
||||
posCount++;
|
||||
struct timespec curBootTime = {};
|
||||
clock_gettime(CLOCK_BOOTTIME, &curBootTime);
|
||||
int64_t curBootTimeNs = ((int64_t)curBootTime.tv_sec * 1000000000) +
|
||||
(int64_t)curBootTime.tv_nsec;
|
||||
int16_t latencyMs = 0;
|
||||
latencyMs = (int16_t)((curBootTimeNs - n.elapsedRealTimeNs)/1000000);
|
||||
if (latencyMs > MAX_POSITION_LATENCY) {
|
||||
latentPosCount++;
|
||||
}
|
||||
if (posCount % 600 == 0) {
|
||||
LOC_LOGe("%"PRId64" out of %"PRId64" Position samples are"
|
||||
" latent by 20 msec",
|
||||
latentPosCount, posCount);
|
||||
}
|
||||
idlLocRpt.setReportingLatency(latencyMs);
|
||||
if (pClientApiService->mDiagLogIface) {
|
||||
pClientApiService->mDiagLogIface->diagLogGnssReportInfo(
|
||||
OUTPUT_PVT_REPORT, latencyMs, latentPosCount);
|
||||
}
|
||||
if (pClientApiService->mService) {
|
||||
pClientApiService->mService->fireLocationReportEvent(idlLocRpt);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
if (reportCbMask &
|
||||
LocIdlAPI::IDLGnssReportCbInfoMask::IDL_SV_CB_INFO_BIT) {
|
||||
mCallbackOptions.gnssSvCallback =
|
||||
[pClientApiService](const std::vector<::GnssSv>& gnssSvs) {
|
||||
std::vector<LocIdlAPI::IDLGnssSv> idlSVReportVector;
|
||||
LOC_LOGd("Number of SV's recevived -- %d", gnssSvs.size());
|
||||
if (pClientApiService->mLcaIdlConverter) {
|
||||
for (auto GnssSv : gnssSvs) {
|
||||
//Convert Location report from LCA to FIDL format
|
||||
LocIdlAPI::IDLGnssSv idlSVRpt =
|
||||
pClientApiService->parseGnssSvReport(GnssSv);
|
||||
idlSVReportVector.push_back(idlSVRpt);
|
||||
}
|
||||
if (pClientApiService->mService) {
|
||||
pClientApiService->mService->fireGnssSvEvent(idlSVReportVector);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
if (reportCbMask &
|
||||
LocIdlAPI::IDLGnssReportCbInfoMask::IDL_NMEA_CB_INFO_BIT) {
|
||||
mCallbackOptions.nmeaSentencesCallback =
|
||||
[pClientApiService](::LocOutputEngineType engType,
|
||||
uint64_t timestamp, const std::string nmea) {
|
||||
if (pClientApiService->mService) {
|
||||
pClientApiService->mService->fireGnssNmeaEvent(timestamp, nmea);
|
||||
}
|
||||
};
|
||||
}
|
||||
if (reportCbMask &
|
||||
LocIdlAPI::IDLGnssReportCbInfoMask::IDL_1HZ_MEAS_CB_INFO_BIT) {
|
||||
mCallbackOptions.gnssMeasurementsCallback =
|
||||
[pClientApiService](const ::GnssMeasurements gnssMeasurements) {
|
||||
if (pClientApiService->mLcaIdlConverter) {
|
||||
LocIdlAPI::IDLGnssMeasurements idlGnssMeasurement =
|
||||
pClientApiService->parseGnssMeasurements(gnssMeasurements);
|
||||
struct timespec curBootTime = {};
|
||||
clock_gettime(CLOCK_BOOTTIME, &curBootTime);
|
||||
int64_t curBootTimeNs = ((int64_t)curBootTime.tv_sec * 1000000000) +
|
||||
(int64_t)curBootTime.tv_nsec;
|
||||
int16_t latencyMs = 0;
|
||||
latencyMs = (int16_t)((curBootTimeNs -
|
||||
gnssMeasurements.clock.elapsedRealTime)/1000000);
|
||||
idlGnssMeasurement.setReportingLatency(latencyMs);
|
||||
if (pClientApiService->mDiagLogIface) {
|
||||
pClientApiService->mDiagLogIface->diagLogGnssReportInfo(
|
||||
OUTPUT_MEAS_REPORT, latencyMs, 0);
|
||||
}
|
||||
if (pClientApiService->mService) {
|
||||
pClientApiService->mService->fireGnssMeasurementsEvent(
|
||||
idlGnssMeasurement);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
// GnssDataCb
|
||||
if (reportCbMask & LocIdlAPI::IDLGnssReportCbInfoMask::IDL_DATA_CB_INFO_BIT) {
|
||||
mCallbackOptions.gnssDataCallback =
|
||||
[pClientApiService] (const ::GnssData n) {
|
||||
//Convert GnssData report from LCA to FIDL format
|
||||
if (pClientApiService->mLcaIdlConverter) {
|
||||
LocIdlAPI::IDLGnssData idlGnssDataRpt =
|
||||
pClientApiService->parseGnssDataReport(n);
|
||||
if (pClientApiService->mService) {
|
||||
pClientApiService->mService->fireGnssDataEvent(idlGnssDataRpt);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LocationTrackingSessCbHandler(const LocIdlAPIService *pClientApiService,
|
||||
const uint32_t &locReqEngMask, const uint32_t &engReportCallbackMask) {
|
||||
if (NULL != pClientApiService) {
|
||||
memset(&mEngineCallbackOptions, 0, sizeof(EngineReportCbs));
|
||||
|
||||
if (engReportCallbackMask &
|
||||
LocIdlAPI::IDLEngineReportCbMask::IDL_ENGINE_LOCATION_CB_INFO_BIT) {
|
||||
mEngineCallbackOptions.engLocationsCallback =
|
||||
[pClientApiService] (const std::vector<::GnssLocation> &engLocations) {
|
||||
if (pClientApiService->mLcaIdlConverter) {
|
||||
std::vector<LocIdlAPI::IDLLocationReport> idlEngLocVector;
|
||||
for (auto gnssLocation : engLocations) {
|
||||
LocIdlAPI::IDLLocationReport idlLocRpt =
|
||||
pClientApiService->parseLocationReport(gnssLocation);
|
||||
idlEngLocVector.push_back(idlLocRpt);
|
||||
}
|
||||
if (pClientApiService->mService) {
|
||||
pClientApiService->mService->fireEngineLocationsEvent(
|
||||
idlEngLocVector);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
//Fill LocReqEngMask
|
||||
memset(&mLcaLocReqEngMask, 0, sizeof(location_client::LocReqEngineTypeMask));
|
||||
uint32_t lcaLocReqEngMask = 0;
|
||||
if (locReqEngMask &
|
||||
LocIdlAPI::IDLLocReqEngineTypeMask::IDL_LOC_REQ_ENG_FUSED) {
|
||||
lcaLocReqEngMask |= location_client::LOC_REQ_ENGINE_FUSED_BIT;
|
||||
}
|
||||
if (locReqEngMask & LocIdlAPI::IDLLocReqEngineTypeMask::IDL_LOC_REQ_ENG_SPE) {
|
||||
lcaLocReqEngMask |= location_client::LOC_REQ_ENGINE_SPE_BIT;
|
||||
}
|
||||
if (locReqEngMask & LocIdlAPI::IDLLocReqEngineTypeMask::IDL_LOC_REQ_ENG_PPE) {
|
||||
lcaLocReqEngMask |= location_client::LOC_REQ_ENGINE_PPE_BIT;
|
||||
}
|
||||
if (locReqEngMask & LocIdlAPI::IDLLocReqEngineTypeMask::IDL_LOC_REQ_ENG_VPE) {
|
||||
lcaLocReqEngMask |= location_client::LOC_REQ_ENGINE_VPE_BIT;
|
||||
}
|
||||
|
||||
mLcaLocReqEngMask = (location_client::LocReqEngineTypeMask)lcaLocReqEngMask;
|
||||
}
|
||||
}
|
||||
|
||||
GnssReportCbs& getLocationCbs() { return mCallbackOptions; }
|
||||
EngineReportCbs& getEngineLocationCbs() { return mEngineCallbackOptions; }
|
||||
location_client::LocReqEngineTypeMask& getLcaLocReqEngMask() { return mLcaLocReqEngMask; }
|
||||
|
||||
private:
|
||||
GnssReportCbs mCallbackOptions;
|
||||
EngineReportCbs mEngineCallbackOptions;
|
||||
location_client::LocReqEngineTypeMask mLcaLocReqEngMask;
|
||||
|
||||
};
|
||||
|
||||
LocIdlAPI::IDLLocationReport LocIdlAPIService::parseLocationReport
|
||||
(
|
||||
const location_client::GnssLocation &lcaLoc
|
||||
|
||||
) const {
|
||||
return (mLcaIdlConverter->parseLocReport(lcaLoc));
|
||||
}
|
||||
|
||||
LocIdlAPI::IDLGnssSv LocIdlAPIService::parseGnssSvReport
|
||||
(
|
||||
const location_client::GnssSv& gnssSvs
|
||||
) const {
|
||||
return (mLcaIdlConverter->parseSvReport(gnssSvs));
|
||||
}
|
||||
|
||||
LocIdlAPI::IDLGnssMeasurements LocIdlAPIService::parseGnssMeasurements
|
||||
(
|
||||
const location_client::GnssMeasurements& gnssMeasurements
|
||||
) const {
|
||||
return (mLcaIdlConverter->parseMeasurements(gnssMeasurements));
|
||||
}
|
||||
|
||||
LocIdlAPI::IDLGnssData LocIdlAPIService::parseGnssDataReport
|
||||
(
|
||||
const location_client::GnssData& gnssData
|
||||
) const {
|
||||
return (mLcaIdlConverter->parseGnssData(gnssData));
|
||||
}
|
||||
|
||||
LocIdlAPIService* LocIdlAPIService::mInstance = nullptr;
|
||||
LocIdlAPIService* LocIdlAPIService::getInstance()
|
||||
{
|
||||
if (nullptr == mInstance) {
|
||||
mInstance = new LocIdlAPIService();
|
||||
}
|
||||
return mInstance;
|
||||
}
|
||||
|
||||
LocIdlAPIService::LocIdlAPIService():
|
||||
mLcaInstance(nullptr),
|
||||
mMsgTask(new MsgTask("LocIDLService")),
|
||||
mLIAInstance(nullptr),
|
||||
#ifdef POWER_DAEMON_MGR_ENABLED
|
||||
mPowerEventObserver(nullptr),
|
||||
#endif
|
||||
mLcaIdlConverter(new LocLcaIdlConverter()),
|
||||
mDiagLogIface(new LocIdlServiceLog()),
|
||||
mGnssReportMask(0),
|
||||
numControlRequests(0),
|
||||
mMemoryMonitorMsgTask(new MsgTask("LocIDLServiceMem")),
|
||||
serviceRegisterationStatus(false)
|
||||
{
|
||||
if (mDiagLogIface) {
|
||||
mDiagLogIface->initializeDiagIface();
|
||||
}
|
||||
}
|
||||
|
||||
LocIdlAPIService::~LocIdlAPIService()
|
||||
{
|
||||
exitFromMemUsageMsgTask = true;
|
||||
sleep(IDL_MEMORY_CHECK_INTERVAL_SEC);
|
||||
}
|
||||
|
||||
void LocIdlAPIService::onPowerEvent(IDLPowerStateType powerEvent) {
|
||||
LOC_LOGi("Recieved Power Event %d", powerEvent);
|
||||
struct PowerEventMsg : public LocMsg {
|
||||
|
||||
LocIdlAPIService* mIDLService;
|
||||
IDLPowerStateType mPowerEvent;
|
||||
inline PowerEventMsg(LocIdlAPIService* IDLService,
|
||||
IDLPowerStateType event) :
|
||||
LocMsg(),
|
||||
mIDLService(IDLService),
|
||||
mPowerEvent(event){};
|
||||
inline virtual void proc() const {
|
||||
bool retVal = false;
|
||||
uint8_t serviceStatus = SERVICE_STAUS_UNKNOWN;
|
||||
if (mIDLService) {
|
||||
switch (mPowerEvent) {
|
||||
case POWER_STATE_SUSPEND:
|
||||
case POWER_STATE_SHUTDOWN:
|
||||
retVal = mIDLService->unRegisterWithFIDLService();
|
||||
if (retVal) {
|
||||
serviceStatus = UNREGISTER_SERVICE_SUCCESS;
|
||||
mIDLService->serviceRegisterationStatus = false;
|
||||
} else {
|
||||
serviceStatus = UNREGISTER_SERVICE_FAILED;
|
||||
mIDLService->serviceRegisterationStatus = true;
|
||||
}
|
||||
break;
|
||||
case POWER_STATE_RESUME:
|
||||
retVal = mIDLService->registerWithFIDLService();
|
||||
if (retVal) {
|
||||
serviceStatus = REGISTER_SERVICE_SUCCESS;
|
||||
mIDLService->serviceRegisterationStatus = true;
|
||||
} else {
|
||||
serviceStatus =REGISTER_SERVICE_FAILED;
|
||||
mIDLService->serviceRegisterationStatus = false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LOC_LOGd(" Unknown Power Event: %d !!", mPowerEvent);
|
||||
}
|
||||
if (mIDLService->mDiagLogIface) {
|
||||
mIDLService->mDiagLogIface->diagLogPowerEventInfo(mPowerEvent, serviceStatus);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
mMsgTask->sendMsg(new PowerEventMsg(this, powerEvent));
|
||||
}
|
||||
|
||||
void LocIdlAPIService::updateSystemStatus(uint32_t totalRss) {
|
||||
bool gptpSyncStatus = false;
|
||||
if (gptpInit()) {
|
||||
gptpSyncStatus = gptpGetSyncStatus();
|
||||
}
|
||||
if (mDiagLogIface) {
|
||||
mDiagLogIface->updateSystemHealth(totalRss, gptpSyncStatus);
|
||||
}
|
||||
}
|
||||
|
||||
void LocIdlAPIService::monitorMemoryUsage () {
|
||||
struct MonitorMemoryUsageMsg : public LocMsg {
|
||||
LocIdlAPIService* mIdlService;
|
||||
inline MonitorMemoryUsageMsg(LocIdlAPIService* idlService):
|
||||
LocMsg(),
|
||||
mIdlService(idlService){};
|
||||
inline virtual void proc() const {
|
||||
const char *pFileName = "/proc/self/statm";
|
||||
const uint16_t pageSize = 4; //4K
|
||||
unsigned long size = 0, rssPages = 0, totalRSS = 0;
|
||||
unsigned long share = 0, text = 0, lib = 0, data = 0, dt = 0;
|
||||
if (mIdlService) {
|
||||
do {
|
||||
FILE *fp = fopen(pFileName, "r");
|
||||
if (NULL != fp) {
|
||||
if (7 == fscanf(fp, "%ld %ld %ld %ld %ld %ld %ld",
|
||||
&size, &rssPages, &share, &text, &lib, &data, &dt)) {
|
||||
totalRSS = rssPages * pageSize;
|
||||
mIdlService->updateSystemStatus(totalRSS);
|
||||
} else {
|
||||
LOC_LOGe("Failed to read data from %s!! error: %s",
|
||||
pFileName, strerror(errno));
|
||||
}
|
||||
fclose(fp);
|
||||
} else {
|
||||
LOC_LOGe("Failed to open the file %s!! error: %s",
|
||||
pFileName, strerror(errno));
|
||||
} if (exitFromMemUsageMsgTask) {
|
||||
LOC_LOGd("Normal exit from monitorMemoryUsage");
|
||||
break;
|
||||
}
|
||||
sleep(IDL_MEMORY_CHECK_INTERVAL_SEC); //Sleep and re-attempt
|
||||
} while (true);
|
||||
LOC_LOGe("Exiting monitorMemoryUsage...!");
|
||||
}
|
||||
}
|
||||
};
|
||||
mMemoryMonitorMsgTask->sendMsg(new MonitorMemoryUsageMsg(this));
|
||||
}
|
||||
bool LocIdlAPIService::init()
|
||||
{
|
||||
|
||||
struct InitMsg : public LocMsg {
|
||||
LocIdlAPIService* mLCAService;
|
||||
inline InitMsg(LocIdlAPIService* LCAService) :
|
||||
LocMsg(),
|
||||
mLCAService(LCAService){};
|
||||
|
||||
inline virtual void proc() const {
|
||||
if (mLCAService) {
|
||||
mLCAService->createLocIdlService();
|
||||
mLCAService->monitorMemoryUsage();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
mMsgTask->sendMsg(new InitMsg(this));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LocIdlAPIService::createLocIdlService()
|
||||
{
|
||||
LOC_LOGe("Initializing IDL Service ");
|
||||
// Create LCA object
|
||||
if (!mLcaInstance) {
|
||||
//Create capability callback
|
||||
CapabilitiesCb capabilitiesCb = [pClientApiService=this] (::LocationCapabilitiesMask mask) {
|
||||
LOC_LOGe("<<< onCapabilitiesCb mask=0x%" PRIx64 "", mask);
|
||||
LOC_LOGd("<<< onCapabilitiesCb mask string=%s ",
|
||||
LocationClientApi::capabilitiesToString(mask).c_str());
|
||||
pClientApiService->processCapabilities(mask);
|
||||
if (pClientApiService->mDiagLogIface)
|
||||
pClientApiService->mDiagLogIface->diagLogCapabilityInfo(
|
||||
LocationClientApi::capabilitiesToString(mask));
|
||||
};
|
||||
// Create LCA instance
|
||||
mLcaInstance = new LocationClientApi(capabilitiesCb);
|
||||
LOC_LOGi (" LCA instance created Successfully ");
|
||||
}
|
||||
|
||||
if (nullptr == mLIAInstance) {
|
||||
LocConfigPriorityMap priorityMap;
|
||||
LocIntegrationCbs intCbs;
|
||||
intCbs.configCb = LocConfigCb(onConfigResponseCb);
|
||||
mLIAInstance = new LocationIntegrationApi(priorityMap, intCbs);
|
||||
LOC_LOGi (" LIA instance created Successfully ");
|
||||
}
|
||||
#ifdef POWER_DAEMON_MGR_ENABLED
|
||||
if (nullptr == mPowerEventObserver && mInstance != NULL) {
|
||||
mPowerEventObserver = LocIdlPowerEvtHandler::getPwrEvtHandler(mInstance);
|
||||
if (nullptr == mPowerEventObserver) {
|
||||
LOC_LOGe(" mPowerEventObserver null !! ");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
serviceRegisterationStatus = registerWithFIDLService();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LocIdlAPIService::processCapabilities(::LocationCapabilitiesMask mask)
|
||||
{
|
||||
struct ProcessCapsMsg : public LocMsg {
|
||||
|
||||
LocIdlAPIService* mLCAService;
|
||||
::LocationCapabilitiesMask mMask;
|
||||
string mCapsMask;
|
||||
inline ProcessCapsMsg(LocIdlAPIService* LCAService,
|
||||
::LocationCapabilitiesMask mask, string capsMask) :
|
||||
LocMsg(),
|
||||
mLCAService(LCAService),
|
||||
mMask(mask),
|
||||
mCapsMask(capsMask){};
|
||||
inline virtual void proc() const {
|
||||
//convert capabilities from LCA to FIDL format
|
||||
uint32_t idlCapsMask = 0;
|
||||
if (mMask & LOCATION_CAPS_TIME_BASED_TRACKING_BIT) {
|
||||
idlCapsMask |= LocIdlAPI::IDLLocationCapabilitiesMask::\
|
||||
IDL_CAPS_TIME_BASED_TRACKING_BIT;
|
||||
}
|
||||
if (mMask & LOCATION_CAPS_GNSS_MEASUREMENTS_BIT) {
|
||||
idlCapsMask |= LocIdlAPI::IDLLocationCapabilitiesMask::IDL_CAPS_GNSS_MEAS_BIT;
|
||||
}
|
||||
//Update Capabilities to clients
|
||||
if (mLCAService->mService) {
|
||||
mLCAService->mService->fireGnssCapabilitiesMaskAttributeChanged(idlCapsMask);
|
||||
mLCAService->mDiagLogIface->diagLogCapabilityInfo(mCapsMask);
|
||||
} else {
|
||||
LOC_LOGe("mLCAService->mService == NULL !! \n");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
mMsgTask->sendMsg(new ProcessCapsMsg(this, mask,
|
||||
LocationClientApi::capabilitiesToString(mask)));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LocIdlAPIService::registerWithFIDLService()
|
||||
{
|
||||
LOC_LOGe("Registering IDL Service ");
|
||||
|
||||
CommonAPI::Runtime::setProperty("LogContext", "LOCIDL");
|
||||
CommonAPI::Runtime::setProperty("LogApplication", "LOCIDL");
|
||||
CommonAPI::Runtime::setProperty("LibraryBase", "LocIdlAPI");
|
||||
|
||||
std::shared_ptr<CommonAPI::Runtime> runtime = CommonAPI::Runtime::get();
|
||||
|
||||
std::string domain = "local";
|
||||
std::string instance = "com.qualcomm.qti.location.LocIdlAPI";
|
||||
std::string connection = "location-fidl-service";
|
||||
|
||||
bool successfullyRegistered = false;
|
||||
if (!serviceRegisterationStatus) {
|
||||
mService = std::make_shared<LocIdlAPIStubImpl>(this);
|
||||
if (runtime && mService) {
|
||||
successfullyRegistered = runtime->registerService(domain, instance,
|
||||
mService, connection);
|
||||
while (!successfullyRegistered) {
|
||||
LOC_LOGe("Register IDL Service failed, trying again in 100 milliseconds !!");
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
successfullyRegistered = runtime->registerService(domain,
|
||||
instance, mService, connection);
|
||||
}
|
||||
LOC_LOGd("Successfully Registered Service!");
|
||||
} else {
|
||||
LOC_LOGe(" Either mService or runtime is NULL !! ");
|
||||
}
|
||||
} else {
|
||||
successfullyRegistered = true;
|
||||
}
|
||||
|
||||
return successfullyRegistered;
|
||||
}
|
||||
|
||||
bool LocIdlAPIService::unRegisterWithFIDLService()
|
||||
{
|
||||
LOC_LOGi("UnRegistering IDL Service ");
|
||||
|
||||
std::shared_ptr<CommonAPI::Runtime> runtime = CommonAPI::Runtime::get();
|
||||
|
||||
std::string domain = "local";
|
||||
std::string instance = "com.qualcomm.qti.location.LocIdlAPI";
|
||||
std::string connection = "location-fidl-service";
|
||||
bool successfullyUnRegistered = false;
|
||||
if (serviceRegisterationStatus) {
|
||||
successfullyUnRegistered = runtime->unregisterService(domain,
|
||||
v0::com::qualcomm::qti::location::LocIdlAPI::getInterface(), instance);
|
||||
uint8_t count = 1;
|
||||
while (!successfullyUnRegistered && count <= IDL_MAX_RETRY) {
|
||||
LOC_LOGi("UnRegister IDL Service failed, No. of retires: %d !!", count);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
successfullyUnRegistered = runtime->unregisterService(domain,
|
||||
v0::com::qualcomm::qti::location::LocIdlAPI::getInterface(), instance);
|
||||
count++;
|
||||
}
|
||||
LOC_LOGi("Successfully UnRegistered Service!");
|
||||
}
|
||||
return successfullyUnRegistered;
|
||||
}
|
||||
|
||||
LocIdlAPI::IDLLocationResponse LocIdlAPIService::parseIDLResponse(
|
||||
const location_client::LocationResponse lcaResponse) const {
|
||||
|
||||
LocIdlAPI::IDLLocationResponse resp = LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_UNKNOWN;
|
||||
switch (lcaResponse) {
|
||||
case LOCATION_RESPONSE_SUCCESS:
|
||||
resp = LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_SUCCESS;
|
||||
break;
|
||||
case LOCATION_RESPONSE_UNKOWN_FAILURE:
|
||||
resp = LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_UNKOWN_FAILURE;
|
||||
break;
|
||||
case LOCATION_RESPONSE_NOT_SUPPORTED:
|
||||
resp = LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_NOT_SUPPORTED;
|
||||
break;
|
||||
case LOCATION_RESPONSE_PARAM_INVALID:
|
||||
resp = LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_PARAM_INVALID;
|
||||
break;
|
||||
case LOCATION_RESPONSE_TIMEOUT:
|
||||
resp = LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_TIMEOUT;
|
||||
break;
|
||||
case LOCATION_RESPONSE_REQUEST_ALREADY_IN_PROGRESS:
|
||||
resp = LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_REQUEST_ALREADY_IN_PROGRESS;
|
||||
break;
|
||||
case LOCATION_RESPONSE_SYSTEM_NOT_READY:
|
||||
resp = LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_SYSTEM_NOT_READY;
|
||||
break;
|
||||
case LOCATION_RESPONSE_EXCLUSIVE_SESSION_IN_PROGRESS:
|
||||
resp = LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_EXCLUSIVE_SESSION_IN_PROGRESS;
|
||||
break;
|
||||
default:
|
||||
resp = LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_UNKNOWN;
|
||||
}
|
||||
return resp;
|
||||
}
|
||||
|
||||
/* Process Fused/Detailed Position request */
|
||||
void LocIdlAPIService::startPositionSession
|
||||
(
|
||||
const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
uint32_t intervalInMs, uint32_t gnssReportCallbackMask,
|
||||
LocIdlAPIStub::startPositionSessionReply_t reply
|
||||
) const
|
||||
{
|
||||
struct StartFusedPosMsg : public LocMsg {
|
||||
const LocIdlAPIService* mLCAService;
|
||||
const std::shared_ptr<CommonAPI::ClientId> mClient;
|
||||
uint32_t mIntervalInMs;
|
||||
uint32_t mGnssReportCbMask;
|
||||
LocIdlAPIStub::startPositionSession1Reply_t mReply;
|
||||
inline StartFusedPosMsg(const LocIdlAPIService* LCAService,
|
||||
const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
uint32_t intervalInMs,
|
||||
uint32_t gnssReportCallbackMask,
|
||||
LocIdlAPIStub::startPositionSession1Reply_t reply) :
|
||||
LocMsg(),
|
||||
mLCAService(LCAService),
|
||||
mClient(client),
|
||||
mIntervalInMs(intervalInMs),
|
||||
mGnssReportCbMask(gnssReportCallbackMask),
|
||||
mReply(reply){};
|
||||
inline virtual void proc() const {
|
||||
if (mLCAService) {
|
||||
mLCAService->numControlRequests++;
|
||||
mLCAService->mGnssReportMask |= mGnssReportCbMask;
|
||||
LOC_LOGi("==== startPositionSession intervalMs %u GnssReportCbMask 0X%X"
|
||||
" LCAReportMask 0X%X numControlRequests %u", mIntervalInMs,
|
||||
mGnssReportCbMask, mLCAService->mGnssReportMask,
|
||||
mLCAService->numControlRequests);
|
||||
LocationTrackingSessCbHandler cbHandler(mLCAService, mLCAService->mGnssReportMask);
|
||||
ResponseCb rspCb = [client=mClient, reply=mReply] (::LocationResponse response) {
|
||||
LOC_LOGd("==== responseCb %d", response);
|
||||
//convert response from LCA to FIDL format
|
||||
LocIdlAPI::IDLLocationResponse resp = mInstance->parseIDLResponse(response);
|
||||
reply(resp);
|
||||
};
|
||||
|
||||
if (mLCAService->mLcaInstance) {
|
||||
mLCAService->mLcaInstance->startPositionSession(mIntervalInMs,
|
||||
cbHandler.getLocationCbs(), rspCb);
|
||||
}
|
||||
diagControlCommandInfo idlSessionInfo = {};
|
||||
idlSessionInfo.sessionRequestType = SESSION_START_REQUEST;
|
||||
idlSessionInfo.intervalMs = mIntervalInMs;
|
||||
idlSessionInfo.requestedCallbackMask = mGnssReportCbMask;
|
||||
idlSessionInfo.updatedCallbackMask = mLCAService->mGnssReportMask;
|
||||
idlSessionInfo.numControlRequests = mLCAService->numControlRequests;
|
||||
if (mLCAService->mDiagLogIface) {
|
||||
mLCAService->mDiagLogIface->diagLogSessionInfo(idlSessionInfo,
|
||||
mClient->hashCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
mMsgTask->sendMsg(new StartFusedPosMsg(this, client, intervalInMs,
|
||||
gnssReportCallbackMask, reply));
|
||||
}
|
||||
|
||||
/* Process Engine specific Position request */
|
||||
void LocIdlAPIService::startPositionSession
|
||||
(
|
||||
const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
uint32_t intervalInMs, uint32_t locReqEngMask, uint32_t engReportCallbackMask,
|
||||
LocIdlAPIStub::startPositionSession1Reply_t reply
|
||||
) const
|
||||
{
|
||||
struct StartPosMsg : public LocMsg {
|
||||
|
||||
const LocIdlAPIService* mLCAService;
|
||||
const std::shared_ptr<CommonAPI::ClientId> mClient;
|
||||
uint32_t mIntervalInMs;
|
||||
uint32_t mLocReqEngMask;
|
||||
uint32_t mEngReportCallbackMask;
|
||||
LocIdlAPIStub::startPositionSession1Reply_t mReply;
|
||||
inline StartPosMsg(const LocIdlAPIService* LCAService,
|
||||
const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
uint32_t intervalInMs,
|
||||
uint32_t locReqEngMask,
|
||||
uint32_t engReportCallbackMask,
|
||||
LocIdlAPIStub::startPositionSession1Reply_t reply) :
|
||||
LocMsg(),
|
||||
mLCAService(LCAService),
|
||||
mClient(client),
|
||||
mIntervalInMs(intervalInMs),
|
||||
mLocReqEngMask(locReqEngMask),
|
||||
mEngReportCallbackMask(engReportCallbackMask),
|
||||
mReply(reply){};
|
||||
inline virtual void proc() const {
|
||||
if (mLCAService) {
|
||||
mLCAService->numControlRequests++;
|
||||
LOC_LOGi("==== startPositionSession Engine Specific %u 0X%X 0X%X ",
|
||||
mIntervalInMs, mLocReqEngMask, mEngReportCallbackMask);
|
||||
LocationTrackingSessCbHandler cbHandler(mLCAService, mLocReqEngMask,
|
||||
mEngReportCallbackMask);
|
||||
ResponseCb rspCb = [client=mClient, reply=mReply] (::LocationResponse response) {
|
||||
LOC_LOGd("==== responseCb %d", response);
|
||||
//convert response from LCA to FIDL format
|
||||
LocIdlAPI::IDLLocationResponse resp = mInstance->parseIDLResponse(response);
|
||||
reply(resp);
|
||||
};
|
||||
|
||||
if (mLCAService->mLcaInstance) {
|
||||
mLCAService->mLcaInstance->startPositionSession(mIntervalInMs,
|
||||
cbHandler.getLcaLocReqEngMask(),
|
||||
cbHandler.getEngineLocationCbs(),
|
||||
rspCb);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
mMsgTask->sendMsg(new StartPosMsg(this, client, intervalInMs,
|
||||
locReqEngMask, engReportCallbackMask, reply));
|
||||
}
|
||||
|
||||
void LocIdlAPIService::stopPositionSession
|
||||
(
|
||||
const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
LocIdlAPIStub::stopPositionSessionReply_t reply
|
||||
) const
|
||||
{
|
||||
struct StopPosMsg : public LocMsg {
|
||||
const LocIdlAPIService* mLCAService;
|
||||
const std::shared_ptr<CommonAPI::ClientId> mClient;
|
||||
LocIdlAPIStub::stopPositionSessionReply_t mReply;
|
||||
inline StopPosMsg(const LocIdlAPIService* LCAService,
|
||||
const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
LocIdlAPIStub::stopPositionSessionReply_t reply) :
|
||||
LocMsg(),
|
||||
mLCAService(LCAService),
|
||||
mClient(client),
|
||||
mReply(reply){};
|
||||
inline virtual void proc() const {
|
||||
if (mLCAService) {
|
||||
if (mLCAService->numControlRequests > 0) {
|
||||
mLCAService->numControlRequests--;
|
||||
diagControlCommandInfo idlSessionInfo = {};
|
||||
idlSessionInfo.sessionRequestType = SESSION_STOP_REQUEST;
|
||||
idlSessionInfo.numControlRequests = mLCAService->numControlRequests;
|
||||
if (mLCAService->mDiagLogIface) {
|
||||
mLCAService->mDiagLogIface->diagLogSessionInfo(
|
||||
idlSessionInfo, mClient->hashCode());
|
||||
}
|
||||
if (!mLCAService->numControlRequests) {
|
||||
LOC_LOGd(" Sending STOP Session request !!");
|
||||
mLCAService->mLcaInstance->stopPositionSession();
|
||||
posCount = 0;
|
||||
latentPosCount = 0;
|
||||
mLCAService->mGnssReportMask = 0;
|
||||
}
|
||||
} else {
|
||||
LOC_LOGe(" Faulty STOP request numOfRequests %d",
|
||||
mLCAService->numControlRequests);
|
||||
}
|
||||
}
|
||||
mReply();
|
||||
}
|
||||
};
|
||||
mMsgTask->sendMsg(new StopPosMsg(this, client, reply));
|
||||
}
|
||||
|
||||
void LocIdlAPIService::LIAdeleteAidingData
|
||||
(
|
||||
const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
uint32_t aidingDataMask,
|
||||
LocIdlAPIStub::deleteAidingDataReply_t reply
|
||||
) const
|
||||
{
|
||||
|
||||
uint16_t mask = aidingDataMask;
|
||||
LOC_LOGd(" DeleteAssistance Mask recieved: %x ", mask);
|
||||
if (mLIAInstance) {
|
||||
bool ret = mLIAInstance->deleteAidingData((location_integration::\
|
||||
AidingDataDeletionMask)mask);
|
||||
if (ret) {
|
||||
reply(LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_SUCCESS);
|
||||
} else {
|
||||
reply(LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_UNKOWN_FAILURE);
|
||||
}
|
||||
}
|
||||
if (mDiagLogIface) {
|
||||
mDiagLogIface->diagLogDeleteAidingRequest(client->hashCode(), aidingDataMask);
|
||||
}
|
||||
}
|
||||
|
||||
void LocIdlAPIService::LIAconfigConstellations
|
||||
(
|
||||
const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
std::vector< LocIdlAPI::IDLGnssSvIdInfo > svListSrc,
|
||||
LocIdlAPIStub::configConstellationsReply_t reply
|
||||
) const
|
||||
{
|
||||
|
||||
LOC_LOGd(" ");
|
||||
location_integration::LocConfigBlacklistedSvIdList svList;
|
||||
for (int i = 0; i < svListSrc.size(); i++) {
|
||||
location_integration::GnssSvIdInfo svIdConstellation = {};
|
||||
|
||||
switch (svListSrc[i].getConstellation()) {
|
||||
case LocIdlAPI::IDLGnssConstellationType::IDL_GNSS_CONSTELLATION_TYPE_GLONASS:
|
||||
svIdConstellation.constellation = location_integration::\
|
||||
GNSS_CONSTELLATION_TYPE_GLONASS;
|
||||
break;
|
||||
case LocIdlAPI::IDLGnssConstellationType::IDL_GNSS_CONSTELLATION_TYPE_QZSS:
|
||||
svIdConstellation.constellation = location_integration::\
|
||||
GNSS_CONSTELLATION_TYPE_QZSS;
|
||||
break;
|
||||
case LocIdlAPI::IDLGnssConstellationType::IDL_GNSS_CONSTELLATION_TYPE_BEIDOU:
|
||||
svIdConstellation.constellation = location_integration::\
|
||||
GNSS_CONSTELLATION_TYPE_BEIDOU;
|
||||
break;
|
||||
case LocIdlAPI::IDLGnssConstellationType::IDL_GNSS_CONSTELLATION_TYPE_GALILEO:
|
||||
svIdConstellation.constellation = location_integration::\
|
||||
GNSS_CONSTELLATION_TYPE_GALILEO;
|
||||
break;
|
||||
case LocIdlAPI::IDLGnssConstellationType::IDL_GNSS_CONSTELLATION_TYPE_SBAS:
|
||||
svIdConstellation.constellation = location_integration::\
|
||||
GNSS_CONSTELLATION_TYPE_SBAS;
|
||||
break;
|
||||
case LocIdlAPI::IDLGnssConstellationType::IDL_GNSS_CONSTELLATION_TYPE_NAVIC:
|
||||
svIdConstellation.constellation = location_integration::\
|
||||
GNSS_CONSTELLATION_TYPE_NAVIC;
|
||||
break;
|
||||
case LocIdlAPI::IDLGnssConstellationType::IDL_GNSS_CONSTELLATION_TYPE_GPS:
|
||||
svIdConstellation.constellation = location_integration::\
|
||||
GNSS_CONSTELLATION_TYPE_GPS;
|
||||
break;
|
||||
default:
|
||||
svIdConstellation.constellation = location_integration::\
|
||||
GNSS_CONSTELLATION_TYPE_MAX;
|
||||
}
|
||||
svIdConstellation.svId = svListSrc[i].getSvId();
|
||||
svList.push_back(svIdConstellation);
|
||||
}
|
||||
if (mLIAInstance) {
|
||||
bool retVal = mLIAInstance->configConstellations(&svList);
|
||||
if (retVal) {
|
||||
reply(LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_SUCCESS);
|
||||
} else {
|
||||
reply(LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_UNKOWN_FAILURE);
|
||||
}
|
||||
}
|
||||
if (mDiagLogIface) {
|
||||
mDiagLogIface->diagLogConfigConstellationRequest(client->hashCode(), svListSrc);
|
||||
}
|
||||
}
|
||||
|
||||
void LocIdlAPIService::injectMapMatchedFeedbackData
|
||||
(
|
||||
const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
LocIdlAPI::MapMatchingFeedbackData& mapData,
|
||||
LocIdlAPIStub::injectMapMatchedFeedbackDataReply_t reply
|
||||
) const
|
||||
{
|
||||
location_integration::mapMatchedFeedbackData mmfData = {};
|
||||
|
||||
mmfData.validityMask = mapData.getValidityMask();
|
||||
mmfData.utcTimestampMs = mapData.getUtcTimestampMs();
|
||||
mmfData.mapMatchedLatitudeDifference = mapData.getMapMatchedLatitudeDifference();
|
||||
mmfData.mapMatchedLongitudeDifference = mapData.getMapMatchedLongitudeDifference();
|
||||
mmfData.isTunnel = mapData.getIsTunnel();
|
||||
mmfData.bearing = mapData.getBearing();
|
||||
mmfData.altitude = mapData.getAltitude();
|
||||
mmfData.horizontalAccuracy = mapData.getHorizontalAccuracy();
|
||||
mmfData.altitudeAccuracy = mapData.getAltitudeAccuracy();
|
||||
mmfData.bearingAccuracy = mapData.getBearingAccuracy();
|
||||
|
||||
if (mLIAInstance) {
|
||||
bool retVal = mLIAInstance->injectMapMatchedData(mmfData);
|
||||
if (retVal) {
|
||||
reply(LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_SUCCESS);
|
||||
} else {
|
||||
reply(LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_UNKOWN_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
LocIdlAPIService *pLCAService = LocIdlAPIService::getInstance();
|
||||
if (pLCAService) {
|
||||
pLCAService->init();
|
||||
}
|
||||
|
||||
if (gptpInit()) {
|
||||
LOC_LOGd(" GPTP init success ");
|
||||
} else {
|
||||
LOC_LOGe(" GPTP init failed ");
|
||||
}
|
||||
// Waiting for calls
|
||||
int fd[2], n = 0;
|
||||
char buffer[10];
|
||||
if (pipe(fd) != -1) {
|
||||
n = read(fd[0], buffer, 10);
|
||||
if (n > 0) {
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@@ -0,0 +1,193 @@
|
||||
/*
|
||||
Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted (subject to the limitations in the
|
||||
disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER 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 LOCATIOCLIENTAPI_SERVICE_H
|
||||
#define LOCATIOCLIENTAPI_SERVICE_H
|
||||
|
||||
#include <CommonAPI/CommonAPI.hpp>
|
||||
#include "LocIdlAPIStubImpl.hpp"
|
||||
#include <v0/com/qualcomm/qti/location/LocIdlAPIStub.hpp>
|
||||
#include "LocationClientApi.h"
|
||||
#include "MsgTask.h"
|
||||
#include "log_util.h"
|
||||
#include "LocLcaIdlConverter.h"
|
||||
#include "LocationIntegrationApi.h"
|
||||
#include "LocIdlServiceLog.h"
|
||||
|
||||
#ifdef POWER_DAEMON_MGR_ENABLED
|
||||
#include "LocIdlPowerEvtManager.h"
|
||||
#endif
|
||||
|
||||
using namespace location_client;
|
||||
using namespace v0::com::qualcomm::qti::location;
|
||||
using namespace std;
|
||||
using namespace loc_util;
|
||||
using namespace location_integration;
|
||||
|
||||
#define IDL_MEMORY_CHECK_INTERVAL_SEC (2)
|
||||
|
||||
// Enum to define supported Power states in power-daemon
|
||||
enum IDLPowerStateType {
|
||||
IDL_POWER_STATE_UNKNOWN = 0,
|
||||
IDL_POWER_STATE_SUSPEND = 1,
|
||||
IDL_POWER_STATE_RESUME = 2,
|
||||
IDL_POWER_STATE_SHUTDOWN = 3,
|
||||
IDL_POWER_STATE_DEEP_SLEEP_ENTRY = 4,
|
||||
IDL_POWER_STATE_DEEP_SLEEP_EXIT = 5
|
||||
};
|
||||
|
||||
#ifdef POWER_DAEMON_MGR_ENABLED
|
||||
class LocIdlPowerEvtHandler;
|
||||
#endif
|
||||
class LocIdlAPIStubImpl;
|
||||
class LocIdlServiceLog;
|
||||
|
||||
class LocIdlAPIService {
|
||||
public:
|
||||
std::shared_ptr<LocIdlAPIStubImpl> mService;
|
||||
// singleton instance
|
||||
static LocIdlAPIService* getInstance();
|
||||
bool init();
|
||||
bool createLocIdlService();
|
||||
bool registerWithFIDLService();
|
||||
bool unRegisterWithFIDLService();
|
||||
bool processCapabilities(::LocationCapabilitiesMask mask);
|
||||
|
||||
/* Process Fused/Detailed Position request */
|
||||
void startPositionSession
|
||||
(
|
||||
const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
uint32_t _intervalInMs, uint32_t gnssReportCallbackMask,
|
||||
LocIdlAPIStub::startPositionSessionReply_t reply
|
||||
) const;
|
||||
|
||||
/* Process Engine specific Position request */
|
||||
void startPositionSession
|
||||
(
|
||||
const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
uint32_t intervalInMs, uint32_t locReqEngMask, uint32_t engReportCallbackMask,
|
||||
LocIdlAPIStub::startPositionSession1Reply_t reply
|
||||
) const;
|
||||
void stopPositionSession
|
||||
(
|
||||
const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
LocIdlAPIStub::stopPositionSessionReply_t reply
|
||||
) const;
|
||||
|
||||
void LIAdeleteAidingData
|
||||
(
|
||||
const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
uint32_t aidingDataMask,
|
||||
LocIdlAPIStub::deleteAidingDataReply_t reply
|
||||
) const;
|
||||
|
||||
/// This is the method that will be called on remote calls on the method configConstellations.
|
||||
void LIAconfigConstellations
|
||||
(
|
||||
const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
std::vector< LocIdlAPI::IDLGnssSvIdInfo > svList,
|
||||
LocIdlAPIStub::configConstellationsReply_t reply
|
||||
) const;
|
||||
|
||||
LocIdlAPI::IDLLocationReport parseLocationReport
|
||||
(
|
||||
const ::GnssLocation &lcaLoc
|
||||
) const;
|
||||
|
||||
LocIdlAPI::IDLGnssSv parseGnssSvReport
|
||||
(
|
||||
const location_client::GnssSv& gnssSvs
|
||||
) const;
|
||||
|
||||
LocIdlAPI::IDLGnssMeasurements parseGnssMeasurements
|
||||
(
|
||||
const location_client::GnssMeasurements& gnssMeasurements
|
||||
) const;
|
||||
|
||||
LocIdlAPI::IDLGnssData parseGnssDataReport
|
||||
(
|
||||
const location_client::GnssData& gnssData
|
||||
) const;
|
||||
|
||||
LocIdlAPI::IDLLocationResponse parseIDLResponse
|
||||
(
|
||||
const location_client::LocationResponse lcaResponse
|
||||
) const;
|
||||
|
||||
void onPowerEvent(IDLPowerStateType powerEvent);
|
||||
void injectMapMatchedFeedbackData
|
||||
(
|
||||
const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
LocIdlAPI::MapMatchingFeedbackData& mapData,
|
||||
LocIdlAPIStub::injectMapMatchedFeedbackDataReply_t reply
|
||||
) const;
|
||||
|
||||
|
||||
/** To start a new thread to monito memory
|
||||
* usahe every 2second by LocIDlService */
|
||||
void monitorMemoryUsage();
|
||||
/** To pass the system health status to Diag structure */
|
||||
void updateSystemStatus(uint32_t totalRss);
|
||||
|
||||
#ifdef POWER_DAEMON_MGR_ENABLED
|
||||
LocIdlPowerEvtHandler* mPowerEventObserver;
|
||||
#endif
|
||||
LocIdlServiceLog* mDiagLogIface;
|
||||
LocLcaIdlConverter* mLcaIdlConverter;
|
||||
|
||||
private:
|
||||
static LocIdlAPIService *mInstance;
|
||||
LocationClientApi* mLcaInstance;
|
||||
MsgTask* mMsgTask;
|
||||
MsgTask* mMemoryMonitorMsgTask;
|
||||
LocationIntegrationApi* mLIAInstance;
|
||||
mutable uint32_t mGnssReportMask;
|
||||
/** Keep cont of number of start session requests, this variable
|
||||
* shall be incremented on each startSession and decremented on
|
||||
* every stop Session, Stop session request shall be sent to LCA
|
||||
* only if this variable is 0 */
|
||||
mutable uint32_t numControlRequests;
|
||||
|
||||
/** Keeps track if service is registered or not
|
||||
* True: Service registered Successfully
|
||||
* False: Service not registered */
|
||||
mutable bool serviceRegisterationStatus;
|
||||
|
||||
LocIdlAPIService();
|
||||
~LocIdlAPIService();
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif //LOCATIOCLIENTAPI_SERVICE_H
|
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted (subject to the limitations in the
|
||||
disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
|
||||
*/
|
||||
|
||||
#include <functional>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdio.h>
|
||||
#include <LocationClientApi.h>
|
||||
#include "LocIdlAPIStubImpl.hpp"
|
||||
#include <time.h>
|
||||
#define NSEC_IN_ONE_SEC (1000000000ULL) /* nanosec in a sec */
|
||||
using namespace v0::com::qualcomm::qti::location;
|
||||
|
||||
using namespace location_client;
|
||||
|
||||
|
||||
LocIdlAPIStubImpl::LocIdlAPIStubImpl(const LocIdlAPIService* apiService):
|
||||
mApiService(apiService){
|
||||
}
|
||||
|
||||
LocIdlAPIStubImpl::~LocIdlAPIStubImpl() {
|
||||
}
|
||||
|
||||
|
||||
const uint32_t & LocIdlAPIStubImpl::getGnssCapabilitiesMaskAttribute (
|
||||
const std::shared_ptr<CommonAPI::ClientId> client
|
||||
)
|
||||
{
|
||||
return mCapsMask;
|
||||
|
||||
}
|
||||
|
||||
void LocIdlAPIStubImpl::startPositionSession
|
||||
(
|
||||
const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
uint32_t intervalInMs, uint32_t gnssReportCallbackMask,
|
||||
startPositionSessionReply_t reply
|
||||
)
|
||||
{
|
||||
std::cout << "==== startPositionSession1 _intervalInMs " << intervalInMs <<\
|
||||
"_gnssReportCallbackMask " << gnssReportCallbackMask << std::endl;
|
||||
if (mApiService) {
|
||||
mApiService->startPositionSession(client, intervalInMs, gnssReportCallbackMask, reply);
|
||||
}
|
||||
}
|
||||
|
||||
void LocIdlAPIStubImpl::startPositionSession
|
||||
(
|
||||
const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
uint32_t intervalInMs, uint32_t locReqEngMask,
|
||||
uint32_t engReportCallbackMask, startPositionSession1Reply_t reply
|
||||
)
|
||||
{
|
||||
std::cout << "==== startPositionSession2 _intervalInMs " << intervalInMs\
|
||||
<< " locReqEngMask " << locReqEngMask << std::endl;
|
||||
if (mApiService) {
|
||||
mApiService->startPositionSession(client, intervalInMs, engReportCallbackMask, reply);
|
||||
}
|
||||
}
|
||||
|
||||
void LocIdlAPIStubImpl::stopPositionSession
|
||||
(
|
||||
const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
stopPositionSessionReply_t reply
|
||||
)
|
||||
{
|
||||
if (mApiService) {
|
||||
mApiService->stopPositionSession(client, reply);
|
||||
}
|
||||
reply();
|
||||
}
|
||||
|
||||
void LocIdlAPIStubImpl::deleteAidingData(const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
uint32_t aidingDataMask,
|
||||
deleteAidingDataReply_t reply) {
|
||||
if (mApiService) {
|
||||
mApiService->LIAdeleteAidingData(client, aidingDataMask, reply);
|
||||
}
|
||||
}
|
||||
|
||||
/// This is the method that will be called on remote calls on the method configConstellations.
|
||||
void LocIdlAPIStubImpl::configConstellations(const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
std::vector< LocIdlAPI::IDLGnssSvIdInfo > svList,
|
||||
configConstellationsReply_t reply) {
|
||||
// This API is currently not supported.
|
||||
reply(LocIdlAPI::IDLLocationResponse::IDL_LOC_RESP_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
void LocIdlAPIStubImpl::injectMapMatchedFeedbackData(
|
||||
const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
LocIdlAPI::MapMatchingFeedbackData mmfData, injectMapMatchedFeedbackDataReply_t reply) {
|
||||
if (mApiService) {
|
||||
mApiService->injectMapMatchedFeedbackData(client, mmfData, reply);
|
||||
}
|
||||
}
|
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted (subject to the limitations in the
|
||||
disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER 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 LOCIDLAPISTUBIMPL_HPP
|
||||
#define LOCIDLAPISTUBIMPL_HPP
|
||||
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
#include <stdio.h>
|
||||
#include <CommonAPI/CommonAPI.hpp>
|
||||
#include <v0/com/qualcomm/qti/location/LocIdlAPI.hpp>
|
||||
#include <v0/com/qualcomm/qti/location/LocIdlAPIStub.hpp>
|
||||
#include "LocIdlAPIService.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace v0::com::qualcomm::qti::location;
|
||||
|
||||
class LocIdlAPIService;
|
||||
class LocIdlAPIStubImpl: public v0::com::qualcomm::qti::location::LocIdlAPIStub {
|
||||
|
||||
public:
|
||||
|
||||
virtual const CommonAPI::Version& getInterfaceVersion(
|
||||
std::shared_ptr<CommonAPI::ClientId> client)
|
||||
{
|
||||
return CommonAPI::Version(0, 1);
|
||||
}
|
||||
|
||||
virtual const uint32_t &getGnssCapabilitiesMaskAttribute(
|
||||
const std::shared_ptr<CommonAPI::ClientId> client);
|
||||
/// This is the method that will be called on remote calls on the method startPositionSession.
|
||||
virtual void startPositionSession(const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
uint32_t intervalInMs,
|
||||
uint32_t gnssReportCallbackMask, startPositionSessionReply_t reply);
|
||||
/// This is the method that will be called on remote calls on the method startPositionSession.
|
||||
virtual void startPositionSession(const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
uint32_t intervalInMs,
|
||||
uint32_t locReqEngMask, uint32_t engReportCallbackMask,
|
||||
startPositionSession1Reply_t reply);
|
||||
|
||||
virtual void stopPositionSession(const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
stopPositionSessionReply_t reply);
|
||||
virtual void deleteAidingData(const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
uint32_t aidingDataMask,
|
||||
deleteAidingDataReply_t reply);
|
||||
/// This is the method that will be called on remote calls on the method configConstellations.
|
||||
virtual void configConstellations(const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
std::vector< LocIdlAPI::IDLGnssSvIdInfo > svList,
|
||||
configConstellationsReply_t reply);
|
||||
|
||||
virtual void injectMapMatchedFeedbackData(const std::shared_ptr<CommonAPI::ClientId> client,
|
||||
LocIdlAPI::MapMatchingFeedbackData mmfData, injectMapMatchedFeedbackDataReply_t reply);
|
||||
|
||||
uint32_t mCapsMask;
|
||||
|
||||
const LocIdlAPIService* mApiService;
|
||||
LocIdlAPIStubImpl(const LocIdlAPIService* apiService);
|
||||
~LocIdlAPIStubImpl();
|
||||
};
|
||||
|
||||
#endif // LOCIDLAPISTUBIMPL_HPP
|
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted (subject to the limitations in the
|
||||
disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
|
||||
*/
|
||||
|
||||
#ifdef LOG_TAG
|
||||
#undef LOG_TAG
|
||||
#endif
|
||||
#define LOG_TAG "IDL_POWER_HANDLER"
|
||||
#ifdef POWER_DAEMON_MGR_ENABLED
|
||||
#include <unistd.h>
|
||||
#include "LocIdlPowerEvtManager.h"
|
||||
|
||||
#define ACK_TIMEOUT_US 300000 // 300 msec
|
||||
|
||||
LocIdlAPIService* LocIdlPowerEvtHandler::mLocationApiService = nullptr;
|
||||
|
||||
LocIdlPowerEvtHandler* LocIdlPowerEvtHandler::getPwrEvtHandler(LocIdlAPIService* locServiceApiObj) {
|
||||
mLocationApiService = locServiceApiObj;
|
||||
static LocIdlPowerEvtHandler instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
LocIdlPowerEvtHandler::LocIdlPowerEvtHandler() {
|
||||
int ret = pwr_state_notification_register(LocIdlPowerEvtHandler::pwrMngrLibStateCb);
|
||||
}
|
||||
|
||||
LocIdlPowerEvtHandler::~LocIdlPowerEvtHandler() {
|
||||
}
|
||||
|
||||
int LocIdlPowerEvtHandler::pwrMngrLibStateCb(power_state_t pwr_state) {
|
||||
client_ack_t client_ack;
|
||||
client_ack.ack = ERR;
|
||||
IDLPowerStateType powerState = IDL_POWER_STATE_UNKNOWN;
|
||||
LOC_LOGe("Received powerState %d", pwr_state);
|
||||
switch (pwr_state.sys_state) {
|
||||
case SYS_SUSPEND:
|
||||
client_ack.ack = SUSPEND_ACK;
|
||||
powerState = IDL_POWER_STATE_SUSPEND;
|
||||
break;
|
||||
case SYS_RESUME:
|
||||
client_ack.ack = RESUME_ACK;
|
||||
powerState = IDL_POWER_STATE_RESUME;
|
||||
break;
|
||||
case SYS_SHUTDOWN:
|
||||
client_ack.ack = SHUTDOWN_ACK;
|
||||
powerState = IDL_POWER_STATE_SHUTDOWN;
|
||||
break;
|
||||
}
|
||||
|
||||
if (powerState != IDL_POWER_STATE_UNKNOWN) {
|
||||
if (mLocationApiService) {
|
||||
mLocationApiService->onPowerEvent(powerState);
|
||||
}
|
||||
}
|
||||
|
||||
//Allow some time to stop the session and write calibration data NVM.
|
||||
usleep(ACK_TIMEOUT_US);
|
||||
LOC_LOGd("LocIdlPowerEvtHandler: pwrStateCb sending ack");
|
||||
send_acknowledgement(client_ack);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted (subject to the limitations in the
|
||||
disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER 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_IDL_POWER_EVENT_MANAGER_H_
|
||||
#define LOC_IDL_POWER_EVENT_MANAGER_H_
|
||||
|
||||
#ifdef POWER_DAEMON_MGR_ENABLED
|
||||
#include <power_state.h>
|
||||
#endif
|
||||
|
||||
#include <log_util.h>
|
||||
#include "LocIdlAPIService.h"
|
||||
|
||||
class LocIdlAPIService;
|
||||
|
||||
class LocIdlPowerEvtHandler
|
||||
{
|
||||
public:
|
||||
static LocIdlPowerEvtHandler* getPwrEvtHandler(LocIdlAPIService*);
|
||||
~LocIdlPowerEvtHandler();
|
||||
static int pwrMngrLibStateCb(power_state_t pwr_state);
|
||||
private:
|
||||
LocIdlPowerEvtHandler();
|
||||
static LocIdlAPIService* mLocationApiService;
|
||||
};
|
||||
|
||||
#endif //LOC_IDL_POWER_EVENT_MANAGER_H_
|
@@ -0,0 +1,252 @@
|
||||
/*
|
||||
Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted (subject to the limitations in the
|
||||
disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
|
||||
*/
|
||||
|
||||
#include "LocIdlServiceLog.h"
|
||||
|
||||
|
||||
static LocDiagInterface *locDiagIfaceHandle = nullptr;
|
||||
|
||||
bool LocIdlServiceLog::initializeDiagIface()
|
||||
{
|
||||
LOC_LOGd("");
|
||||
bool retVal = true;
|
||||
if (nullptr == locDiagIfaceHandle) {
|
||||
locDiagIfaceHandle = loadLocDiagIfaceInterface();
|
||||
if (nullptr == locDiagIfaceHandle) {
|
||||
LOC_LOGe("Failed to loadLocDiagIfaceInterface!!");
|
||||
retVal = false;
|
||||
}
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
void LocIdlServiceLog::updateSystemHealth(uint32_t totalRss, bool gptpSyncStatus) {
|
||||
mTotalRss = totalRss;
|
||||
mGptpSyncStatus = gptpSyncStatus;
|
||||
}
|
||||
|
||||
void LocIdlServiceLog::populateIdlDiagHeaderInfo(diagServiceGenericHeader& idlHeader) {
|
||||
idlHeader.version = LOG_LOCATION_IDL_SERVICE_REPORT_VERSION;
|
||||
idlHeader.idlServiceRssStats = mTotalRss;
|
||||
idlHeader.gptpSyncStatus = mGptpSyncStatus;
|
||||
}
|
||||
|
||||
void LocIdlServiceLog::diagLogGnssReportInfo(uint8_t reportType, int16_t latencyMs,
|
||||
uint32_t latentReportCount) {
|
||||
size_t size = 0;
|
||||
diagServiceInfoStruct* gnssReportInfo = NULL;
|
||||
diagBuffSrc bufferSrc;
|
||||
size = sizeof(diagServiceInfoStruct)- sizeof(gnssReportInfo->serviceReport) +
|
||||
sizeof(diagOutputGnssReportInfo);
|
||||
if (locDiagIfaceHandle) {
|
||||
gnssReportInfo = (diagServiceInfoStruct*)locDiagIfaceHandle->logAlloc(
|
||||
LOG_LOCATION_IDL_SERVICE_REPORT_C,
|
||||
size, &bufferSrc);
|
||||
|
||||
if (gnssReportInfo) {
|
||||
gnssReportInfo->serviceInfoType = GNSS_REPORT_INFO;
|
||||
populateIdlDiagHeaderInfo(gnssReportInfo->header);
|
||||
gnssReportInfo->serviceReport.reportInfo.reportType =
|
||||
(diagServiceOutputReportType)reportType;
|
||||
gnssReportInfo->serviceReport.reportInfo.packetLatencyTime = latencyMs;
|
||||
gnssReportInfo->serviceReport.reportInfo.latentReportCount = latentReportCount;
|
||||
locDiagIfaceHandle->logCommit(gnssReportInfo, bufferSrc,
|
||||
LOG_LOCATION_IDL_SERVICE_REPORT_VERSION, size);
|
||||
} else {
|
||||
LOC_LOGe(" logAlloc failed for Delete Aiding Request !! ");
|
||||
}
|
||||
} else {
|
||||
LOC_LOGe(" locDiagIfaceHandle is NULL ");
|
||||
}
|
||||
}
|
||||
|
||||
void LocIdlServiceLog::diagLogConfigConstellationRequest(uint64_t clientIdentifier,
|
||||
vector< LocIdlAPI::IDLGnssSvIdInfo > svListSrc) {
|
||||
|
||||
size_t size = 0;
|
||||
diagServiceInfoStruct* svListInfo = NULL;
|
||||
diagBuffSrc bufferSrc;
|
||||
uint16_t numSvReceived = svListSrc.size();
|
||||
size = sizeof(diagServiceInfoStruct)- sizeof(svListInfo->serviceReport) +
|
||||
sizeof(uint8_t) + sizeof(diagGnssSvIdInfo)*numSvReceived;
|
||||
|
||||
if (locDiagIfaceHandle) {
|
||||
svListInfo = (diagServiceInfoStruct*)locDiagIfaceHandle->logAlloc(
|
||||
LOG_LOCATION_IDL_SERVICE_REPORT_C,
|
||||
size, &bufferSrc);
|
||||
|
||||
if (svListInfo) {
|
||||
svListInfo->header.clientIdentifier = clientIdentifier;
|
||||
svListInfo->serviceInfoType = CONFIG_API_ACCESS_INFO;
|
||||
populateIdlDiagHeaderInfo(svListInfo->header);
|
||||
svListInfo->serviceReport.configApiInfo.requestType = CONFIG_CONSTELLATIONS_REQUEST;
|
||||
for (int i = 0; i < numSvReceived; i++) {
|
||||
svListInfo->serviceReport.configApiInfo.configData.svList[i].constellationType =
|
||||
svListSrc[i].getConstellation();
|
||||
svListInfo->serviceReport.configApiInfo.configData.svList[i].svId =
|
||||
svListSrc[i].getSvId();
|
||||
}
|
||||
locDiagIfaceHandle->logCommit(svListInfo, bufferSrc,
|
||||
LOG_LOCATION_IDL_SERVICE_REPORT_VERSION, size);
|
||||
} else {
|
||||
LOC_LOGe(" logAlloc failed for Delete Aiding Request !! ");
|
||||
}
|
||||
} else {
|
||||
LOC_LOGe(" locDiagIfaceHandle is NULL ");
|
||||
}
|
||||
}
|
||||
|
||||
void LocIdlServiceLog::diagLogDeleteAidingRequest (uint64_t clientIdentifier,
|
||||
uint32_t aidingMask) {
|
||||
|
||||
size_t size = 0;
|
||||
diagServiceInfoStruct* aidingInfo = NULL;
|
||||
diagBuffSrc bufferSrc;
|
||||
size = sizeof(diagServiceInfoStruct)- sizeof(aidingInfo->serviceReport) +
|
||||
sizeof(uint8_t) + sizeof(uint32_t);
|
||||
if (locDiagIfaceHandle) {
|
||||
aidingInfo = (diagServiceInfoStruct*)locDiagIfaceHandle->logAlloc(
|
||||
LOG_LOCATION_IDL_SERVICE_REPORT_C,
|
||||
size, &bufferSrc);
|
||||
if (aidingInfo) {
|
||||
aidingInfo->header.clientIdentifier = clientIdentifier;
|
||||
aidingInfo->serviceInfoType = CONFIG_API_ACCESS_INFO;
|
||||
populateIdlDiagHeaderInfo(aidingInfo->header);
|
||||
aidingInfo->serviceReport.configApiInfo.requestType = DELETE_AIDING_DATA;
|
||||
aidingInfo->serviceReport.configApiInfo.configData.deleteAidingMask = aidingMask;
|
||||
locDiagIfaceHandle->logCommit(aidingInfo, bufferSrc,
|
||||
LOG_LOCATION_IDL_SERVICE_REPORT_VERSION, size);
|
||||
} else {
|
||||
LOC_LOGe(" logAlloc failed for Delete Aiding Request !! ");
|
||||
}
|
||||
} else {
|
||||
LOC_LOGe(" locDiagIfaceHandle is NULL ");
|
||||
}
|
||||
}
|
||||
|
||||
void LocIdlServiceLog::diagLogSessionInfo (diagControlCommandInfo idlSessionInfo,
|
||||
uint64_t clientIdentifier) {
|
||||
|
||||
size_t size = 0;
|
||||
diagServiceInfoStruct* sessionInfo = NULL;
|
||||
diagBuffSrc bufferSrc;
|
||||
size = sizeof(diagServiceInfoStruct)- sizeof(sessionInfo->serviceReport) +
|
||||
sizeof(diagControlCommandInfo);
|
||||
if (locDiagIfaceHandle) {
|
||||
sessionInfo = (diagServiceInfoStruct*)locDiagIfaceHandle->logAlloc(
|
||||
LOG_LOCATION_IDL_SERVICE_REPORT_C,
|
||||
size, &bufferSrc);
|
||||
|
||||
if (sessionInfo) {
|
||||
sessionInfo->header.clientIdentifier = clientIdentifier;
|
||||
sessionInfo->serviceInfoType = SESSION_CONTROL_INFO;
|
||||
populateIdlDiagHeaderInfo(sessionInfo->header);
|
||||
sessionInfo->serviceReport.cmdInfo.sessionRequestType =
|
||||
idlSessionInfo.sessionRequestType;
|
||||
sessionInfo->serviceReport.cmdInfo.intervalMs = idlSessionInfo.intervalMs;
|
||||
sessionInfo->serviceReport.cmdInfo.requestedCallbackMask =
|
||||
idlSessionInfo.requestedCallbackMask;
|
||||
sessionInfo->serviceReport.cmdInfo.updatedCallbackMask =
|
||||
idlSessionInfo.updatedCallbackMask;
|
||||
sessionInfo->serviceReport.cmdInfo.numControlRequests =
|
||||
idlSessionInfo.numControlRequests;
|
||||
locDiagIfaceHandle->logCommit(sessionInfo, bufferSrc,
|
||||
LOG_LOCATION_IDL_SERVICE_REPORT_VERSION, size);
|
||||
} else {
|
||||
LOC_LOGe(" logAlloc failed for session event Info !! ");
|
||||
}
|
||||
} else {
|
||||
LOC_LOGe(" locDiagIfaceHandle is NULL ");
|
||||
}
|
||||
}
|
||||
|
||||
void LocIdlServiceLog::diagLogPowerEventInfo(uint8_t powerEvent, uint8_t serviceStatus) {
|
||||
size_t size = 0;
|
||||
diagServiceInfoStruct* powerEventInfo = NULL;
|
||||
diagBuffSrc bufferSrc;
|
||||
size = sizeof(diagServiceInfoStruct)- sizeof(powerEventInfo->serviceReport) +
|
||||
sizeof(diagPowerEventInfo);
|
||||
if (locDiagIfaceHandle) {
|
||||
powerEventInfo = (diagServiceInfoStruct*)locDiagIfaceHandle->logAlloc(
|
||||
LOG_LOCATION_IDL_SERVICE_REPORT_C,
|
||||
size, &bufferSrc);
|
||||
|
||||
if (powerEventInfo) {
|
||||
powerEventInfo->serviceInfoType = POWER_EVENT_INFO;
|
||||
populateIdlDiagHeaderInfo(powerEventInfo->header);
|
||||
powerEventInfo->serviceReport.powerEvent.powerEventType = powerEvent;
|
||||
powerEventInfo->serviceReport.powerEvent.serviceStatus = serviceStatus;
|
||||
locDiagIfaceHandle->logCommit(powerEventInfo, bufferSrc,
|
||||
LOG_LOCATION_IDL_SERVICE_REPORT_VERSION, size);
|
||||
} else {
|
||||
LOC_LOGe(" logAlloc failed for Power Event Info !! ");
|
||||
}
|
||||
} else {
|
||||
LOC_LOGe(" locDiagIfaceHandle is NULL ");
|
||||
}
|
||||
}
|
||||
void LocIdlServiceLog::diagLogCapabilityInfo(string capabilityMask) {
|
||||
size_t size = 0;
|
||||
diagServiceInfoStruct* capsInfo = NULL;
|
||||
diagBuffSrc bufferSrc;
|
||||
size = sizeof(diagServiceInfoStruct)- sizeof(capsInfo->serviceReport) +
|
||||
sizeof(diagCapabilityReceivedInfo) + capabilityMask.size() -1;
|
||||
if (locDiagIfaceHandle) {
|
||||
capsInfo = (diagServiceInfoStruct*)locDiagIfaceHandle->logAlloc(
|
||||
LOG_LOCATION_IDL_SERVICE_REPORT_C,
|
||||
size, &bufferSrc);
|
||||
|
||||
if (capsInfo) {
|
||||
capsInfo->serviceInfoType = CAPS_EVENT_INFO;
|
||||
populateIdlDiagHeaderInfo(capsInfo->header);
|
||||
capsInfo->serviceReport.capabiltiyInfo.capabilityStringLength = capabilityMask.size();
|
||||
memcpy(&capsInfo->serviceReport.capabiltiyInfo.capabilitiesReceived,
|
||||
capabilityMask.c_str(),
|
||||
capsInfo->serviceReport.capabiltiyInfo.capabilityStringLength);
|
||||
locDiagIfaceHandle->logCommit(capsInfo, bufferSrc,
|
||||
LOG_LOCATION_IDL_SERVICE_REPORT_VERSION, size);
|
||||
} else {
|
||||
LOC_LOGe(" logAlloc failed for Capability Info !! ");
|
||||
}
|
||||
} else {
|
||||
LOC_LOGe(" locDiagIfaceHandle is NULL ");
|
||||
}
|
||||
}
|
||||
|
||||
LocIdlServiceLog::LocIdlServiceLog() {
|
||||
|
||||
}
|
||||
|
||||
LocIdlServiceLog::~LocIdlServiceLog() {
|
||||
|
||||
}
|
@@ -0,0 +1,279 @@
|
||||
/*
|
||||
Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted (subject to the limitations in the
|
||||
disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER 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_IDL_SERVICE_LOG_H
|
||||
#define LOC_IDL_SERVICE_LOG_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
#include <vector>
|
||||
#include "log_util.h"
|
||||
|
||||
#include "LocDiagIfaceApi.h"
|
||||
#include "LocIdlAPIStubImpl.hpp"
|
||||
#include <v0/com/qualcomm/qti/location/LocIdlAPIStub.hpp>
|
||||
|
||||
using namespace std;
|
||||
|
||||
#ifndef LOG_1X_BASE_C
|
||||
#define LOG_1X_BASE_C ((uint16_t) 0x1000)
|
||||
#endif
|
||||
|
||||
// DIAG ID's and Version Information
|
||||
#define LOG_LOCATION_IDL_SERVICE_REPORT_C ((0xE6A) + LOG_1X_BASE_C)
|
||||
#define LOG_LOCATION_IDL_SERVICE_REPORT_VERSION 0
|
||||
|
||||
#define IDL_DIAG_MAX_SV (176)
|
||||
|
||||
#ifdef __linux__
|
||||
#define PACKED
|
||||
#define PACKED_POST __attribute__((__packed__))
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) || defined(USE_GLIB) || defined(__ANDROID__)
|
||||
#define TYPEDEF_PACKED_STRUCT typedef PACKED struct PACKED_POST
|
||||
#else
|
||||
#define TYPEDEF_PACKED_STRUCT typedef struct
|
||||
#endif
|
||||
|
||||
#if !defined(USE_GLIB) && !defined(__ANDROID__)
|
||||
#ifndef _LOG_HDR_TYPE_
|
||||
#define _LOG_HDR_TYPE_
|
||||
typedef struct PACKED_POST {
|
||||
uint16_t len; /* Specifies the length, in bytes of the
|
||||
entry, including this header. */
|
||||
|
||||
uint16_t code; /* Specifies the log code for the entry as
|
||||
enumerated above. Note: This is
|
||||
specified as word to guarantee size. */
|
||||
/*upper 48 bits represent elapsed time since
|
||||
6 Jan 1980 00:00:00 in 1.25 ms units. The
|
||||
low order 16 bits represent elapsed time
|
||||
since the last 1.25 ms tick in 1/32 chip
|
||||
units (this 16 bit counter wraps at the
|
||||
value 49152). */
|
||||
uint32_t ts_lo; /* Time stamp */
|
||||
uint32_t ts_hi;
|
||||
} log_hdr_type;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/** @brief Generic Diag logger header for all IDL Service messages. */
|
||||
TYPEDEF_PACKED_STRUCT {
|
||||
/** Used by Logging Module */
|
||||
log_hdr_type logHeader;
|
||||
/** Message Version */
|
||||
uint8_t version;
|
||||
/** Client Hashcode */
|
||||
uint64_t clientIdentifier;
|
||||
/** Log RSS memory stats for FIDL service */
|
||||
uint32_t idlServiceRssStats;
|
||||
/** GPTP sync status */
|
||||
bool gptpSyncStatus;
|
||||
/** Reserve field */
|
||||
uint32_t reserved1;
|
||||
} diagServiceGenericHeader;
|
||||
|
||||
/** Logging report Type */
|
||||
enum diagServiceInfoType {
|
||||
INFO_TYPE_UNKNOWN = 0,
|
||||
GNSS_REPORT_INFO = 1,
|
||||
SESSION_CONTROL_INFO = 2,
|
||||
CONFIG_API_ACCESS_INFO = 3,
|
||||
POWER_EVENT_INFO = 4,
|
||||
CAPS_EVENT_INFO = 5,
|
||||
};
|
||||
|
||||
/** Enum to specify report Type */
|
||||
enum diagServiceOutputReportType {
|
||||
OUTPUT_REPORT_UNKOWN = 0,
|
||||
OUTPUT_PVT_REPORT = 1,
|
||||
OUTPUT_MEAS_REPORT = 2,
|
||||
OUTPUT_NHZ_MEAS_REPORT = 3,
|
||||
OUTPUT_NMEA_REPORT = 4,
|
||||
OUTPUT_SV_INFO_REPORT = 5,
|
||||
OUTPUT_GNSS_DATA_REPORT = 6,
|
||||
};
|
||||
|
||||
/** To store inof about GNSS reports being sent out */
|
||||
TYPEDEF_PACKED_STRUCT {
|
||||
/** Gnss report type defined by diagServiceOutputReportType */
|
||||
uint8_t reportType;
|
||||
/** Time Difference between Time of genration of packet
|
||||
* and time at which report is sent over SOMEIP */
|
||||
int16_t packetLatencyTime;
|
||||
/** Count of postion reports latent by 20 msec */
|
||||
uint32_t latentReportCount;
|
||||
} diagOutputGnssReportInfo;
|
||||
|
||||
/** Seerion Control command*/
|
||||
enum diagServiceSessionRequestType {
|
||||
SESSION_REQUEST_UNKNOWN = 0,
|
||||
SESSION_START_REQUEST = 1,
|
||||
SESSION_STOP_REQUEST = 2,
|
||||
};
|
||||
|
||||
/** Session Control Command related Info */
|
||||
TYPEDEF_PACKED_STRUCT {
|
||||
/**Type of request Start/Stop defined by diagServiceSessionRequestType */
|
||||
uint8_t sessionRequestType;
|
||||
/** Requested Time interval between fixes */
|
||||
uint32_t intervalMs;
|
||||
/** Requested subscription mask */
|
||||
uint32_t requestedCallbackMask;
|
||||
/** IDL service subscription mask */
|
||||
uint32_t updatedCallbackMask;
|
||||
/** Number of session control requests */
|
||||
uint32_t numControlRequests;
|
||||
} diagControlCommandInfo;
|
||||
|
||||
/** Config API types */
|
||||
enum diagServiceLIARequestType {
|
||||
LIA_REQUEST_UNKNOWN = 0,
|
||||
DELETE_AIDING_DATA = 1,
|
||||
CONFIG_CONSTELLATIONS_REQUEST = 2,
|
||||
};
|
||||
|
||||
/**Fields specifiying Aiding Data deletion */
|
||||
typedef enum {
|
||||
/** Aiding Mask Unknown */
|
||||
NO_AIDING_DELETION = 0,
|
||||
/** Mask to delete all aiding data from all position
|
||||
engines on the device <br/> */
|
||||
DELETE_ALL_AIDING_DATA = 0x0001,
|
||||
/** Mask to delete ephemeris aiding data <br/> */
|
||||
DELETE_EPHEMERIS_DATA = 0x0002,
|
||||
/** Mask to delete calibration data from dead reckoning position
|
||||
* engine.<br/> */
|
||||
DELETE_DR_SENSOR_CALIBRATION = 0x0004,
|
||||
} diagDeleteAidingMask;
|
||||
|
||||
/**Sv Info to store configConstellation request */
|
||||
TYPEDEF_PACKED_STRUCT {
|
||||
/** Gnss Constellation */
|
||||
uint8_t constellationType;
|
||||
/** SV ID */
|
||||
uint16_t svId;
|
||||
} diagGnssSvIdInfo;
|
||||
|
||||
/** Config API info */
|
||||
TYPEDEF_PACKED_STRUCT {
|
||||
/** Config API type defined by diagServiceLIARequestType */
|
||||
uint8_t requestType;
|
||||
union {
|
||||
/** Delete Aiding Mask diagDeleteAidingMask */
|
||||
uint32_t deleteAidingMask;
|
||||
/** Config Constellation Info diagGnssSvIdInfo*/
|
||||
diagGnssSvIdInfo svList[IDL_DIAG_MAX_SV];
|
||||
} configData;
|
||||
} diagConfigApiRequest;
|
||||
|
||||
// Enum to define supported Power states in power-daemon
|
||||
enum diagPowerStateType {
|
||||
POWER_STATE_UNKNOWN = 0,
|
||||
POWER_STATE_SUSPEND = 1,
|
||||
POWER_STATE_RESUME = 2,
|
||||
POWER_STATE_SHUTDOWN = 3,
|
||||
POWER_STATE_DEEP_SLEEP_ENTRY = 4,
|
||||
POWER_STATE_DEEP_SLEEP_EXIT = 5
|
||||
};
|
||||
|
||||
/**IDL service registeration status */
|
||||
enum diagServiceStatus {
|
||||
SERVICE_STAUS_UNKNOWN = 0,
|
||||
REGISTER_SERVICE_SUCCESS = 1,
|
||||
REGISTER_SERVICE_FAILED = 2,
|
||||
UNREGISTER_SERVICE_SUCCESS = 3,
|
||||
UNREGISTER_SERVICE_FAILED = 4,
|
||||
};
|
||||
|
||||
/* Platform power event Info **/
|
||||
TYPEDEF_PACKED_STRUCT {
|
||||
/** Platform define power states:: diagPowerStateType */
|
||||
uint8_t powerEventType;
|
||||
/** FIDL service registeration status:: diagServiceStatus*/
|
||||
uint8_t serviceStatus;
|
||||
} diagPowerEventInfo;
|
||||
|
||||
/* Platform capability Info **/
|
||||
TYPEDEF_PACKED_STRUCT {
|
||||
/** Length of capability string */
|
||||
uint32_t capabilityStringLength;
|
||||
/** capabilities Received*/
|
||||
uint8_t capabilitiesReceived[1];
|
||||
} diagCapabilityReceivedInfo;
|
||||
|
||||
|
||||
TYPEDEF_PACKED_STRUCT {
|
||||
/** IDL Service Generic Info */
|
||||
diagServiceGenericHeader header;
|
||||
/** IDL report type defined by diagServiceInfoType */
|
||||
uint8_t serviceInfoType;
|
||||
/** Union for various reports that shall be captured in IDL Service Context */
|
||||
union {
|
||||
/** System Capabilities Info */
|
||||
diagCapabilityReceivedInfo capabiltiyInfo;
|
||||
/** Captures Type of GNSS report Sent out and associated info */
|
||||
diagOutputGnssReportInfo reportInfo;
|
||||
/** Captures Type of Session Control Commands received by LocIdlService */
|
||||
diagControlCommandInfo cmdInfo;
|
||||
/** Captures Type of configuration requests received by LocIdlService */
|
||||
diagConfigApiRequest configApiInfo;
|
||||
/** Captures Platform power events received by LocIdlService */
|
||||
diagPowerEventInfo powerEvent;
|
||||
} serviceReport;
|
||||
} diagServiceInfoStruct;
|
||||
|
||||
class LocIdlServiceLog {
|
||||
|
||||
public:
|
||||
LocIdlServiceLog();
|
||||
~LocIdlServiceLog();
|
||||
bool initializeDiagIface();
|
||||
void populateIdlDiagHeaderInfo(diagServiceGenericHeader& idlHeader);
|
||||
void diagLogCapabilityInfo(string capabilitiesReceived);
|
||||
void diagLogDeleteAidingRequest (uint32_t aidingMask);
|
||||
void diagLogSessionInfo (diagControlCommandInfo idlSessionInfo, uint64_t clientIdentifier);
|
||||
void diagLogGnssReportInfo(uint8_t reportType, int16_t latencyMs, uint32_t latentReportCount);
|
||||
void diagLogPowerEventInfo(uint8_t powerEvent, uint8_t serviceStatus);
|
||||
void diagLogDeleteAidingRequest (uint64_t clientIdentifier, uint32_t aidingMask);
|
||||
void diagLogConfigConstellationRequest(uint64_t clientIdentifier,
|
||||
vector< LocIdlAPI::IDLGnssSvIdInfo > svListSrc);
|
||||
void updateSystemHealth(uint32_t totalRss, bool gptpSyncStatus);
|
||||
private:
|
||||
uint32_t mTotalRss;
|
||||
bool mGptpSyncStatus;
|
||||
};
|
||||
|
||||
#endif //LOC_IDL_SERVICE_LOG_H
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,209 @@
|
||||
/*
|
||||
Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted (subject to the limitations in the
|
||||
disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
|
||||
*/
|
||||
|
||||
/************************************************************************
|
||||
* File contains all the conversion functions from LCA reports type
|
||||
* to IDL format
|
||||
**********************************************************************/
|
||||
#ifndef LOCLCAIDLCONVERTER_H
|
||||
#define LOCLCAIDLCONVERTER_H
|
||||
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
#include <cstring>
|
||||
#include "LocationClientApi.h"
|
||||
#include <v0/com/qualcomm/qti/location/LocIdlAPIStub.hpp>
|
||||
#include <gptp_helper.h>
|
||||
|
||||
using namespace v0::com::qualcomm::qti::location;
|
||||
using namespace std;
|
||||
using namespace location_client;
|
||||
|
||||
class LocLcaIdlConverter {
|
||||
|
||||
public:
|
||||
|
||||
LocIdlAPI::IDLLocation parseBasicLocationInfo
|
||||
(
|
||||
const ::GnssLocation &basicLoc
|
||||
);
|
||||
|
||||
uint32_t parseIDLLocReliability
|
||||
(
|
||||
::LocationReliability locReliability
|
||||
);
|
||||
|
||||
LocIdlAPI::IDLLocationReportSvUsedInPosition parseIDLSvUsedInPosition
|
||||
(
|
||||
::GnssLocationSvUsedInPosition halSv
|
||||
);
|
||||
|
||||
uint32_t parseIDLNavSolutionMask
|
||||
(
|
||||
::GnssLocationNavSolutionMask navSolMask
|
||||
);
|
||||
|
||||
uint32_t parseIDLPosTechMask
|
||||
(
|
||||
location_client::LocationTechnologyMask posTechMask
|
||||
);
|
||||
|
||||
LocIdlAPI::IDLLocationReportPositionDynamics parseIDLBodyFrameData
|
||||
(
|
||||
location_client::GnssLocationPositionDynamics bodyFrameData
|
||||
);
|
||||
|
||||
LocIdlAPI::IDLGnssSystemTime parseGnssSystemTime
|
||||
(
|
||||
location_client::GnssSystemTime gnssSystemTime
|
||||
);
|
||||
|
||||
LocIdlAPI::IDLGnssSystemTimeStructType parseIDLGnssTime
|
||||
(
|
||||
location_client::GnssSystemTimeStructType gnssTime
|
||||
);
|
||||
|
||||
LocIdlAPI::IDLGnssGloTimeStructType parseIDLGloTime
|
||||
(
|
||||
location_client::GnssGloTimeStructType gloTime
|
||||
);
|
||||
|
||||
uint32_t parseIDLGnssConstellation
|
||||
(
|
||||
location_client::Gnss_LocSvSystemEnumType constellation
|
||||
);
|
||||
|
||||
vector< LocIdlAPI::IDLGnssMeasUsageInfo > parseIDLMeasUsageInfo
|
||||
(
|
||||
vector<location_client::GnssMeasUsageInfo> measUsageInfo
|
||||
);
|
||||
|
||||
uint32_t parseIDLCalibrationStatus
|
||||
(
|
||||
location_client::DrCalibrationStatusMask statusMask
|
||||
);
|
||||
|
||||
uint32_t parseIDLEngMask
|
||||
(
|
||||
location_client::PositioningEngineMask locOutputEngMask
|
||||
);
|
||||
|
||||
LocIdlAPI::IDLLLAInfo parseIDLLatLongAltInfo
|
||||
(
|
||||
location_client::LLAInfo llaVRPBased
|
||||
);
|
||||
|
||||
uint64_t parseIDLDrSolStatusMask
|
||||
(
|
||||
location_client::DrSolutionStatusMask drSolutionStatusMask
|
||||
);
|
||||
|
||||
LocIdlAPI::IDLLocationReport parseLocReport
|
||||
(
|
||||
const location_client::GnssLocation &lcaLoc
|
||||
);
|
||||
|
||||
LocIdlAPI::IDLGnssSvType parseIDLSvType
|
||||
(
|
||||
location_client::GnssSvType svType
|
||||
);
|
||||
|
||||
uint32_t parseIDLSvOptionMask
|
||||
(
|
||||
location_client:: GnssSvOptionsMask optionMask
|
||||
);
|
||||
|
||||
LocIdlAPI::IDLGnssSv parseSvReport
|
||||
(
|
||||
const location_client::GnssSv& gnssSvs
|
||||
);
|
||||
|
||||
uint32_t parseGnssClkFlags (
|
||||
location_client::GnssMeasurementsClockFlagsMask clkFlags
|
||||
);
|
||||
|
||||
|
||||
LocIdlAPI::IDLGnssMeasurementsClock parseIDLMeasClockInfo
|
||||
(
|
||||
location_client::GnssMeasurementsClock gnssClock
|
||||
);
|
||||
|
||||
uint32_t parseIDLMeasFlags(
|
||||
location_client::GnssMeasurementsDataFlagsMask gnssFlags
|
||||
);
|
||||
|
||||
uint32_t parseIDLStateMask(
|
||||
location_client::GnssMeasurementsStateMask stateMask
|
||||
);
|
||||
|
||||
uint32_t parseIDLAdrStateMask(
|
||||
location_client::GnssMeasurementsAdrStateMask adrStatemask
|
||||
);
|
||||
|
||||
uint32_t parseIDLMultiPathIndicator(
|
||||
location_client::GnssMeasurementsMultipathIndicator multipathIndicator
|
||||
);
|
||||
|
||||
vector<LocIdlAPI::IDLGnssMeasurementsData > parseIDLMeasData
|
||||
(
|
||||
vector<location_client::GnssMeasurementsData> gnssMeasData
|
||||
);
|
||||
|
||||
LocIdlAPI::IDLGnssMeasurements parseMeasurements
|
||||
(
|
||||
const location_client::GnssMeasurements& gnssMeasurements
|
||||
);
|
||||
|
||||
uint32_t parseIDLDataMask
|
||||
(
|
||||
const location_client::GnssDataMask& mask
|
||||
);
|
||||
|
||||
LocIdlAPI::IDLGnssData parseGnssData
|
||||
(
|
||||
const location_client::GnssData& gnssData
|
||||
);
|
||||
|
||||
uint32_t parseIDLSignalType (
|
||||
location_client::GnssSignalTypeMask lcaSignalType
|
||||
);
|
||||
|
||||
LocLcaIdlConverter();
|
||||
|
||||
~LocLcaIdlConverter();
|
||||
};
|
||||
|
||||
#endif
|
@@ -0,0 +1,9 @@
|
||||
[default]
|
||||
binding=someip
|
||||
tp=true
|
||||
|
||||
[logging]
|
||||
console = true
|
||||
file = ./mylog.log
|
||||
dlt = false
|
||||
level = verbose
|
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"unicast" : "10.131.4.37",
|
||||
"logging" :
|
||||
{
|
||||
"level" : "debug",
|
||||
"console" : "true",
|
||||
"file" : { "enable" : "false", "path" : "/var/log/vsomeip.log" },
|
||||
"dlt" : "false"
|
||||
},
|
||||
"applications" :
|
||||
[
|
||||
{
|
||||
"name" : "client-sample",
|
||||
"id" : "0x1343"
|
||||
},
|
||||
{
|
||||
"name" : "service-sample",
|
||||
"id" : "0x1277"
|
||||
}
|
||||
],
|
||||
"services" :
|
||||
[
|
||||
{
|
||||
"service" : "0x1234",
|
||||
"instance" : "0x5678",
|
||||
"reliable" : { "port" : "30509", "enable-magic-cookies" : "false" },
|
||||
"unreliable" : "31000"
|
||||
}
|
||||
],
|
||||
"routing" : "client-sample",
|
||||
"service-discovery" :
|
||||
{
|
||||
"enable" : "true",
|
||||
"multicast" : "224.244.224.245",
|
||||
"port" : "30490",
|
||||
"protocol" : "udp"
|
||||
}
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"unicast" : "192.168.1.10",
|
||||
"netmask" : "255.255.0.0",
|
||||
"logging" :
|
||||
{
|
||||
"level" : "debug",
|
||||
"console" : "true",
|
||||
"file" : { "enable" : "false", "path" : "/var/log/vsomeip.log" },
|
||||
"dlt" : "false"
|
||||
},
|
||||
"applications" :
|
||||
[
|
||||
{
|
||||
"name" : "location-fidl-service",
|
||||
"id" : "0x3"
|
||||
}
|
||||
],
|
||||
"services" :
|
||||
[
|
||||
{
|
||||
"service" : "0xEE00",
|
||||
"instance" : "0x01",
|
||||
"reliable" : { "port" : "30509", "enable-magic-cookies" : "false" },
|
||||
"unreliable" : "31000",
|
||||
"someip-tp": {
|
||||
"service-to-client": ["0x80E9", "0x80EA", "0x80EB", "0x80EC", "0x80ED", "0x80EE", "0x80EF", "0x80F0"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"max-payload-size-unreliable" : "15000",
|
||||
"routing" : "sensor-fidl-service",
|
||||
"network" : "vlan_ivss",
|
||||
"service-discovery" :
|
||||
{
|
||||
"enable" : "true",
|
||||
"multicast" : "224.244.224.245",
|
||||
"port" : "30490",
|
||||
"protocol" : "udp"
|
||||
}
|
||||
}
|
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"unicast" : "10.131.4.37",
|
||||
"netmask" : "255.255.0.0",
|
||||
"logging" :
|
||||
{
|
||||
"level" : "debug",
|
||||
"console" : "true",
|
||||
"file" : { "enable" : "false", "path" : "/var/log/vsomeip.log" },
|
||||
"dlt" : "false"
|
||||
},
|
||||
"applications" :
|
||||
[
|
||||
{
|
||||
"name" : "service-sample",
|
||||
"id" : "0x1277"
|
||||
}
|
||||
],
|
||||
"services" :
|
||||
[
|
||||
{
|
||||
"service" : "0x1234",
|
||||
"instance" : "0x5678",
|
||||
"reliable" : { "port" : "30509", "enable-magic-cookies" : "false" },
|
||||
"unreliable" : "31000",
|
||||
"someip-tp": {
|
||||
"service-to-client": ["0x9471", "0x7472", "0x7535", "0x7531"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"routing" : "service-sample",
|
||||
"service-discovery" :
|
||||
{
|
||||
"enable" : "true",
|
||||
"multicast" : "224.244.224.245",
|
||||
"port" : "30490",
|
||||
"protocol" : "udp"
|
||||
}
|
||||
}
|
38
qcom/opensource/location/loc-fidl/vsomeip-local.json
Normal file
38
qcom/opensource/location/loc-fidl/vsomeip-local.json
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"unicast" : "10.131.4.37",
|
||||
"logging" :
|
||||
{
|
||||
"level" : "debug",
|
||||
"console" : "true",
|
||||
"file" : { "enable" : "false", "path" : "/var/log/vsomeip.log" },
|
||||
"dlt" : "false"
|
||||
},
|
||||
"applications" :
|
||||
[
|
||||
{
|
||||
"name" : "client-sample",
|
||||
"id" : "0x1343"
|
||||
},
|
||||
{
|
||||
"name" : "service-sample",
|
||||
"id" : "0x1277"
|
||||
}
|
||||
],
|
||||
"services" :
|
||||
[
|
||||
{
|
||||
"service" : "0x1234",
|
||||
"instance" : "0x5678",
|
||||
"reliable" : { "port" : "30509", "enable-magic-cookies" : "false" },
|
||||
"unreliable" : "31000"
|
||||
}
|
||||
],
|
||||
"routing" : "client-sample",
|
||||
"service-discovery" :
|
||||
{
|
||||
"enable" : "true",
|
||||
"multicast" : "224.244.224.245",
|
||||
"port" : "30490",
|
||||
"protocol" : "udp"
|
||||
}
|
||||
}
|
2
qcom/opensource/location/loc_api/Android.mk
Normal file
2
qcom/opensource/location/loc_api/Android.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
include $(call all-subdir-makefiles)
|
7
qcom/opensource/location/loc_api/loc_api_v02/Android.bp
Normal file
7
qcom/opensource/location/loc_api/loc_api_v02/Android.bp
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
cc_library_headers {
|
||||
|
||||
name: "libloc_api_v02_headers",
|
||||
export_include_dirs: ["."],
|
||||
vendor: true,
|
||||
}
|
48
qcom/opensource/location/loc_api/loc_api_v02/Android.mk
Normal file
48
qcom/opensource/location/loc_api/loc_api_v02/Android.mk
Normal file
@@ -0,0 +1,48 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := libloc_api_v02
|
||||
LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib
|
||||
LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libutils \
|
||||
libcutils \
|
||||
libqmi_cci \
|
||||
libqmi_common_so \
|
||||
libloc_core \
|
||||
libgps.utils \
|
||||
libdl \
|
||||
liblog \
|
||||
libsemnativecarrierfeature
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
LocApiV02.cpp \
|
||||
loc_api_v02_log.cpp \
|
||||
loc_api_v02_client.cpp \
|
||||
loc_api_sync_req.cpp \
|
||||
location_service_v02.c \
|
||||
qmi_secgps_clnt.c \
|
||||
qmi_secgps_api_v01.c
|
||||
|
||||
LOCAL_CFLAGS += \
|
||||
-fno-short-enums \
|
||||
-D_ANDROID_
|
||||
|
||||
## Includes
|
||||
LOCAL_C_INCLUDES := bionic external/stlport/stlport
|
||||
LOCAL_C_INCLUDES += vendor/samsung/configs/feature/CarrierFeature/libsemnativecarrierfeature
|
||||
LOCAL_C_INCLUDES += external/zlib
|
||||
|
||||
LOCAL_HEADER_LIBRARIES := \
|
||||
libloc_core_headers \
|
||||
libgps.utils_headers \
|
||||
libloc_pla_headers \
|
||||
liblocation_api_headers \
|
||||
libqmi_common_headers \
|
||||
libqmi_cci_headers
|
||||
|
||||
LOCAL_CFLAGS += $(GNSS_CFLAGS)
|
||||
include $(BUILD_SHARED_LIBRARY)
|
13571
qcom/opensource/location/loc_api/loc_api_v02/LocApiV02.cpp
Normal file
13571
qcom/opensource/location/loc_api/loc_api_v02/LocApiV02.cpp
Normal file
File diff suppressed because it is too large
Load Diff
721
qcom/opensource/location/loc_api/loc_api_v02/LocApiV02.h
Normal file
721
qcom/opensource/location/loc_api/loc_api_v02/LocApiV02.h
Normal file
@@ -0,0 +1,721 @@
|
||||
/* Copyright (c) 2011-2021, 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||
|
||||
Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted (subject to the limitations in the
|
||||
disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER 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_API_V_0_2_H
|
||||
#define LOC_API_V_0_2_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <loc_pla.h>
|
||||
#include <LocApiBase.h>
|
||||
#include <loc_api_v02_client.h>
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
#include <unordered_map>
|
||||
#include <SecGpsInterface.h> //SEC
|
||||
|
||||
#define LOC_SEND_SYNC_REQ(NAME, ID, REQ) \
|
||||
int rv = true; \
|
||||
locClientStatusEnumType st; \
|
||||
locClientReqUnionType reqUnion; \
|
||||
qmiLoc##NAME##IndMsgT_v02 ind; \
|
||||
\
|
||||
memset(&ind, 0, sizeof(ind)); \
|
||||
reqUnion.p##NAME##Req = &REQ; \
|
||||
\
|
||||
st = locSyncSendReq(QMI_LOC_##ID##_REQ_V02, \
|
||||
reqUnion, \
|
||||
LOC_ENGINE_SYNC_REQUEST_TIMEOUT, \
|
||||
QMI_LOC_##ID##_IND_V02, \
|
||||
&ind); \
|
||||
\
|
||||
if (st != eLOC_CLIENT_SUCCESS || \
|
||||
eQMI_LOC_SUCCESS_V02 != ind.status) { \
|
||||
rv = false; \
|
||||
}
|
||||
|
||||
using Resender = std::function<void()>;
|
||||
using namespace loc_core;
|
||||
|
||||
typedef uint64_t GpsSvMeasHeaderFlags;
|
||||
#define BIAS_GPSL1_VALID 0x00000001
|
||||
#define BIAS_GPSL1_UNC_VALID 0x00000002
|
||||
#define BIAS_GPSL1_GPSL5_VALID 0x00000004
|
||||
#define BIAS_GPSL1_GPSL5_UNC_VALID 0x00000008
|
||||
#define BIAS_GPSL1_GLOG1_VALID 0x00000010
|
||||
#define BIAS_GPSL1_GLOG1_UNC_VALID 0x00000020
|
||||
#define BIAS_GPSL1_GALE1_VALID 0x00000040
|
||||
#define BIAS_GPSL1_GALE1_UNC_VALID 0x00000080
|
||||
#define BIAS_GPSL1_BDSB1_VALID 0x00000100
|
||||
#define BIAS_GPSL1_BDSB1_UNC_VALID 0x00000200
|
||||
#define BIAS_GPSL1_NAVIC_VALID 0x00000400
|
||||
#define BIAS_GPSL1_NAVIC_UNC_VALID 0x00000800
|
||||
|
||||
#define BIAS_GALE1_VALID 0x00001000
|
||||
#define BIAS_GALE1_UNC_VALID 0x00002000
|
||||
#define BIAS_GALE1_GALE5A_VALID 0x00004000
|
||||
#define BIAS_GALE1_GALE5A_UNC_VALID 0x00008000
|
||||
#define BIAS_BDSB1_VALID 0x00010000
|
||||
#define BIAS_BDSB1_UNC_VALID 0x00020000
|
||||
#define BIAS_BDSB1_BDSB1C_VALID 0x00040000
|
||||
#define BIAS_BDSB1_BDSB1C_UNC_VALID 0x00080000
|
||||
#define BIAS_BDSB1_BDSB2A_VALID 0x00100000
|
||||
#define BIAS_BDSB1_BDSB2A_UNC_VALID 0x00200000
|
||||
|
||||
#define BIAS_GPSL1_GPSL2C_VALID 0x00400000
|
||||
#define BIAS_GPSL1_GPSL2C_UNC_VALID 0x00800000
|
||||
#define BIAS_GALE1_GALE5B_VALID 0x01000000
|
||||
#define BIAS_GALE1_GALE5B_UNC_VALID 0x02000000
|
||||
#define BIAS_BDSB1_BDSB2BI_VALID 0x04000000
|
||||
#define BIAS_BDSB1_BDSB2BI_UNC_VALID 0x08000000
|
||||
|
||||
#define BIAS_GLOG1_VALID 0x10000000
|
||||
#define BIAS_GLOG1_UNC_VALID 0x20000000
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint64_t flags;
|
||||
|
||||
/* used directly */
|
||||
float gpsL1;
|
||||
float gpsL1Unc;
|
||||
float gpsL1_gpsL5;
|
||||
float gpsL1_gpsL5Unc;
|
||||
float gpsL1_gpsL2c;
|
||||
float gpsL1_gpsL2cUnc;
|
||||
float gpsL1_gloG1;
|
||||
float gpsL1_gloG1Unc;
|
||||
float gpsL1_galE1;
|
||||
float gpsL1_galE1Unc;
|
||||
float gpsL1_bdsB1;
|
||||
float gpsL1_bdsB1Unc;
|
||||
float gpsL1_navic;
|
||||
float gpsL1_navicUnc;
|
||||
|
||||
/* used for intermediate computations */
|
||||
float galE1;
|
||||
float galE1Unc;
|
||||
float galE1_galE5a;
|
||||
float galE1_galE5aUnc;
|
||||
float galE1_galE5b;
|
||||
float galE1_galE5bUnc;
|
||||
float bdsB1;
|
||||
float bdsB1Unc;
|
||||
float bdsB1_bdsB1c;
|
||||
float bdsB1_bdsB1cUnc;
|
||||
float bdsB1_bdsB2a;
|
||||
float bdsB1_bdsB2aUnc;
|
||||
float bdsB1_bdsB2bi;
|
||||
float bdsB1_bdsB2biUnc;
|
||||
float gloG1;
|
||||
float gloG1Unc;
|
||||
} timeBiases;
|
||||
|
||||
typedef struct {
|
||||
GnssSvType svType;
|
||||
double carrierFrequencyHz;
|
||||
GnssMeasurementsCodeType codeType;
|
||||
} referenceSignalTypeForIsb;
|
||||
|
||||
typedef struct {
|
||||
/* bitwise OR of GnssMeasurementsClockFlagsBits */
|
||||
GnssMeasurementsClockFlagsMask flags;
|
||||
int64_t timeNs;
|
||||
int64_t fullBiasNs;
|
||||
} GnssBasicClockInfo;
|
||||
|
||||
typedef struct {
|
||||
int16_t svId;
|
||||
GnssSignalTypeMask gnssSignalType;
|
||||
} GnssBasicMeasurementsData;
|
||||
|
||||
typedef struct {
|
||||
/* clock info */
|
||||
GnssBasicClockInfo clock;
|
||||
std::vector<GnssBasicMeasurementsData> measurements;
|
||||
} GnssBasicMeasurementsInfo;
|
||||
|
||||
struct MeasCacheInfo {
|
||||
uint8_t cycleSlipCount;
|
||||
uint32_t refFCount;
|
||||
};
|
||||
|
||||
/** Indicate Gnss Constellation RF Band type <br/> */
|
||||
enum GnssRfBand {
|
||||
/**< Gnss RF Band Unknown <br/> */
|
||||
GNSS_RF_BAND_UNKNOWN = 0,
|
||||
/**< Gnss L1 RF Band <br/> */
|
||||
GNSS_RF_BAND_L1 = 1,
|
||||
/**< Gnss L2 RF Band <br/> */
|
||||
GNSS_RF_BAND_L2 = 2,
|
||||
/**< Gnss L5 RF Band <br/> */
|
||||
GNSS_RF_BAND_L5 = 3,
|
||||
};
|
||||
|
||||
typedef std::unordered_map<string, MeasCacheInfo> CycleSlipCountMap;
|
||||
typedef CycleSlipCountMap::iterator CycleSlipCountMapItr;
|
||||
|
||||
/* This class derives from the LocApiBase class.
|
||||
The members of this class are responsible for converting
|
||||
the Loc API V02 data structures into Loc Adapter data structures.
|
||||
This class also implements some of the virtual functions that
|
||||
handle the requests from loc engine. */
|
||||
class LocApiV02 : public LocApiBase {
|
||||
protected:
|
||||
/* loc api v02 handle*/
|
||||
locClientHandleType clientHandle;
|
||||
|
||||
private:
|
||||
locClientEventMaskType mQmiMask;
|
||||
bool mInSession;
|
||||
GnssPowerMode mPowerMode;
|
||||
bool mEngineOn;
|
||||
bool mFirstMeasurementOfSessionReceived;
|
||||
std::vector<Resender> mResenders;
|
||||
bool mMasterRegisterNotSupported;
|
||||
uint32_t mCounter;
|
||||
uint32_t mMinInterval;
|
||||
|
||||
CycleSlipCountMap mPrev1HzSlipCountMap;
|
||||
CycleSlipCountMap mPrevNhzSlipCountMap;
|
||||
CycleSlipCountMap mCurrentCycleSlipCountMap1Hz;
|
||||
CycleSlipCountMap mCurrentCycleSlipCountMapNHz;
|
||||
|
||||
GnssMeasurements* mGnssMeasurements;
|
||||
bool mPreferredSignalTypeReceived;
|
||||
timeBiases mTimeBiases;
|
||||
std::unordered_map<uint16_t, GnssSvPolynomial> mSvPolynomialMap;
|
||||
qmiLocPlatformPowerStateEnumT_v02 mPlatformPowerState;
|
||||
|
||||
size_t mBatchSize, mDesiredBatchSize;
|
||||
size_t mTripBatchSize, mDesiredTripBatchSize;
|
||||
bool mIsFirstFinalFixReported;
|
||||
bool mIsFirstStartFixReq;
|
||||
uint64_t mHlosQtimer1, mHlosQtimer2;
|
||||
uint32_t mRefFCount;
|
||||
std::string mPackageName[eQMI_LOC_NTN_V02+1];
|
||||
bool mIsFullTracking;
|
||||
qmiLocGnssSignalTypeMaskT_v02 mPreferredSignalType;
|
||||
referenceSignalTypeForIsb mReferenceSignalTypeForIsb;
|
||||
ModemGnssQesdkFeatureMask mQesdkFeatureMask;
|
||||
// GPTP inititialization
|
||||
bool mIsGptpInitialized;
|
||||
|
||||
// < SEC_GPS
|
||||
bool mSecDefaultInitDone;
|
||||
bool mIsSsrHappened;
|
||||
bool mIsWifiOnly;
|
||||
bool mPendingSetParam;
|
||||
bool mSentCI;
|
||||
// SEC_GPS >
|
||||
|
||||
// Below two member variables are for elapsedRealTime calculation
|
||||
RealtimeEstimator mMeasElapsedRealTimeCal;
|
||||
GnssMeasurementsNotification m1HzMeasurementsNotify;
|
||||
GnssBasicMeasurementsInfo m1HzMeasurementsInfo;
|
||||
|
||||
/* Convert event mask from loc eng to loc_api_v02 format */
|
||||
static locClientEventMaskType convertLocClientEventMask(LOC_API_ADAPTER_EVENT_MASK_T mask);
|
||||
|
||||
/* Convert GPS LOCK from LocationAPI format to QMI format */
|
||||
static qmiLocLockEnumT_v02 convertGpsLockFromAPItoQMI(GnssConfigGpsLock lock);
|
||||
|
||||
// QC CR3933472
|
||||
/* Convert GPS LOCK to QMI Client Config Mask */
|
||||
static qmiLocClientsMaskT_v02 convertGpsLock(GnssConfigGpsLock lock);
|
||||
|
||||
/* Convert Engine Lock State from QMI format to LocationAPI format */
|
||||
static EngineLockState convertEngineLockState(qmiLocEngineLockStateEnumT_v02 LockState);
|
||||
|
||||
/* Convert error from loc_api_v02 to loc eng format*/
|
||||
static enum loc_api_adapter_err convertErr(locClientStatusEnumType status);
|
||||
|
||||
/* convert Ni Encoding type from QMI_LOC to loc eng format */
|
||||
static GnssNiEncodingType convertNiEncoding(
|
||||
qmiLocNiDataCodingSchemeEnumT_v02 loc_encoding);
|
||||
|
||||
/*convert NI notify verify type from QMI LOC to loc eng format*/
|
||||
static bool convertNiNotifyVerifyType (GnssNiNotification *notif,
|
||||
qmiLocNiNotifyVerifyEnumT_v02 notif_priv);
|
||||
|
||||
/*convert signal type to carrier frequency*/
|
||||
static double convertSignalTypeToCarrierFrequency(
|
||||
qmiLocGnssSignalTypeMaskT_v02 signalType,
|
||||
uint8_t gloFrequency);
|
||||
|
||||
/*convert GnssMeasurement type from QMI LOC to loc eng format*/
|
||||
void convertGnssMeasurements (
|
||||
const qmiLocEventGnssSvMeasInfoIndMsgT_v02& gnss_measurement_report_ptr,
|
||||
int index, bool isExt, bool validDgnssSvMeas, bool validMlInference);
|
||||
|
||||
/* Convert APN Type mask */
|
||||
static qmiLocApnTypeMaskT_v02 convertLocApnTypeMask(LocApnTypeMask mask);
|
||||
static LocApnTypeMask convertQmiLocApnTypeMask(qmiLocApnTypeMaskT_v02 mask);
|
||||
|
||||
/* Convert Get Constellation QMI Ind info to GnssSvTypeConfig */
|
||||
static void convertToGnssSvTypeConfig(
|
||||
const qmiLocGetConstellationConfigIndMsgT_v02& ind,
|
||||
GnssSvTypeConfig& config);
|
||||
|
||||
/* Convert GnssPowerMode to QMI Loc Power Mode Enum */
|
||||
static qmiLocPowerModeEnumT_v02 convertPowerMode(GnssPowerMode powerMode);
|
||||
|
||||
void convertGnssMeasurementsHeader(const Gnss_LocSvSystemEnumType locSvSystemType,
|
||||
const qmiLocEventGnssSvMeasInfoIndMsgT_v02& gnss_measurement_info);
|
||||
|
||||
/*convert LocGnssClock type from QMI LOC to loc eng format*/
|
||||
void convertGnssClock (GnssMeasurementsClock& clock,
|
||||
const qmiLocEventGnssSvMeasInfoIndMsgT_v02& gnss_measurement_info);
|
||||
|
||||
/* convert dgnss constellation mask from QMI loc to loc eng format */
|
||||
static void convertGnssConestellationMask (
|
||||
qmiLocGNSSConstellEnumT_v02 qmiConstellationEnum,
|
||||
GnssConstellationTypeMask& constellationMask);
|
||||
|
||||
static GnssSignalTypeMask convertQmiGnssSignalType(
|
||||
qmiLocGnssSignalTypeMaskT_v02 qmiGnssSignalType);
|
||||
|
||||
void convertOsnmaTreeNode(qmiLocOsnmaTreeNodeT_v02& out, mgpOsnmaTreeNodeT& in);
|
||||
void convertPublicKeyAndMerkleTreeStruct(qmiLocOsnmaPublicKeyMerkleTreeReqMsgT_v02& qmiOut,
|
||||
mgpOsnmaPublicKeyAndMerkleTreeStruct& in);
|
||||
/* convert Agc status from QMI loc to loc eng format */
|
||||
static AgcStatus convertQmiAgcStatusType(qmiLocAgcStatusEnumT_v02 qmiAgcStatus);
|
||||
|
||||
/* If Confidence value is less than 68%, then scale the accuracy value to 68%
|
||||
confidence.*/
|
||||
void scaleAccuracyTo68PercentConfidence(const uint8_t confidenceValue,
|
||||
LocGpsLocation &gpsLocation,
|
||||
const bool isCircularUnc);
|
||||
|
||||
/* convert position report to loc eng format and send the converted
|
||||
position to loc eng */
|
||||
void reportPosition
|
||||
(const qmiLocEventPositionReportIndMsgT_v02 *location_report_ptr,
|
||||
bool unpropagatedPosition = false);
|
||||
|
||||
/* convert satellite report to loc eng format and send the converted
|
||||
report to loc eng */
|
||||
void reportSv (const qmiLocEventGnssSvInfoIndMsgT_v02 *gnss_report_ptr);
|
||||
|
||||
void reportSvPolynomial (
|
||||
const qmiLocEventGnssSvPolyIndMsgT_v02 *gnss_sv_poly_ptr);
|
||||
|
||||
void reportSvEphemeris (
|
||||
uint32_t eventId, const locClientEventIndUnionType &eventPayload);
|
||||
|
||||
void populateGpsEphemeris(const qmiLocGpsEphemerisReportIndMsgT_v02 *,
|
||||
GnssSvEphemerisReport &);
|
||||
void populateGlonassEphemeris(const qmiLocGloEphemerisReportIndMsgT_v02 *,
|
||||
GnssSvEphemerisReport &);
|
||||
void populateBdsEphemeris(const qmiLocBdsEphemerisReportIndMsgT_v02 *,
|
||||
GnssSvEphemerisReport &);
|
||||
void populateGalEphemeris(const qmiLocGalEphemerisReportIndMsgT_v02 *,
|
||||
GnssSvEphemerisReport &);
|
||||
void populateQzssEphemeris(const qmiLocQzssEphemerisReportIndMsgT_v02 *,
|
||||
GnssSvEphemerisReport &);
|
||||
void populateCommonEphemeris(const qmiLocEphGnssDataStructT_v02 &, GnssEphCommon &);
|
||||
void populateGpsTimeOfReport(const qmiLocGnssTimeStructT_v02 &, GnssSystemTimeStructType &);
|
||||
|
||||
void populateFeatureStatusReport(const qmiLocFeaturesStatusMaskT_v02 &featureStatusReport,
|
||||
std::unordered_map<LocationQwesFeatureType, bool> &featureMap);
|
||||
void reportLocEvent(const qmiLocEventReportIndMsgT_v02 *event_report_ptr);
|
||||
/* convert system info to location api format and dispatch to
|
||||
the registered adapter */
|
||||
void reportSystemInfo(const qmiLocSystemInfoIndMsgT_v02* system_info_ptr);
|
||||
void reportLocationRequestNotification(
|
||||
const qmiLocLocationRequestNotificationIndMsgT_v02* loc_req_notif);
|
||||
|
||||
/* convert engine state report to loc eng format and send the converted
|
||||
report to loc eng */
|
||||
void reportEngineState (
|
||||
const qmiLocEventEngineStateIndMsgT_v02 *engine_state_ptr);
|
||||
|
||||
/* convert fix session report to loc eng format and send the converted
|
||||
report to loc eng */
|
||||
void reportFixSessionState (
|
||||
const qmiLocEventFixSessionStateIndMsgT_v02 *fix_session_state_ptr);
|
||||
|
||||
/* convert and report an ATL request to loc engine */
|
||||
void reportAtlRequest(
|
||||
const qmiLocEventLocationServerConnectionReqIndMsgT_v02
|
||||
*server_request_ptr);
|
||||
|
||||
/* convert and report NI request to loc eng */
|
||||
void reportNiRequest(
|
||||
const qmiLocEventNiNotifyVerifyReqIndMsgT_v02 *ni_req_ptr);
|
||||
|
||||
/* report the xtra server info */
|
||||
void reportXtraServerUrl(
|
||||
const qmiLocEventInjectPredictedOrbitsReqIndMsgT_v02* server_request_ptr);
|
||||
|
||||
/* convert and report GNSS measurement data to loc eng */
|
||||
void reportGnssMeasurementData(
|
||||
const qmiLocEventGnssSvMeasInfoIndMsgT_v02& gnss_measurement_report_ptr);
|
||||
|
||||
void reportSvMeasurementInternal();
|
||||
|
||||
inline void resetSvMeasurementReport(){
|
||||
if (mGnssMeasurements) {
|
||||
memset(mGnssMeasurements, 0, sizeof(GnssMeasurements));
|
||||
mGnssMeasurements->size = sizeof(GnssMeasurements);
|
||||
mGnssMeasurements->gnssSvMeasurementSet.size = sizeof(GnssSvMeasurementSet);
|
||||
mGnssMeasurements->gnssSvMeasurementSet.isNhz = false;
|
||||
mGnssMeasurements->gnssSvMeasurementSet.svMeasSetHeader.size =
|
||||
sizeof(GnssSvMeasurementHeader);
|
||||
}
|
||||
memset(&mTimeBiases, 0, sizeof(mTimeBiases));
|
||||
mPreferredSignalTypeReceived = false;
|
||||
}
|
||||
|
||||
void convertJammerIndicator(
|
||||
const qmiLocEventGnssSvMeasInfoIndMsgT_v02& gnss_measurement_report_ptr,
|
||||
double& agcLevelDb,
|
||||
GnssMeasurementsDataFlagsMask& flags,
|
||||
bool updateFlags = false);
|
||||
|
||||
void convertSvType(
|
||||
const qmiLocEventGnssSvMeasInfoIndMsgT_v02& gnss_measurement_report_ptr,
|
||||
GnssSvType& svType);
|
||||
|
||||
void setGnssBiasesForL1CA();
|
||||
void setGnssBiasesForB1I();
|
||||
void setGnssBiases();
|
||||
|
||||
/* convert and report ODCPI request */
|
||||
void requestOdcpi(
|
||||
const qmiLocEventWifiReqIndMsgT_v02& odcpiReq);
|
||||
|
||||
void registerEventMask();
|
||||
bool sendRequestForAidingData(locClientEventMaskType qmiMask);
|
||||
locClientEventMaskType adjustLocClientEventMask(locClientEventMaskType qmiMask);
|
||||
bool cacheGnssMeasurementSupport();
|
||||
void registerMasterClient();
|
||||
void getEngineLockStateSync();
|
||||
void getRobustLocationConfig(uint32_t sessionId, LocApiResponse* adapterResponse);
|
||||
void getMinGpsWeek(uint32_t sessionId, LocApiResponse* adapterResponse);
|
||||
|
||||
/* Convert get blacklist sv info to GnssSvIdConfig */
|
||||
void reportGnssSvIdConfig
|
||||
(const qmiLocGetBlacklistSvIndMsgT_v02& getBlacklistSvIndMsg);
|
||||
|
||||
/* Convert get constellation info to GnssSvTypeConfig */
|
||||
void reportGnssSvTypeConfig
|
||||
(const qmiLocGetConstellationConfigIndMsgT_v02& getConstellationConfigIndMsg);
|
||||
|
||||
/* Inform ODCPI availability to Modem */
|
||||
void wifiStatusInformSync();
|
||||
|
||||
void sendNfwNotification(GnssNfwNotification& notification);
|
||||
LocationError queryBatchBuffer(size_t desiredSize,
|
||||
size_t &allocatedSize, BatchingMode batchMode);
|
||||
LocationError releaseBatchBuffer(BatchingMode batchMode);
|
||||
void readModemLocations(Location* pLocationPiece, size_t count,
|
||||
BatchingMode batchingMode, size_t& numbOfEntries);
|
||||
void setOperationMode(GnssSuplMode mode);
|
||||
bool needsNewTripBatchRestart(uint32_t newTripDistance, uint32_t newTripTBFInterval,
|
||||
uint32_t &accumulatedDistance, uint32_t &numOfBatchedPositions);
|
||||
void batchFullEvent(const qmiLocEventBatchFullIndMsgT_v02* batchFullInfo);
|
||||
void batchStatusEvent(const qmiLocEventBatchingStatusIndMsgT_v02* batchStatusInfo);
|
||||
void onDbtPosReportEvent(const qmiLocEventDbtPositionReportIndMsgT_v02* pDbtPosReport);
|
||||
void geofenceBreachEvent(const qmiLocEventGeofenceBreachIndMsgT_v02* breachInfo);
|
||||
void geofenceBreachEvent(const qmiLocEventGeofenceBatchedBreachIndMsgT_v02* batchedBreachInfo);
|
||||
void geofenceStatusEvent(const qmiLocEventGeofenceGenAlertIndMsgT_v02* alertInfo);
|
||||
void geofenceDwellEvent(const qmiLocEventGeofenceBatchedDwellIndMsgT_v02 *dwellEvent);
|
||||
void reportLatencyInfo(const qmiLocLatencyInformationIndMsgT_v02* pLocLatencyInfo);
|
||||
void reportEngineLockStatus(const qmiLocEngineLockStateEnumT_v02 engineLockState);
|
||||
void reportEngDebugDataInfo(const qmiLocEngineDebugDataIndMsgT_v02* pLocEngDbgDataInfoIndMsg);
|
||||
|
||||
void reportPowerStateChangeInfo(
|
||||
const qmiLocPlatformPowerStateChangedIndMsgT_v02 *pPowerStateChangedInfo);
|
||||
|
||||
/* report disaster and crisis message */
|
||||
void reportDcMessage(const qmiLocEventDcReportIndMsgT_v02* pDcReportIndMsg);
|
||||
|
||||
bool isMeasurementRefreshForSv(uint16_t gnssSvId,
|
||||
GnssSignalTypeMask gnssSignalTypeMask);
|
||||
|
||||
bool isTOAValid(const qmiLocEventPositionReportIndMsgT_v02 *location_report_ptr,
|
||||
const GnssBasicMeasurementsInfo *pOneHzMeasurements);
|
||||
|
||||
void processGnssBandsSupportedInd(
|
||||
const qmiLocGnssBandsSupportedIndMsgT_v02* pGnssBandsSupportedIndMsg);
|
||||
|
||||
GnssMeasurementsCodeType getCodeType(qmiLocGnssSignalTypeMaskT_v02 gnssSignalType);
|
||||
void updateGnssCapabNotification(GnssCapabNotification& gnssCapabNotification,
|
||||
qmiLocGnssSignalTypeMaskT_v02 gnssSignalType);
|
||||
|
||||
protected:
|
||||
virtual enum loc_api_adapter_err
|
||||
open(LOC_API_ADAPTER_EVENT_MASK_T mask);
|
||||
virtual enum loc_api_adapter_err
|
||||
close();
|
||||
|
||||
LocApiV02(LOC_API_ADAPTER_EVENT_MASK_T exMask,
|
||||
ContextBase *context = NULL);
|
||||
virtual ~LocApiV02();
|
||||
|
||||
public:
|
||||
static LocApiBase* createLocApiV02(LOC_API_ADAPTER_EVENT_MASK_T exMask,
|
||||
ContextBase* context);
|
||||
/* event callback registered with the loc_api v02 interface */
|
||||
virtual void eventCb(locClientHandleType client_handle,
|
||||
uint32_t loc_event_id,
|
||||
locClientEventIndUnionType loc_event_payload);
|
||||
|
||||
/* error callback, this function handles the service unavailable
|
||||
error */
|
||||
void errorCb(locClientHandleType handle,
|
||||
locClientErrorEnumType errorId);
|
||||
|
||||
// Tracking
|
||||
void startTimeBasedTracking(const TrackingOptions& options, LocApiResponse* adapterResponse);
|
||||
void stopTimeBasedTracking(LocApiResponse* adapterResponse);
|
||||
void startDistanceBasedTracking(uint32_t sessionId, const LocationOptions& options,
|
||||
LocApiResponse* adapterResponse);
|
||||
void stopDistanceBasedTracking(uint32_t sessionId, LocApiResponse* adapterResponse);
|
||||
|
||||
// Batching
|
||||
void startBatching(uint32_t sessionId, const LocationOptions& options, uint32_t accuracy,
|
||||
uint32_t timeout, LocApiResponse* adapterResponse);
|
||||
void stopBatching(uint32_t sessionId, LocApiResponse* adapterResponse);
|
||||
LocationError startOutdoorTripBatchingSync(uint32_t tripDistance, uint32_t tripTbf,
|
||||
uint32_t timeout);
|
||||
void startOutdoorTripBatching(uint32_t tripDistance, uint32_t tripTbf, uint32_t timeout,
|
||||
LocApiResponse* adapterResponse);
|
||||
void reStartOutdoorTripBatching(uint32_t ongoingTripDistance, uint32_t ongoingTripInterval,
|
||||
uint32_t batchingTimeout, LocApiResponse* adapterResponse);
|
||||
LocationError stopOutdoorTripBatchingSync(bool deallocBatchBuffer = true);
|
||||
void stopOutdoorTripBatching(bool deallocBatchBuffer = true,
|
||||
LocApiResponse* adapterResponse = nullptr);
|
||||
LocationError getBatchedLocationsSync(size_t count);
|
||||
void getBatchedLocations(size_t count, LocApiResponse* adapterResponse);
|
||||
LocationError getBatchedTripLocationsSync(size_t count, uint32_t accumulatedDistance);
|
||||
void getBatchedTripLocations(size_t count, uint32_t accumulatedDistance,
|
||||
LocApiResponse* adapterResponse);
|
||||
virtual void setBatchSize(size_t size);
|
||||
virtual void setTripBatchSize(size_t size);
|
||||
LocationError queryAccumulatedTripDistanceSync(uint32_t &accumulatedTripDistance,
|
||||
uint32_t &numOfBatchedPositions);
|
||||
void queryAccumulatedTripDistance(
|
||||
LocApiResponseData<LocApiBatchData>* adapterResponseData);
|
||||
|
||||
// Geofence
|
||||
virtual void addGeofence(uint32_t clientId, const GeofenceOption& options,
|
||||
const GeofenceInfo& info, LocApiResponseData<LocApiGeofenceData>* adapterResponseData);
|
||||
virtual void removeGeofence(uint32_t hwId, uint32_t clientId, LocApiResponse* adapterResponse);
|
||||
virtual void pauseGeofence(uint32_t hwId, uint32_t clientId, LocApiResponse* adapterResponse);
|
||||
virtual void resumeGeofence(uint32_t hwId, uint32_t clientId, LocApiResponse* adapterResponse);
|
||||
virtual void modifyGeofence(uint32_t hwId, uint32_t clientId,
|
||||
const GeofenceOption& options, LocApiResponse* adapterResponse);
|
||||
virtual void addToCallQueue(LocApiResponse* adapterResponse);
|
||||
|
||||
|
||||
virtual void
|
||||
setTime(LocGpsUtcTime time, int64_t timeReference, int uncertainty);
|
||||
|
||||
virtual void
|
||||
injectPosition(double latitude, double longitude, float accuracy, bool onDemandCpi);
|
||||
|
||||
virtual void
|
||||
injectPosition(const Location& location, bool onDemandCpi);
|
||||
|
||||
virtual void
|
||||
injectPosition(const GnssLocationInfoNotification &locationInfo, bool onDemandCpi);
|
||||
|
||||
virtual void injectPositionAndCivicAddress(const Location& location,
|
||||
const GnssCivicAddress& addr);
|
||||
|
||||
virtual void
|
||||
deleteAidingData(const GnssAidingData& data, LocApiResponse *adapterResponse);
|
||||
|
||||
virtual void
|
||||
informNiResponse(GnssNiResponse userResponse, const void* passThroughData);
|
||||
|
||||
virtual LocationError
|
||||
setServerSync(const char* url, int len, LocServerType type);
|
||||
virtual LocationError
|
||||
setServerSync(unsigned int ip, int port, LocServerType type);
|
||||
virtual void
|
||||
atlOpenStatus(int handle, int is_succ, char* apn, uint32_t apnLen, AGpsBearerType bear,
|
||||
LocAGpsType agpsType, LocApnTypeMask mask);
|
||||
virtual void atlCloseStatus(int handle, int is_succ);
|
||||
virtual LocationError setSUPLVersionSync(GnssConfigSuplVersion version);
|
||||
virtual LocationError setLPPConfigSync(GnssConfigLppProfileMask profileMask);
|
||||
|
||||
|
||||
virtual enum loc_api_adapter_err
|
||||
setSensorPropertiesSync(bool gyroBiasVarianceRandomWalk_valid, float gyroBiasVarianceRandomWalk,
|
||||
bool accelBiasVarianceRandomWalk_valid, float accelBiasVarianceRandomWalk,
|
||||
bool angleBiasVarianceRandomWalk_valid, float angleBiasVarianceRandomWalk,
|
||||
bool rateBiasVarianceRandomWalk_valid, float rateBiasVarianceRandomWalk,
|
||||
bool velocityBiasVarianceRandomWalk_valid, float velocityBiasVarianceRandomWalk);
|
||||
|
||||
virtual enum loc_api_adapter_err
|
||||
setSensorPerfControlConfigSync(int controlMode, int accelSamplesPerBatch,
|
||||
int accelBatchesPerSec, int gyroSamplesPerBatch, int gyroBatchesPerSec,
|
||||
int accelSamplesPerBatchHigh, int accelBatchesPerSecHigh,
|
||||
int gyroSamplesPerBatchHigh, int gyroBatchesPerSecHigh, int algorithmConfig);
|
||||
virtual LocationError
|
||||
setAGLONASSProtocolSync(GnssConfigAGlonassPositionProtocolMask aGlonassProtocol);
|
||||
virtual LocationError setLPPeProtocolCpSync(GnssConfigLppeControlPlaneMask lppeCP);
|
||||
virtual LocationError setLPPeProtocolUpSync(GnssConfigLppeUserPlaneMask lppeUP);
|
||||
virtual void getWwanZppFix();
|
||||
virtual void
|
||||
handleWwanZppFixIndication(const qmiLocGetAvailWwanPositionIndMsgT_v02 &zpp_ind);
|
||||
virtual void
|
||||
handleZppBestAvailableFixIndication(const qmiLocGetBestAvailablePositionIndMsgT_v02 &zpp_ind);
|
||||
virtual void getBestAvailableZppFix();
|
||||
virtual bool getBestAvailableZppFixSync(LocGpsLocation &zppLoc,
|
||||
LocPosTechMask &tech_mask);
|
||||
virtual LocationError setGpsLockSync(GnssConfigGpsLock lock);
|
||||
virtual void setConstrainedTuncMode(bool enabled, float tuncConstraint, uint32_t powerBudget,
|
||||
LocApiResponse *adapterResponse=nullptr);
|
||||
virtual void setPositionAssistedClockEstimatorMode(bool enabled,
|
||||
LocApiResponse *adapterResponse=nullptr);
|
||||
virtual void getGnssEnergyConsumed();
|
||||
virtual void updateSystemPowerState(PowerStateType powerState);
|
||||
virtual void updatePowerConnectState(bool connected);
|
||||
|
||||
virtual void requestForAidingData(GnssAidingDataSvMask svDataMask);
|
||||
virtual void configRobustLocation(bool enable, bool enableForE911,
|
||||
LocApiResponse *adapterResponse=nullptr,
|
||||
bool enableForE911Valid = false);
|
||||
virtual void configMinGpsWeek(uint16_t minGpsWeek,
|
||||
LocApiResponse *adapterResponse=nullptr);
|
||||
virtual LocationError setParameterSync(const GnssConfig & gnssConfig);
|
||||
|
||||
virtual void getParameter(uint32_t sessionId, GnssConfigFlagsMask flags,
|
||||
LocApiResponse* adapterResponse=nullptr);
|
||||
virtual void setTribandState(bool enabled);
|
||||
|
||||
/*
|
||||
Returns
|
||||
Current value of GPS Lock on success
|
||||
-1 on failure
|
||||
*/
|
||||
virtual int setSvMeasurementConstellation(const locClientEventMaskType mask);
|
||||
virtual LocationError setXtraVersionCheckSync(uint32_t check);
|
||||
|
||||
virtual LocPosTechMask convertPosTechMask(qmiLocPosTechMaskT_v02 mask);
|
||||
virtual LocNavSolutionMask convertNavSolutionMask(qmiLocNavSolutionMaskT_v02 mask);
|
||||
virtual GnssConfigSuplVersion convertSuplVersion(const uint32_t suplVersion);
|
||||
virtual GnssConfigLppeControlPlaneMask convertLppeCp(const uint32_t lppeControlPlaneMask);
|
||||
virtual GnssConfigLppeUserPlaneMask convertLppeUp(const uint32_t lppeUserPlaneMask);
|
||||
virtual LocationError setEmergencyExtensionWindowSync(const uint32_t emergencyExtensionSeconds);
|
||||
virtual void setMeasurementCorrections(
|
||||
const GnssMeasurementCorrections& gnssMeasurementCorrections);
|
||||
|
||||
void convertQmiBlacklistedSvConfigToGnssConfig(
|
||||
const qmiLocGetBlacklistSvIndMsgT_v02& qmiBlacklistConfig,
|
||||
GnssSvIdConfig& gnssBlacklistConfig);
|
||||
|
||||
virtual void convertQmiSecondaryConfigToGnssConfig(
|
||||
qmiLocGNSSConstellEnumT_v02 qmiSecondaryBandConfig,
|
||||
GnssSvTypeConfig& secondaryBandConfig);
|
||||
|
||||
virtual void configPrecisePositioning(uint32_t featureId, bool enable,
|
||||
const std::string& appHash, LocApiResponse* adapterResponse=nullptr);
|
||||
/* Requests for SV/Constellation Control */
|
||||
virtual LocationError setBlacklistSvSync(const GnssSvIdConfig& config);
|
||||
virtual void setBlacklistSv(const GnssSvIdConfig& config,
|
||||
LocApiResponse* adapterResponse=nullptr);
|
||||
virtual void getBlacklistSv();
|
||||
virtual void setConstellationControl(const GnssSvTypeConfig& config,
|
||||
LocApiResponse *adapterResponse=nullptr);
|
||||
virtual void getConstellationControl();
|
||||
virtual void resetConstellationControl(LocApiResponse *adapterResponse=nullptr);
|
||||
|
||||
virtual void configConstellationMultiBand(const GnssSvTypeConfig& secondaryBandConfig,
|
||||
LocApiResponse* adapterResponse=nullptr);
|
||||
virtual void configMerkleTree(mgpOsnmaPublicKeyAndMerkleTreeStruct* merkleTree,
|
||||
LocApiResponse* adapterResponse=nullptr);
|
||||
|
||||
virtual void configOsnmaEnablement(bool enable, LocApiResponse* adapterResponse=nullptr);
|
||||
|
||||
virtual void getNtnConfigSignalMask(LocApiResponse* adapterResponse = nullptr);
|
||||
|
||||
virtual void setNtnConfigSignalMask(GnssSignalTypeMask gpsSignalTypeConfigMask,
|
||||
LocApiResponse* adapterResponse = nullptr);
|
||||
|
||||
virtual void getConstellationMultiBandConfig(uint32_t sessionId,
|
||||
LocApiResponse* adapterResponse=nullptr);
|
||||
|
||||
locClientStatusEnumType locSyncSendReq(uint32_t req_id, locClientReqUnionType req_payload,
|
||||
uint32_t timeout_msec, uint32_t ind_id, void* ind_payload_ptr);
|
||||
|
||||
inline locClientStatusEnumType locClientSendReq(uint32_t req_id,
|
||||
locClientReqUnionType req_payload) {
|
||||
return ::locClientSendReq(clientHandle, req_id, req_payload);
|
||||
}
|
||||
// < SEC_GPS
|
||||
virtual int setSecGnssParams();
|
||||
virtual enum loc_api_adapter_err setSuplSecurity(int enable);
|
||||
virtual void setSecGnssConfiguration (const char* sec_ext_config, int32_t length);
|
||||
virtual void sendSAPconfigtoCP();
|
||||
virtual void requestSetSecGnssParams();
|
||||
// SEC_GPS >
|
||||
};
|
||||
|
||||
extern "C" LocApiBase* getLocApi(LOC_API_ADAPTER_EVENT_MASK_T exMask,
|
||||
ContextBase *context);
|
||||
#endif //LOC_API_V_0_2_H
|
56
qcom/opensource/location/loc_api/loc_api_v02/Makefile.am
Normal file
56
qcom/opensource/location/loc_api/loc_api_v02/Makefile.am
Normal file
@@ -0,0 +1,56 @@
|
||||
AM_CFLAGS = \
|
||||
-I. \
|
||||
$(LOCPLA_CFLAGS) \
|
||||
$(GPSUTILS_CFLAGS) \
|
||||
$(LOCCORE_CFLAGS) \
|
||||
$(QMIFW_CFLAGS) \
|
||||
-fno-short-enums \
|
||||
-D__func__=__PRETTY_FUNCTION__ \
|
||||
-DTARGET_USES_QCOM_BSP
|
||||
|
||||
if PTP_SUPPORTED
|
||||
AM_CFLAGS += -I$(WORKSPACE)/external/open-avb/lib/libgptp \
|
||||
-DPTP_SUPPORTED
|
||||
endif
|
||||
|
||||
libloc_api_v02_la_SOURCES = \
|
||||
LocApiV02.cpp \
|
||||
loc_api_v02_log.cpp \
|
||||
loc_api_v02_client.cpp \
|
||||
loc_api_sync_req.cpp \
|
||||
location_service_v02.c
|
||||
|
||||
if USE_GLIB
|
||||
libloc_api_v02_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@
|
||||
libloc_api_v02_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread -lcutils @GLIB_LIBS@ -shared -version-info 1:0:0
|
||||
libloc_api_v02_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@
|
||||
else
|
||||
libloc_api_v02_la_CFLAGS = $(AM_CFLAGS)
|
||||
libloc_api_v02_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread -lcutils -shared -version-info 1:0:0
|
||||
libloc_api_v02_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS)
|
||||
endif
|
||||
|
||||
libloc_api_v02_la_CXXFLAGS = -std=c++0x
|
||||
libloc_api_v02_la_LIBADD = -lstdc++ -ldl -lutils $(QMIFW_LIBS) $(GPSUTILS_LIBS) $(LOCCORE_LIBS)
|
||||
|
||||
if PTP_SUPPORTED
|
||||
libloc_api_v02_la_LIBADD += -lgptp
|
||||
endif
|
||||
|
||||
library_include_HEADERS = \
|
||||
location_service_v02.h \
|
||||
loc_api_v02_log.h \
|
||||
loc_api_v02_client.h \
|
||||
loc_api_sync_req.h \
|
||||
LocApiV02.h \
|
||||
loc_util_log.h
|
||||
|
||||
library_includedir = $(pkgincludedir)/loc_api_v02
|
||||
|
||||
#Create and Install libraries
|
||||
lib_LTLIBRARIES = libloc_api_v02.la
|
||||
|
||||
library_includedir = $(pkgincludedir)
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = loc-api-v02.pc
|
||||
EXTRA_DIST = $(pkgconfig_DATA)
|
27
qcom/opensource/location/loc_api/loc_api_v02/NOTICE
Normal file
27
qcom/opensource/location/loc_api/loc_api_v02/NOTICE
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
Copyright (c) 2011-2016, 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.
|
99
qcom/opensource/location/loc_api/loc_api_v02/configure.ac
Normal file
99
qcom/opensource/location/loc_api/loc_api_v02/configure.ac
Normal file
@@ -0,0 +1,99 @@
|
||||
# configure.ac -- Autoconf script for gps loc-api-v02
|
||||
#
|
||||
# Process this file with autoconf to produce a configure script
|
||||
|
||||
# Requires autoconf tool later than 2.61
|
||||
AC_PREREQ(2.61)
|
||||
# Initialize the gps loc-api-v02 package version 1.0.0
|
||||
AC_INIT([loc-api-v02],1.0.0)
|
||||
# Does not strictly follow GNU Coding standards
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
# Disables auto rebuilding of configure, Makefile.ins
|
||||
AM_MAINTAINER_MODE
|
||||
# Verifies the --srcdir is correct by checking for the path
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
# defines some macros variable to be included by source
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_LIBTOOL
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
AC_PROG_AWK
|
||||
AC_PROG_CPP
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_LN_S
|
||||
AC_PROG_MAKE_SET
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
# Checks for libraries.
|
||||
PKG_CHECK_MODULES([GPSUTILS], [qcom-gps-utils])
|
||||
AC_SUBST([GPSUTILS_CFLAGS])
|
||||
AC_SUBST([GPSUTILS_LIBS])
|
||||
|
||||
PKG_CHECK_MODULES([LOCCORE], [loc-core])
|
||||
AC_SUBST([LOCCORE_CFLAGS])
|
||||
AC_SUBST([LOCCORE_LIBS])
|
||||
|
||||
PKG_CHECK_MODULES([QMIFW], [qmi-framework])
|
||||
AC_SUBST([QMIFW_CFLAGS])
|
||||
AC_SUBST([QMIFW_LIBS])
|
||||
|
||||
AC_ARG_WITH([core_includes],
|
||||
AC_HELP_STRING([--with-core-includes=@<:@dir@:>@],
|
||||
[Specify the location of the core headers]),
|
||||
[core_incdir=$withval],
|
||||
with_core_includes=no)
|
||||
|
||||
if test "x${with_core_includes}" != "xno"; then
|
||||
CPPFLAGS="${CPPFLAGS} -I${core_incdir}"
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([locpla_includes],
|
||||
AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@],
|
||||
[Specify the path to locpla-includes in loc-pla_git.bb]),
|
||||
[locpla_incdir=$withval],
|
||||
with_locpla_includes=no)
|
||||
|
||||
if test "x${with_locpla_includes}" != "xno"; then
|
||||
AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}")
|
||||
fi
|
||||
|
||||
AC_SUBST([CPPFLAGS])
|
||||
|
||||
AC_ARG_WITH([glib],
|
||||
AC_HELP_STRING([--with-glib],
|
||||
[enable glib, building HLOS systems which use glib]))
|
||||
|
||||
if (test "x${with_glib}" = "xyes"); then
|
||||
AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib])
|
||||
PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes,
|
||||
AC_MSG_ERROR(GThread >= 2.16 is required))
|
||||
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes,
|
||||
AC_MSG_ERROR(GLib >= 2.16 is required))
|
||||
GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS"
|
||||
GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS"
|
||||
|
||||
AC_SUBST(GLIB_CFLAGS)
|
||||
AC_SUBST(GLIB_LIBS)
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([ptp],
|
||||
[ --enable-ptp enable ptp],
|
||||
[case "${enableval}" in
|
||||
yes) ptp=true ;;
|
||||
no) ptp=false ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-ptp]) ;;
|
||||
esac],[ptp=false])
|
||||
AM_CONDITIONAL(PTP_SUPPORTED, [test x$ptp = xtrue])
|
||||
|
||||
AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes")
|
||||
|
||||
AC_CONFIG_FILES([ \
|
||||
Makefile \
|
||||
loc-api-v02.pc
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
@@ -0,0 +1,10 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: loc-api-v02
|
||||
Description: Loc Api V02
|
||||
Version: @VERSION
|
||||
Libs: -L${libdir} -lloc_api_v02
|
||||
Cflags: -I${includedir} -I${includedir}/loc-api-v02
|
@@ -0,0 +1,532 @@
|
||||
/* Copyright (c) 2011-2012, 2015-2016, 2021 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.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <string.h>
|
||||
#include <pthread.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <loc_cfg.h>
|
||||
#include "loc_api_v02_client.h"
|
||||
#include "loc_api_sync_req.h"
|
||||
#include "loc_api_v02_log.h"
|
||||
#include <loc_pla.h>
|
||||
|
||||
/* Logging */
|
||||
// Uncomment to log verbose logs
|
||||
#define LOG_NDEBUG 1
|
||||
|
||||
// log debug logs
|
||||
#define LOG_NDDEBUG 1
|
||||
#define LOG_TAG "LocSvc_api_v02"
|
||||
#include "loc_util_log.h"
|
||||
|
||||
#define LOC_SYNC_REQ_BUFFER_SIZE 8
|
||||
pthread_mutex_t loc_sync_call_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
static bool loc_sync_call_initialized = false;
|
||||
|
||||
typedef struct {
|
||||
pthread_mutex_t sync_req_lock;
|
||||
|
||||
/* Client ID */
|
||||
locClientHandleType client_handle;
|
||||
|
||||
/* waiting conditional variable */
|
||||
pthread_cond_t ind_arrived_cond;
|
||||
|
||||
/* Callback waiting data block, protected by loc_cb_data_mutex */
|
||||
bool ind_is_selected; /* is cb selected? */
|
||||
bool ind_is_waiting; /* is waiting? */
|
||||
bool ind_has_arrived; /* callback has arrived */
|
||||
uint32_t req_id; /* sync request */
|
||||
void *recv_ind_payload_ptr; /* received payload */
|
||||
uint32_t recv_ind_id; /* received ind */
|
||||
|
||||
} loc_sync_req_data_s_type;
|
||||
|
||||
typedef struct {
|
||||
bool in_use; /* at least one sync call is active */
|
||||
bool slot_in_use[LOC_SYNC_REQ_BUFFER_SIZE];
|
||||
loc_sync_req_data_s_type slots[LOC_SYNC_REQ_BUFFER_SIZE];
|
||||
} loc_sync_req_array_s_type;
|
||||
|
||||
/***************************************************************************
|
||||
* DATA FOR ASYNCHRONOUS RPC PROCESSING
|
||||
**************************************************************************/
|
||||
loc_sync_req_array_s_type loc_sync_array;
|
||||
|
||||
/*===========================================================================
|
||||
|
||||
FUNCTION loc_sync_req_init
|
||||
|
||||
DESCRIPTION
|
||||
Initialize this module
|
||||
|
||||
DEPENDENCIES
|
||||
N/A
|
||||
|
||||
RETURN VALUE
|
||||
none
|
||||
|
||||
SIDE EFFECTS
|
||||
N/A
|
||||
|
||||
===========================================================================*/
|
||||
void loc_sync_req_init()
|
||||
{
|
||||
UTIL_READ_CONF_DEFAULT(LOC_PATH_GPS_CONF);
|
||||
pthread_mutex_lock(&loc_sync_call_mutex);
|
||||
if(true == loc_sync_call_initialized)
|
||||
{
|
||||
LOC_LOGv("already initialized");
|
||||
pthread_mutex_unlock(&loc_sync_call_mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
loc_sync_array.in_use = false;
|
||||
|
||||
memset(loc_sync_array.slot_in_use, 0, sizeof(loc_sync_array.slot_in_use));
|
||||
|
||||
int i;
|
||||
for (i = 0; i < LOC_SYNC_REQ_BUFFER_SIZE; i++)
|
||||
{
|
||||
loc_sync_req_data_s_type *slot = &loc_sync_array.slots[i];
|
||||
|
||||
pthread_mutex_init(&slot->sync_req_lock, NULL);
|
||||
pthread_condattr_t condAttr;
|
||||
pthread_condattr_init(&condAttr);
|
||||
pthread_condattr_setclock(&condAttr, CLOCK_REALTIME);
|
||||
pthread_cond_init(&slot->ind_arrived_cond, &condAttr);
|
||||
pthread_condattr_destroy(&condAttr);
|
||||
|
||||
slot->client_handle = LOC_CLIENT_INVALID_HANDLE_VALUE;
|
||||
slot->ind_is_selected = false; /* is ind selected? */
|
||||
slot->ind_is_waiting = false; /* is waiting? */
|
||||
slot->ind_has_arrived = false; /* callback has arrived */
|
||||
slot->recv_ind_id = 0; /* ind to wait for */
|
||||
slot->recv_ind_payload_ptr = NULL;
|
||||
slot->req_id = 0; /* req id */
|
||||
}
|
||||
|
||||
loc_sync_call_initialized = true;
|
||||
pthread_mutex_unlock(&loc_sync_call_mutex);
|
||||
}
|
||||
|
||||
|
||||
/*===========================================================================
|
||||
|
||||
FUNCTION loc_sync_process_ind
|
||||
|
||||
DESCRIPTION
|
||||
Wakes up blocked API calls to check if the needed callback has arrived
|
||||
|
||||
DEPENDENCIES
|
||||
N/A
|
||||
|
||||
RETURN VALUE
|
||||
none
|
||||
|
||||
SIDE EFFECTS
|
||||
N/A
|
||||
|
||||
===========================================================================*/
|
||||
void loc_sync_process_ind(
|
||||
locClientHandleType client_handle, /* handle of the client */
|
||||
uint32_t ind_id , /* ind id */
|
||||
void *ind_payload_ptr, /* payload */
|
||||
uint32_t ind_payload_size /* payload size */
|
||||
)
|
||||
{
|
||||
LOC_LOGv("received indication, handle = %p ind_id = %u",
|
||||
client_handle, ind_id);
|
||||
|
||||
pthread_mutex_lock(&loc_sync_call_mutex);
|
||||
|
||||
if (!loc_sync_array.in_use)
|
||||
{
|
||||
LOC_LOGd("loc_sync_array not in use");
|
||||
pthread_mutex_unlock(&loc_sync_call_mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
bool in_use = false, consumed = false;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < LOC_SYNC_REQ_BUFFER_SIZE && !consumed; i++)
|
||||
{
|
||||
loc_sync_req_data_s_type *slot = &loc_sync_array.slots[i];
|
||||
|
||||
in_use |= loc_sync_array.slot_in_use[i];
|
||||
|
||||
pthread_mutex_lock(&slot->sync_req_lock);
|
||||
|
||||
if ( (loc_sync_array.slot_in_use[i]) && (slot->client_handle == client_handle)
|
||||
&& (ind_id == slot->recv_ind_id) && (!slot->ind_has_arrived))
|
||||
{
|
||||
LOC_LOGv("found slot %d selected for ind %u", i, ind_id);
|
||||
|
||||
if( NULL != slot->recv_ind_payload_ptr &&
|
||||
NULL != ind_payload_ptr && ind_payload_size > 0 )
|
||||
{
|
||||
LOC_LOGv("copying ind payload size = %u", ind_payload_size);
|
||||
|
||||
memcpy(slot->recv_ind_payload_ptr, ind_payload_ptr, ind_payload_size);
|
||||
|
||||
consumed = true;
|
||||
}
|
||||
/* Received a callback while waiting, wake up thread to check it */
|
||||
if (slot->ind_is_waiting)
|
||||
{
|
||||
slot->recv_ind_id = ind_id;
|
||||
|
||||
pthread_cond_signal(&slot->ind_arrived_cond);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If callback arrives before wait, remember it */
|
||||
LOC_LOGv("ind %u arrived before wait was called", ind_id);
|
||||
|
||||
slot->ind_has_arrived = true;
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&slot->sync_req_lock);
|
||||
}
|
||||
|
||||
if (!in_use) {
|
||||
loc_sync_array.in_use = false;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&loc_sync_call_mutex);
|
||||
}
|
||||
|
||||
/*===========================================================================
|
||||
|
||||
FUNCTION loc_alloc_slot
|
||||
|
||||
DESCRIPTION
|
||||
Allocates a buffer slot for the synchronous API call
|
||||
|
||||
DEPENDENCIES
|
||||
N/A
|
||||
|
||||
RETURN VALUE
|
||||
Select ID (>=0) : successful
|
||||
-1 : buffer full
|
||||
|
||||
SIDE EFFECTS
|
||||
N/A
|
||||
|
||||
===========================================================================*/
|
||||
static int loc_alloc_slot()
|
||||
{
|
||||
int i, select_id = -1; /* no free buffer */
|
||||
|
||||
pthread_mutex_lock(&loc_sync_call_mutex);
|
||||
|
||||
for (i = 0; i < LOC_SYNC_REQ_BUFFER_SIZE; i++)
|
||||
{
|
||||
if (!loc_sync_array.slot_in_use[i])
|
||||
{
|
||||
select_id = i;
|
||||
loc_sync_array.slot_in_use[i] = 1;
|
||||
loc_sync_array.in_use = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&loc_sync_call_mutex);
|
||||
LOC_LOGv("returning slot %d", select_id);
|
||||
return select_id;
|
||||
}
|
||||
|
||||
/*===========================================================================
|
||||
|
||||
FUNCTION loc_free_slot
|
||||
|
||||
DESCRIPTION
|
||||
Frees a buffer slot after the synchronous API call
|
||||
|
||||
DEPENDENCIES
|
||||
N/A
|
||||
|
||||
RETURN VALUE
|
||||
None
|
||||
|
||||
SIDE EFFECTS
|
||||
N/A
|
||||
|
||||
===========================================================================*/
|
||||
static void loc_free_slot(int select_id)
|
||||
{
|
||||
int i;
|
||||
loc_sync_req_data_s_type *slot;
|
||||
|
||||
pthread_mutex_lock(&loc_sync_call_mutex);
|
||||
|
||||
loc_sync_array.slot_in_use[select_id] = 0;
|
||||
|
||||
slot = &loc_sync_array.slots[select_id];
|
||||
|
||||
slot->client_handle = LOC_CLIENT_INVALID_HANDLE_VALUE;
|
||||
slot->ind_is_selected = false; /* is ind selected? */
|
||||
slot->ind_is_waiting = false; /* is waiting? */
|
||||
slot->ind_has_arrived = false; /* callback has arrived */
|
||||
slot->recv_ind_id = 0; /* ind to wait for */
|
||||
slot->recv_ind_payload_ptr = NULL;
|
||||
slot->req_id = 0;
|
||||
|
||||
// check if all slots are now free
|
||||
for (i = 0; i < LOC_SYNC_REQ_BUFFER_SIZE; i++)
|
||||
{
|
||||
if (loc_sync_array.slot_in_use[i]) break;
|
||||
}
|
||||
|
||||
if (i >= LOC_SYNC_REQ_BUFFER_SIZE)
|
||||
{
|
||||
loc_sync_array.in_use = false;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&loc_sync_call_mutex);
|
||||
}
|
||||
|
||||
/*===========================================================================
|
||||
|
||||
FUNCTION loc_sync_select_ind
|
||||
|
||||
DESCRIPTION
|
||||
Selects which indication to wait for.
|
||||
|
||||
|
||||
DEPENDENCIES
|
||||
N/A
|
||||
|
||||
RETURN VALUE
|
||||
Select ID (>=0) : successful
|
||||
-ENOMEM : out of buffer
|
||||
|
||||
SIDE EFFECTS
|
||||
N/A
|
||||
|
||||
===========================================================================*/
|
||||
static int loc_sync_select_ind(
|
||||
locClientHandleType client_handle, /* Client handle */
|
||||
uint32_t ind_id, /* ind Id wait for */
|
||||
uint32_t req_id, /* req id */
|
||||
void * ind_payload_ptr /* ptr where payload should be copied to*/
|
||||
)
|
||||
{
|
||||
int select_id = loc_alloc_slot();
|
||||
|
||||
LOC_LOGv("client handle %p, ind_id %u, req_id %u",
|
||||
client_handle, ind_id, req_id);
|
||||
|
||||
if (select_id < 0)
|
||||
{
|
||||
LOC_LOGe("buffer full for this synchronous req %s",
|
||||
loc_get_v02_event_name(req_id));
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
loc_sync_req_data_s_type *slot = &loc_sync_array.slots[select_id];
|
||||
|
||||
pthread_mutex_lock(&slot->sync_req_lock);
|
||||
|
||||
slot->client_handle = client_handle;
|
||||
slot->ind_is_selected = true;
|
||||
slot->ind_is_waiting = false;
|
||||
slot->ind_has_arrived = false;
|
||||
|
||||
slot->recv_ind_id = ind_id;
|
||||
slot->req_id = req_id;
|
||||
slot->recv_ind_payload_ptr = ind_payload_ptr; //store the payload ptr
|
||||
|
||||
pthread_mutex_unlock(&slot->sync_req_lock);
|
||||
|
||||
return select_id;
|
||||
}
|
||||
|
||||
|
||||
/*===========================================================================
|
||||
|
||||
FUNCTION loc_sync_wait_for_ind
|
||||
|
||||
DESCRIPTION
|
||||
Waits for a selected indication. The wait expires in timeout_seconds seconds.
|
||||
If the function is called before an existing wait has finished, it will
|
||||
immediately return error.
|
||||
|
||||
DEPENDENCIES
|
||||
N/A
|
||||
|
||||
RETURN VALUE
|
||||
0 on SUCCESS, -ve value on failure
|
||||
|
||||
SIDE EFFECTS
|
||||
N/A
|
||||
|
||||
===========================================================================*/
|
||||
static int loc_sync_wait_for_ind(
|
||||
int select_id, /* ID from loc_sync_select_ind() */
|
||||
int timeout_seconds, /* Timeout in this number of seconds */
|
||||
uint32_t ind_id
|
||||
)
|
||||
{
|
||||
if (select_id < 0 || select_id >= LOC_SYNC_REQ_BUFFER_SIZE || !loc_sync_array.slot_in_use[select_id])
|
||||
{
|
||||
LOC_LOGe("invalid select_id: %d ", select_id);
|
||||
return (-EINVAL);
|
||||
}
|
||||
|
||||
loc_sync_req_data_s_type *slot = &loc_sync_array.slots[select_id];
|
||||
|
||||
int ret_val = 0; /* the return value of this function: 0 = no error */
|
||||
int rc; /* return code from pthread calls */
|
||||
|
||||
struct timespec expire_time = {};
|
||||
|
||||
pthread_mutex_lock(&slot->sync_req_lock);
|
||||
|
||||
do
|
||||
{
|
||||
if (slot->ind_has_arrived)
|
||||
{
|
||||
ret_val = 0; /* success */
|
||||
break;
|
||||
}
|
||||
|
||||
if (slot->ind_is_waiting)
|
||||
{
|
||||
LOC_LOGw("already waiting in this slot %d", select_id);
|
||||
ret_val = -EBUSY; // busy
|
||||
break;
|
||||
}
|
||||
|
||||
/* Calculate absolute expire time */
|
||||
clock_gettime(CLOCK_REALTIME, &expire_time);
|
||||
expire_time.tv_sec += timeout_seconds;
|
||||
|
||||
/* Take new wait request */
|
||||
slot->ind_is_waiting = true;
|
||||
|
||||
/* Waiting */
|
||||
rc = pthread_cond_timedwait(&slot->ind_arrived_cond,
|
||||
&slot->sync_req_lock, &expire_time);
|
||||
|
||||
slot->ind_is_waiting = false;
|
||||
|
||||
if(rc == ETIMEDOUT)
|
||||
{
|
||||
LOC_LOGe("slot %d, timed out for ind_id %s",
|
||||
select_id, loc_get_v02_event_name(ind_id));
|
||||
ret_val = -ETIMEDOUT; //time out
|
||||
}
|
||||
|
||||
} while (0);
|
||||
|
||||
pthread_mutex_unlock(&slot->sync_req_lock);
|
||||
loc_free_slot(select_id);
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
/*===========================================================================
|
||||
|
||||
FUNCTION loc_sync_send_req
|
||||
|
||||
DESCRIPTION
|
||||
Synchronous req call (thread safe)
|
||||
|
||||
DEPENDENCIES
|
||||
N/A
|
||||
|
||||
RETURN VALUE
|
||||
Loc API 2.0 status
|
||||
|
||||
SIDE EFFECTS
|
||||
N/A
|
||||
|
||||
===========================================================================*/
|
||||
locClientStatusEnumType loc_sync_send_req
|
||||
(
|
||||
locClientHandleType client_handle,
|
||||
uint32_t req_id, /* req id */
|
||||
locClientReqUnionType req_payload,
|
||||
uint32_t timeout_msec,
|
||||
uint32_t ind_id, //ind ID to block for, usually the same as req_id */
|
||||
void *ind_payload_ptr /* can be NULL*/
|
||||
)
|
||||
{
|
||||
locClientStatusEnumType status = eLOC_CLIENT_SUCCESS ;
|
||||
int select_id;
|
||||
int rc = 0;
|
||||
|
||||
// Select the callback we are waiting for
|
||||
select_id = loc_sync_select_ind(client_handle, ind_id, req_id,
|
||||
ind_payload_ptr);
|
||||
|
||||
if (select_id >= 0)
|
||||
{
|
||||
status = locClientSendReq (client_handle, req_id, req_payload);
|
||||
LOC_LOGv("select_id = %d,locClientSendReq returned %d",
|
||||
select_id, status);
|
||||
|
||||
if (status != eLOC_CLIENT_SUCCESS )
|
||||
{
|
||||
loc_free_slot(select_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Wait for the indication callback
|
||||
if (( rc = loc_sync_wait_for_ind( select_id,
|
||||
timeout_msec / 1000,
|
||||
ind_id) ) < 0)
|
||||
{
|
||||
if ( rc == -ETIMEDOUT)
|
||||
status = eLOC_CLIENT_FAILURE_TIMEOUT;
|
||||
else
|
||||
status = eLOC_CLIENT_FAILURE_INTERNAL;
|
||||
|
||||
// Callback waiting failed
|
||||
LOC_LOGe("loc_api_wait_for_ind failed, err %d, select id %d, status %s",
|
||||
rc, select_id, loc_get_v02_client_status_name(status));
|
||||
}
|
||||
else
|
||||
{
|
||||
status = eLOC_CLIENT_SUCCESS;
|
||||
LOC_LOGv("success (select id %d)", select_id);
|
||||
}
|
||||
}
|
||||
} /* select id */
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,70 @@
|
||||
/* Copyright (c) 2011,2013,2016, 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_SYNC_REQ_H
|
||||
#define LOC_SYNC_REQ_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "loc_api_v02_client.h"
|
||||
|
||||
#define LOC_ENGINE_SYNC_REQUEST_TIMEOUT (1000) // 1 second
|
||||
#define LOC_ENGINE_SYNC_REQUEST_LONG_TIMEOUT (5000) // 5 seconds
|
||||
|
||||
/* Init function */
|
||||
extern void loc_sync_req_init();
|
||||
|
||||
|
||||
/* Process Loc API indications to wake up blocked user threads */
|
||||
extern void loc_sync_process_ind(
|
||||
locClientHandleType client_handle, /* handle of the client */
|
||||
uint32_t ind_id , /* respInd id */
|
||||
void *ind_payload_ptr, /* payload */
|
||||
uint32_t ind_payload_size /* payload size */
|
||||
);
|
||||
|
||||
/* Thread safe synchronous request, using Loc API status return code */
|
||||
extern locClientStatusEnumType loc_sync_send_req
|
||||
(
|
||||
locClientHandleType client_handle,
|
||||
uint32_t req_id, /* req id */
|
||||
locClientReqUnionType req_payload,
|
||||
uint32_t timeout_msec,
|
||||
uint32_t ind_id, //ind ID to block for, usually the same as req_id */
|
||||
void *ind_payload_ptr /* can be NULL*/
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LOC_SYNC_REQ_H */
|
2643
qcom/opensource/location/loc_api/loc_api_v02/loc_api_v02_client.cpp
Normal file
2643
qcom/opensource/location/loc_api/loc_api_v02/loc_api_v02_client.cpp
Normal file
File diff suppressed because it is too large
Load Diff
2035
qcom/opensource/location/loc_api/loc_api_v02/loc_api_v02_client.h
Normal file
2035
qcom/opensource/location/loc_api/loc_api_v02/loc_api_v02_client.h
Normal file
File diff suppressed because it is too large
Load Diff
365
qcom/opensource/location/loc_api/loc_api_v02/loc_api_v02_log.cpp
Normal file
365
qcom/opensource/location/loc_api/loc_api_v02/loc_api_v02_log.cpp
Normal file
@@ -0,0 +1,365 @@
|
||||
/* Copyright (c) 2011-2015, 2018-2021 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
Changes from Qualcomm Innovation Center are provided under the following license:
|
||||
|
||||
Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted (subject to the limitations in the
|
||||
disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
|
||||
GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
|
||||
HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
|
||||
*/
|
||||
|
||||
#include <loc_api_v02_log.h>
|
||||
#include <location_service_v02.h>
|
||||
|
||||
DECLARE_TBL(loc_v02_event_name) =
|
||||
{
|
||||
NAME_VAL(QMI_LOC_GET_SUPPORTED_MSGS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_SUPPORTED_FIELDS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INFORM_CLIENT_REVISION_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_REG_EVENTS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_START_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_STOP_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_POSITION_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_GNSS_SV_INFO_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_NI_NOTIFY_VERIFY_REQ_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_INJECT_TIME_REQ_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_INJECT_PREDICTED_ORBITS_REQ_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_INJECT_POSITION_REQ_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_ENGINE_STATE_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_FIX_SESSION_STATE_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_WIFI_REQ_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_SENSOR_STREAMING_READY_STATUS_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_TIME_SYNC_REQ_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_SET_SPI_STREAMING_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_LOCATION_SERVER_CONNECTION_REQ_IND_V02),
|
||||
NAME_VAL(QMI_LOC_GET_SERVICE_REVISION_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_FIX_CRITERIA_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_NI_USER_RESPONSE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_PREDICTED_ORBITS_DATA_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_PREDICTED_ORBITS_DATA_VALIDITY_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_UTC_TIME_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_POSITION_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_ENGINE_LOCK_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_ENGINE_LOCK_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_SBAS_CONFIG_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_SBAS_CONFIG_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_LOW_POWER_MODE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_LOW_POWER_MODE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_REGISTER_MASTER_CLIENT_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_SERVER_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_SERVER_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_DELETE_ASSIST_DATA_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_XTRA_T_SESSION_CONTROL_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_XTRA_T_SESSION_CONTROL_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_WIFI_POSITION_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_NOTIFY_WIFI_STATUS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_REGISTERED_EVENTS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_OPERATION_MODE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_OPERATION_MODE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_SPI_STATUS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_SENSOR_DATA_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_TIME_SYNC_DATA_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_CRADLE_MOUNT_CONFIG_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_CRADLE_MOUNT_CONFIG_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_EXTERNAL_POWER_CONFIG_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_EXTERNAL_POWER_CONFIG_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INFORM_LOCATION_SERVER_CONN_STATUS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_PROTOCOL_CONFIG_PARAMETERS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_SENSOR_CONTROL_CONFIG_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_SENSOR_CONTROL_CONFIG_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_SENSOR_PROPERTIES_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_SENSOR_PROPERTIES_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_SENSOR_PERFORMANCE_CONTROL_CONFIGURATION_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_SUPL_CERTIFICATE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_DELETE_SUPL_CERTIFICATE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_POSITION_ENGINE_CONFIG_PARAMETERS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_NI_GEOFENCE_NOTIFICATION_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_GEOFENCE_GEN_ALERT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_GEOFENCE_BREACH_NOTIFICATION_IND_V02),
|
||||
NAME_VAL(QMI_LOC_ADD_CIRCULAR_GEOFENCE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_DELETE_GEOFENCE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_QUERY_GEOFENCE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EDIT_GEOFENCE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_BEST_AVAILABLE_POSITION_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_MOTION_DATA_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_NI_GEOFENCE_ID_LIST_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_GSM_CELL_INFO_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_NETWORK_INITIATED_MESSAGE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_WWAN_OUT_OF_SERVICE_NOTIFICATION_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_PEDOMETER_CONTROL_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_MOTION_DATA_CONTROL_IND_V02),
|
||||
NAME_VAL(QMI_LOC_PEDOMETER_REPORT_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_WCDMA_CELL_INFO_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_TDSCDMA_CELL_INFO_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_SUBSCRIBER_ID_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_GEOFENCE_ENGINE_CONFIG_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_GEOFENCE_ENGINE_CONFIG_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_BATCH_SIZE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_START_BATCHING_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_BATCH_FULL_NOTIFICATION_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_LIVE_BATCHED_POSITION_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_READ_FROM_BATCH_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_STOP_BATCHING_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_RELEASE_BATCH_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_INJECT_WIFI_AP_DATA_REQ_IND_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_WIFI_AP_DATA_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_NOTIFY_WIFI_ATTACHMENT_STATUS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_NOTIFY_WIFI_ENABLED_STATUS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_GEOFENCE_BATCHED_BREACH_NOTIFICATION_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_VEHICLE_DATA_READY_STATUS_IND_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_VEHICLE_SENSOR_DATA_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_AVAILABLE_WWAN_POSITION_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_PREMIUM_SERVICES_CONFIG_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_XTRA_VERSION_CHECK_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_GNSS_MEASUREMENT_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_SV_POLYNOMIAL_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_SET_GNSS_CONSTELL_REPORT_CONFIG_V02),
|
||||
NAME_VAL(QMI_LOC_ADD_GEOFENCE_CONTEXT_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_GEOFENCE_ENGINE_CONTEXT_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_DELETE_GEOFENCE_CONTEXT_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_GEOFENCE_PROXIMITY_NOTIFICATION_IND_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_GTP_CLIENT_DOWNLOADED_DATA_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GDT_UPLOAD_BEGIN_STATUS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GDT_UPLOAD_END_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_GDT_UPLOAD_BEGIN_STATUS_REQ_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_GDT_UPLOAD_END_REQ_IND_V02),
|
||||
NAME_VAL(QMI_LOC_START_DBT_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_DBT_POSITION_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_DBT_SESSION_STATUS_IND_V02),
|
||||
NAME_VAL(QMI_LOC_STOP_DBT_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SECURE_GET_AVAILABLE_POSITION_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_GEOFENCE_BATCHED_DWELL_NOTIFICATION_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_GET_TIME_ZONE_INFO_IND_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_TIME_ZONE_INFO_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_APCACHE_DATA_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_APDONOTCACHE_DATA_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_BATCHING_STATUS_IND_V02),
|
||||
NAME_VAL(QMI_LOC_QUERY_AON_CONFIG_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GTP_AP_STATUS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GDT_DOWNLOAD_BEGIN_STATUS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GDT_DOWNLOAD_READY_STATUS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GDT_RECEIVE_DONE_STATUS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GDT_DOWNLOAD_END_STATUS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_GDT_DOWNLOAD_BEGIN_REQ_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_GDT_RECEIVE_DONE_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_GDT_DOWNLOAD_END_REQ_IND_V02),
|
||||
NAME_VAL(QMI_LOC_DELETE_GNSS_SERVICE_DATA_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_XTRA_DATA_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_XTRA_PCID_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_SUPPORTED_FEATURE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_INTERNAL_STATUS_CONFIG_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_INTERNAL_STATUS_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_INJECT_SRN_AP_DATA_REQ_IND_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_SRN_AP_DATA_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_CROWDSOURCE_MANAGER_CONTROL_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_CROWDSOURCE_MANAGER_READ_DATA_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_QUERY_XTRA_INFO_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_START_OUTDOOR_TRIP_BATCHING_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_QUERY_OTB_ACCUMULATED_DISTANCE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_FDCL_BS_LIST_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_FDCL_DATA_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_FDCL_SERVICE_REQ_IND_V02),
|
||||
NAME_VAL(QMI_LOC_SET_BLACKLIST_SV_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_BLACKLIST_SV_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_CONSTELLATION_CONTROL_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_UNPROPAGATED_POSITION_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_GET_BS_OBS_DATA_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_CONSTELLATION_CONTROL_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_BS_OBS_DATA_SERVICE_REQ_IND_V02),
|
||||
NAME_VAL(QMI_LOC_SET_CONSTRAINED_TUNC_MODE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_ENABLE_POSITION_ASSISTED_CLOCK_EST_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_QUERY_GNSS_ENERGY_CONSUMED_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_GPS_EPHEMERIS_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_GLONASS_EPHEMERIS_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_BDS_EPHEMERIS_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_GALILEO_EPHEMERIS_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_QZSS_EPHEMERIS_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_SYSTEM_INFO_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_CONSTELLATION_CONTROL_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_UNPROPAGATED_POSITION_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_ENABLE_POSITION_INJECTION_TEST_MODE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_TEST_POSITION_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_BS_OBS_DATA_SERVICE_REQ_IND_V02),
|
||||
NAME_VAL(QMI_LOC_GET_BS_OBS_DATA_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_GPS_EPHEMERIS_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_GLONASS_EPHEMERIS_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_BDS_EPHEMERIS_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_GALILEO_EPHEMERIS_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_QZSS_EPHEMERIS_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_SET_CONSTRAINED_TUNC_MODE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_ENABLE_POSITION_ASSISTED_CLOCK_EST_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_QUERY_GNSS_ENERGY_CONSUMED_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_GET_BAND_MEASUREMENT_METRICS_IND_V02),
|
||||
NAME_VAL(QMI_LOC_LOCATION_REQUEST_NOTIFICATION_IND_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_PLATFORM_POWER_STATE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_PLATFORM_POWER_STATE_RESP_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_PLATFORM_POWER_STATE_IND_V02),
|
||||
NAME_VAL(QMI_LOC_SET_ROBUST_LOCATION_CONFIG_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_ROBUST_LOCATION_CONFIG_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_MIN_GPS_WEEK_NUMBER_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_MIN_GPS_WEEK_NUMBER_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_QUERY_XTRA_INFO_REQ_IND_V02),
|
||||
NAME_VAL(QMI_LOC_SET_PARAMETER_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_PARAMETER_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_MULTIBAND_CONFIG_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_MULTIBAND_CONFIG_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_LATENCY_INFORMATION_IND_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_LOCATION_CIVIC_ADDRESS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_LOCATION_CIVIC_ADDRESS_RESP_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_LOCATION_CIVIC_ADDRESS_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_PLATFORM_POWER_STATE_CHANGED_IND_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_RAW_DATA_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_RAW_DATA_RESP_V02),
|
||||
NAME_VAL(QMI_LOC_INJECT_RAW_DATA_IND_V02),
|
||||
NAME_VAL(QMI_LOC_ENGINE_DEBUG_DATA_IND_V02),
|
||||
NAME_VAL(QMI_LOC_DC_REPORT_IND_V02),
|
||||
NAME_VAL(QMI_LOC_EVENT_ENGINE_LOCK_STATE_IND_V02),
|
||||
NAME_VAL(QMI_LOC_SET_TRIBAND_STATE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_TRIBAND_STATE_RESP_V02),
|
||||
NAME_VAL(QMI_LOC_SET_TRIBAND_STATE_IND_V02),
|
||||
NAME_VAL(QMI_LOC_GET_TRIBAND_STATE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_TRIBAND_STATE_RESP_V02),
|
||||
NAME_VAL(QMI_LOC_GET_TRIBAND_STATE_IND_V02),
|
||||
NAME_VAL(QMI_LOC_SET_SDK_FEATURE_CONFIG_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_SDK_FEATURE_CONFIG_RESP_V02),
|
||||
NAME_VAL(QMI_LOC_SET_SDK_FEATURE_CONFIG_IND_V02),
|
||||
NAME_VAL(QMI_LOC_GNSS_BANDS_SUPPORTED_IND_V02),
|
||||
NAME_VAL(QMI_LOC_OSNMA_PUBLIC_KEY_MERKLE_TREE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_OSNMA_PUBLIC_KEY_MERKLE_TREE_RESP_V02),
|
||||
NAME_VAL(QMI_LOC_OSNMA_PUBLIC_KEY_MERKLE_TREE_IND_V02),
|
||||
NAME_VAL(QMI_LOC_SET_OSNMA_STATE_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_OSNMA_STATE_RESP_V02),
|
||||
NAME_VAL(QMI_LOC_SET_OSNMA_STATE_IND_V02),
|
||||
NAME_VAL(QMI_LOC_SET_NTN_STATUS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_SET_NTN_STATUS_RESP_V02),
|
||||
NAME_VAL(QMI_LOC_SET_NTN_STATUS_IND_V02),
|
||||
NAME_VAL(QMI_LOC_GET_NTN_STATUS_REQ_V02),
|
||||
NAME_VAL(QMI_LOC_GET_NTN_STATUS_RESP_V02),
|
||||
NAME_VAL(QMI_LOC_GET_NTN_STATUS_IND_V02),
|
||||
};
|
||||
|
||||
const char* loc_get_v02_event_name(uint32_t event)
|
||||
{
|
||||
return loc_get_name_from_val(loc_v02_event_name_tbl, (int64_t) event);
|
||||
}
|
||||
|
||||
DECLARE_TBL(loc_v02_client_status_name) =
|
||||
{
|
||||
NAME_VAL(eLOC_CLIENT_SUCCESS),
|
||||
NAME_VAL(eLOC_CLIENT_FAILURE_GENERAL),
|
||||
NAME_VAL(eLOC_CLIENT_FAILURE_UNSUPPORTED),
|
||||
NAME_VAL(eLOC_CLIENT_FAILURE_INVALID_PARAMETER),
|
||||
NAME_VAL(eLOC_CLIENT_FAILURE_ENGINE_BUSY),
|
||||
NAME_VAL(eLOC_CLIENT_FAILURE_PHONE_OFFLINE),
|
||||
NAME_VAL(eLOC_CLIENT_FAILURE_TIMEOUT),
|
||||
NAME_VAL(eLOC_CLIENT_FAILURE_SERVICE_NOT_PRESENT),
|
||||
NAME_VAL(eLOC_CLIENT_FAILURE_SERVICE_VERSION_UNSUPPORTED),
|
||||
NAME_VAL(eLOC_CLIENT_FAILURE_CLIENT_VERSION_UNSUPPORTED),
|
||||
NAME_VAL(eLOC_CLIENT_FAILURE_INVALID_HANDLE),
|
||||
NAME_VAL(eLOC_CLIENT_FAILURE_INTERNAL),
|
||||
NAME_VAL(eLOC_CLIENT_FAILURE_NOT_INITIALIZED),
|
||||
NAME_VAL(eLOC_CLIENT_FAILURE_NOT_ENOUGH_MEMORY),
|
||||
NAME_VAL(eLOC_CLIENT_FAILURE_INVALID_MESSAGE_ID),
|
||||
};
|
||||
|
||||
const char* loc_get_v02_client_status_name(locClientStatusEnumType status)
|
||||
{
|
||||
return loc_get_name_from_val(loc_v02_client_status_name_tbl, (int64_t) status);
|
||||
}
|
||||
|
||||
|
||||
DECLARE_TBL(loc_v02_qmi_status_name) =
|
||||
{
|
||||
NAME_VAL(eQMI_LOC_SUCCESS_V02),
|
||||
NAME_VAL(eQMI_LOC_GENERAL_FAILURE_V02),
|
||||
NAME_VAL(eQMI_LOC_UNSUPPORTED_V02),
|
||||
NAME_VAL(eQMI_LOC_INVALID_PARAMETER_V02),
|
||||
NAME_VAL(eQMI_LOC_ENGINE_BUSY_V02),
|
||||
NAME_VAL(eQMI_LOC_PHONE_OFFLINE_V02),
|
||||
NAME_VAL(eQMI_LOC_TIMEOUT_V02),
|
||||
NAME_VAL(eQMI_LOC_CONFIG_NOT_SUPPORTED_V02),
|
||||
NAME_VAL(eQMI_LOC_INSUFFICIENT_MEMORY_V02),
|
||||
NAME_VAL(eQMI_LOC_MAX_GEOFENCE_PROGRAMMED_V02),
|
||||
NAME_VAL(eQMI_LOC_XTRA_VERSION_CHECK_FAILURE_V02),
|
||||
NAME_VAL(eQMI_LOC_GNSS_DISABLED_V02),
|
||||
};
|
||||
|
||||
const char* loc_get_v02_qmi_status_name(qmiLocStatusEnumT_v02 status)
|
||||
{
|
||||
return loc_get_name_from_val(loc_v02_qmi_status_name_tbl, (int64_t) status);
|
||||
}
|
||||
|
||||
|
||||
DECLARE_TBL(loc_v02_qmi_reg_mk_status_name) =
|
||||
{
|
||||
NAME_VAL(eQMI_LOC_REGISTER_MASTER_CLIENT_SUCCESS_V02),
|
||||
NAME_VAL(eQMI_LOC_REGISTER_MASTER_CLIENT_INVALID_KEY_V02),
|
||||
NAME_VAL(eQMI_LOC_REGISTER_MASTER_CLIENT_ALREADY_HAVE_MASTER_CLIENT_V02),
|
||||
NAME_VAL(eQMI_LOC_REGISTER_MASTER_CLIENT_INTERNAL_FAILURE_V02),
|
||||
};
|
||||
|
||||
const char* loc_get_v02_qmi_reg_mk_status_name(qmiLocRegisterMasterClientStatusEnumT_v02 status)
|
||||
{
|
||||
return loc_get_name_from_val(loc_v02_qmi_reg_mk_status_name_tbl, (int64_t)status);
|
||||
}
|
@@ -0,0 +1,51 @@
|
||||
/* Copyright (c) 2011, 2018 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_API_V02_LOG_H
|
||||
#define LOC_API_V02_LOG_H
|
||||
|
||||
#include <loc_log.h>
|
||||
#include <loc_api_v02_client.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
const char* loc_get_v02_event_name(uint32_t event);
|
||||
const char* loc_get_v02_client_status_name(locClientStatusEnumType status);
|
||||
const char* loc_get_v02_qmi_status_name(qmiLocStatusEnumT_v02 status);
|
||||
const char* loc_get_v02_qmi_reg_mk_status_name(qmiLocRegisterMasterClientStatusEnumT_v02 status);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LOC_API_V02_LOG_H */
|
78
qcom/opensource/location/loc_api/loc_api_v02/loc_util_log.h
Normal file
78
qcom/opensource/location/loc_api/loc_api_v02/loc_util_log.h
Normal file
@@ -0,0 +1,78 @@
|
||||
/* Copyright (c) 2011-2012, 2014, 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_UTIL_LOG_H
|
||||
#define LOC_UTIL_LOG_H
|
||||
|
||||
#include <log_util.h>
|
||||
|
||||
#if defined(_ANDROID_)
|
||||
#include "loc_api_v02_log.h"
|
||||
|
||||
#else // no _ANDROID_
|
||||
|
||||
#if defined(__LOC_API_V02_LOG_SILENT__)
|
||||
#define MSG_LOG
|
||||
#define LOC_LOGE(...) MSG_LOG(__VA_ARGS__);
|
||||
#define LOC_LOGW(...) MSG_LOG(__VA_ARGS__);
|
||||
#define LOC_LOGD(...) MSG_LOG(__VA_ARGS__);
|
||||
#define LOC_LOGI(...) MSG_LOG(__VA_ARGS__);
|
||||
#define LOC_LOGV(...) MSG_LOG(__VA_ARGS__);
|
||||
#elif !defined(USE_GLIB)
|
||||
|
||||
// common for QNX and Griffon
|
||||
|
||||
//error logs
|
||||
#define LOC_LOGE(...) printf(__VA_ARGS__)
|
||||
//warning logs
|
||||
#define LOC_LOGW(...) printf(__VA_ARGS__)
|
||||
// debug logs
|
||||
#define LOC_LOGD(...) printf(__VA_ARGS__)
|
||||
//info logs
|
||||
#define LOC_LOGI(...) printf(__VA_ARGS__)
|
||||
//verbose logs
|
||||
#define LOC_LOGV(...) printf(__VA_ARGS__)
|
||||
#endif //__LOC_API_V02_LOG_SILENT__
|
||||
|
||||
//specific to OFF TARGET
|
||||
#ifdef LOC_UTIL_TARGET_OFF_TARGET
|
||||
|
||||
# include <stdio.h>
|
||||
# include <asm/errno.h>
|
||||
# include <sys/time.h>
|
||||
|
||||
// get around strl*: not found in glibc
|
||||
// TBD:look for presence of eglibc other libraries
|
||||
// with strlcpy supported.
|
||||
#define strlcpy(X,Y,Z) strcpy(X,Y)
|
||||
#define strlcat(X,Y,Z) strcat(X,Y)
|
||||
|
||||
#endif //LOC_UTIL_TARGET_OFF_TARGET
|
||||
|
||||
#endif //_ANDROID_
|
||||
|
||||
#endif //LOC_UTIL_LOG_H
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user