summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorasanoaozora <fifitaneki@hotmail.com>2017-06-01 15:33:40 +0200
committerasanoaozora <fifitaneki@hotmail.com>2017-06-01 15:33:40 +0200
commit4d4b8c024f5983a0fd72ddf496b38ef4848f4404 (patch)
tree148f5b2da4e0fb9cda495b3623628efeafb39243 /src
parentd74c02eaf2edf2a9911e641ab39b57f196c11fdc (diff)
downloadpoi-service-4d4b8c024f5983a0fd72ddf496b38ef4848f4404.tar.gz
GT-3509
wrong naming for some signals in Franca (begin with upper case rather than lower case)
Diffstat (limited to 'src')
-rw-r--r--src/navigation/CMakeLists.txt8
-rwxr-xr-xsrc/navigation/build.sh27
-rw-r--r--src/navigation/map-viewer/configuration-server-plugin/CMakeLists.txt1
-rw-r--r--src/navigation/map-viewer/mapviewercontrol-server-plugin/CMakeLists.txt1
-rw-r--r--src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx50
-rw-r--r--src/navigation/map-viewer/session-server-plugin/CMakeLists.txt1
-rw-r--r--src/navigation/navigation-core/configuration-server-plugin/CMakeLists.txt1
-rw-r--r--src/navigation/navigation-core/enhancedposition-client-plugin/CMakeLists.txt1
-rw-r--r--src/navigation/navigation-core/guidance-server-plugin/CMakeLists.txt1
-rw-r--r--src/navigation/navigation-core/locationinput-server-plugin/CMakeLists.txt3
-rw-r--r--src/navigation/navigation-core/mapmatchedposition-server-plugin/CMakeLists.txt1
-rw-r--r--src/navigation/navigation-core/poicam-server-plugin/CMakeLists.txt1
-rw-r--r--src/navigation/navigation-core/routing-server-plugin/CMakeLists.txt1
-rw-r--r--src/navigation/navigation-core/session-server-plugin/CMakeLists.txt1
-rw-r--r--src/poi-service/poi-manager-server/poi-manager-server-stub.cpp4
15 files changed, 64 insertions, 38 deletions
diff --git a/src/navigation/CMakeLists.txt b/src/navigation/CMakeLists.txt
index 3a8f9ea..547f879 100644
--- a/src/navigation/CMakeLists.txt
+++ b/src/navigation/CMakeLists.txt
@@ -18,6 +18,7 @@
project(navigation)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
+find_package(PkgConfig)
option(WITH_DBUS_INTERFACE
"Build using the D-Bus interfaces" ON)
@@ -142,6 +143,13 @@ else()
add_subdirectory(${API_DIR}/poi-service "${DBUS_GENERATED_INCLUDE_DIR}/poi-service")
endif()
+if(${WITH_DLT})
+ add_definitions("-DDLT_ENABLED=1")
+ pkg_check_modules(DLT REQUIRED automotive-dlt)
+ include_directories( ${DLT_INCLUDE_DIRS} )
+ set(LIBRARIES ${LIBRARIES} ${DLT_LIBRARIES})
+endif()
+
add_subdirectory(navigation-core)
add_subdirectory(map-viewer)
diff --git a/src/navigation/build.sh b/src/navigation/build.sh
index 5ff7bf1..23d5ec5 100755
--- a/src/navigation/build.sh
+++ b/src/navigation/build.sh
@@ -3,7 +3,8 @@
clean=0
capi=0
navit=0
-commonapi_tools_option=""
+dlt_option="-DWITH_DLT=OFF"
+commonapi_tools_option="-DWITH_PLUGIN_MIGRATION=OFF"
function check_path_for_capi
{
@@ -28,15 +29,18 @@ function check_path_for_capi
echo 'export DBUS_LIB_PATH=<path>'
exit 1
fi
- commonapi_tools_option="-DDBUS_LIB_PATH="$DBUS_LIB_PATH" -DCOMMONAPI_DBUS_TOOL_DIR="$COMMONAPI_DBUS_TOOL_DIR" -DCOMMONAPI_TOOL_DIR="$COMMONAPI_TOOL_DIR
+ commonapi_tools_option="-DWITH_PLUGIN_MIGRATION=ON -DWITH_DBUS_INTERFACE=OFF -DDBUS_LIB_PATH="$DBUS_LIB_PATH" -DCOMMONAPI_DBUS_TOOL_DIR="$COMMONAPI_DBUS_TOOL_DIR" -DCOMMONAPI_TOOL_DIR="$COMMONAPI_TOOL_DIR
}
-while getopts cmn opt
+while getopts cdmn opt
do
case $opt in
c)
clean=1
;;
+ d)
+ dlt_option="-DWITH_DLT=ON"
+ ;;
m)
capi=1
;;
@@ -45,10 +49,11 @@ do
;;
\?)
echo "Usage:"
- echo "$0 [-cmn]"
+ echo "$0 [-cdmn]"
echo "-c: build with clean"
- echo "-m: build with commonAPI plugins "
- echo "-n: Build navit"
+ echo "-d: build with dlt (only with -c)"
+ echo "-m: build with commonAPI plugins (only with -c) "
+ echo "-n: build navit"
exit 1
esac
done
@@ -100,15 +105,7 @@ cd ../
echo 'build navigation'
if [ "$clean" = 1 ]
then
- if [ "$capi" = 0 ]
- then
- cmake -DWITH_PLUGIN_MIGRATION=OFF ../
- else
- cmake -DWITH_PLUGIN_MIGRATION=ON -DWITH_DBUS_INTERFACE=OFF $commonapi_tools_option ../
- echo 'fix a bug in the generation of CommonAPI hpp'
- sed -i -e 's/(const TimeStampedEnum::/(const ::v4::org::genivi::navigation::navigationcore::NavigationCoreTypes::TimeStampedEnum::/' ./franca/src-gen/v4/org/genivi/navigation/navigationcore/LocationInput.hpp
- sed -i -e 's/(const TimeStampedEnum::/(const ::v4::org::genivi::navigation::navigationcore::NavigationCoreTypes::TimeStampedEnum::/' ./franca/src-gen/v4/org/genivi/navigation/navigationcore/MapMatchedPosition.hpp
- fi
+ cmake $dlt_option $commonapi_tools_option ../
echo 'replace a missing font in the configuration file of navit instances'
sed -i -e 's/Liberation Sans/TakaoPGothic/' ./navit/navit/navit_genivi_mapviewer.xml
sed -i -e 's/Liberation Sans/TakaoPGothic/' ./navit/navit/navit_genivi_navigationcore.xml
diff --git a/src/navigation/map-viewer/configuration-server-plugin/CMakeLists.txt b/src/navigation/map-viewer/configuration-server-plugin/CMakeLists.txt
index 3e31d54..8986abe 100644
--- a/src/navigation/map-viewer/configuration-server-plugin/CMakeLists.txt
+++ b/src/navigation/map-viewer/configuration-server-plugin/CMakeLists.txt
@@ -72,6 +72,7 @@ link_directories(
)
set(LIBRARIES
+ ${LIBRARIES}
${DBUS_LIBRARIES}
${COMMONAPI_LIBRARIES}
${COMMONAPI_DBUS_LIBRARIES}
diff --git a/src/navigation/map-viewer/mapviewercontrol-server-plugin/CMakeLists.txt b/src/navigation/map-viewer/mapviewercontrol-server-plugin/CMakeLists.txt
index 7bc22c8..acaca40 100644
--- a/src/navigation/map-viewer/mapviewercontrol-server-plugin/CMakeLists.txt
+++ b/src/navigation/map-viewer/mapviewercontrol-server-plugin/CMakeLists.txt
@@ -82,6 +82,7 @@ link_directories(
)
set(LIBRARIES
+ ${LIBRARIES}
${DBUS_LIBRARIES}
${COMMONAPI_LIBRARIES}
${COMMONAPI_DBUS_LIBRARIES}
diff --git a/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx b/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx
index c818db1..bbacb2d 100644
--- a/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx
+++ b/src/navigation/map-viewer/mapviewercontrol-server-plugin/genivi_mapviewer_mapviewercontrol.cxx
@@ -65,6 +65,10 @@
#include <RoutingProxy.hpp>
#include <navigationcore/SessionProxy.hpp>
+#include "log.h"
+
+DLT_DECLARE_CONTEXT(gCtx);
+
#if (!DEBUG_ENABLED)
#undef dbg
#define dbg(level,...) ;
@@ -1195,13 +1199,11 @@ MapViewerControlObj::SetMapViewScale(NavigationTypes::Handle SessionHandle, uint
void
MapViewerControlObj::SetMapViewScaleByDelta(NavigationTypes::Handle SessionHandle, int16_t ScaleDelta)
{
- if (!ScaleDelta)
- throw DBus::ErrorInvalidArgs("ScaleDelta must not be 0");
- else {
- if (ScaleDelta < 0)
- navit_zoom_out(m_navit.u.navit,1 << (-ScaleDelta),NULL);
- else navit_zoom_in(m_navit.u.navit,1 << ScaleDelta,NULL);
- }
+ LOG_INFO(gCtx,"Delta=%d",ScaleDelta);
+ if (ScaleDelta < 0)
+ navit_zoom_in(m_navit.u.navit,1 << (-ScaleDelta),NULL);
+ else if (ScaleDelta > 0)
+ navit_zoom_out(m_navit.u.navit,1 << ScaleDelta,NULL);
}
void
@@ -1209,21 +1211,18 @@ MapViewerControlObj::GetMapViewScale(uint8_t& ScaleID, MapViewerControl::MapScal
{
struct transformation *trans=navit_get_trans(m_navit.u.navit);
long scale=transform_get_scale(trans);
- if (scale >= 2097152)
- IsMinMax=MapViewerControl::MapScaleType::MAX;
- else {
- if (scale <= 1) {
- IsMinMax=MapViewerControl::MapScaleType::MIN;
- } else {
+ if (scale <= 1)
+ IsMinMax=MapViewerControl::MapScaleType::MIN;
+ else
+ if (scale >= 2097152)
+ IsMinMax=MapViewerControl::MapScaleType::MAX;
+ else
IsMinMax=MapViewerControl::MapScaleType::MID;
- ScaleID=0;
- while (scale > 1) { //strange code here, to be investigated ?
- scale >>=1;
- ScaleID++;
- }
- }
+ ScaleID=0;
+ while (scale > 1) {
+ scale >>=1;
+ ScaleID++;
}
-
}
void
@@ -1973,6 +1972,9 @@ DisplayedRoute::~DisplayedRoute()
void
plugin_init(void)
{
+ DLT_REGISTER_APP("MPVS","MAP VIEWER CONTROL SERVER");
+ DLT_REGISTER_CONTEXT(gCtx,"MPVS","Global Context");
+
dbg(lvl_debug,"enter\n");
event_request_system("glib","genivi_mapviewercontrol");
@@ -1991,20 +1993,28 @@ plugin_init(void)
successfullyRegistered = runtime->registerService(domain, instanceMapViewerControl, myServiceMapViewerControl);
}
+ LOG_INFO_MSG(gCtx,"map viewer control server");
+
//init the session client
const std::string instanceNavigationCoreSession = "Session";
mp_navigationCoreSessionClientProxy = new NavigationCoreSessionClientProxy(domain,instanceNavigationCoreSession);
+ LOG_INFO_MSG(gCtx,"session client");
+
//init the routing client
const std::string instanceRouting = "Routing";
mp_routingClientProxy = new RoutingClientProxy(domain,instanceRouting);
mp_routingClientProxy->setListeners();
+ LOG_INFO_MSG(gCtx,"routing client");
+
// init the map matched position client
const std::string instanceMapMatchedPosition = "MapMatchedPosition";
mp_mapMatchedPositionClientProxy = new MapMatchedPositionClientProxy(domain,instanceMapMatchedPosition);
mp_mapMatchedPositionClientProxy->setListeners();
+ LOG_INFO_MSG(gCtx,"map matched position client");
+
#if LM
if (ilm_init() != ILM_SUCCESS) {
fprintf(stderr,"error on ilm_init\n");
diff --git a/src/navigation/map-viewer/session-server-plugin/CMakeLists.txt b/src/navigation/map-viewer/session-server-plugin/CMakeLists.txt
index df45597..c122f14 100644
--- a/src/navigation/map-viewer/session-server-plugin/CMakeLists.txt
+++ b/src/navigation/map-viewer/session-server-plugin/CMakeLists.txt
@@ -73,6 +73,7 @@ link_directories(
)
set(LIBRARIES
+ ${LIBRARIES}
${DBUS_LIBRARIES}
${COMMONAPI_LIBRARIES}
${COMMONAPI_DBUS_LIBRARIES}
diff --git a/src/navigation/navigation-core/configuration-server-plugin/CMakeLists.txt b/src/navigation/navigation-core/configuration-server-plugin/CMakeLists.txt
index 4e35c17..aa16aac 100644
--- a/src/navigation/navigation-core/configuration-server-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/configuration-server-plugin/CMakeLists.txt
@@ -72,6 +72,7 @@ link_directories(
)
set(LIBRARIES
+ ${LIBRARIES}
${DBUS_LIBRARIES}
${COMMONAPI_LIBRARIES}
${COMMONAPI_DBUS_LIBRARIES}
diff --git a/src/navigation/navigation-core/enhancedposition-client-plugin/CMakeLists.txt b/src/navigation/navigation-core/enhancedposition-client-plugin/CMakeLists.txt
index 4f00710..cdcfb61 100644
--- a/src/navigation/navigation-core/enhancedposition-client-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/enhancedposition-client-plugin/CMakeLists.txt
@@ -63,6 +63,7 @@ link_directories(
)
set(LIBRARIES
+ ${LIBRARIES}
${DBUS_LIBRARIES}
${COMMONAPI_LIBRARIES}
${COMMONAPI_DBUS_LIBRARIES}
diff --git a/src/navigation/navigation-core/guidance-server-plugin/CMakeLists.txt b/src/navigation/navigation-core/guidance-server-plugin/CMakeLists.txt
index 749b82a..6f67649 100644
--- a/src/navigation/navigation-core/guidance-server-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/guidance-server-plugin/CMakeLists.txt
@@ -74,6 +74,7 @@ link_directories(
)
set(LIBRARIES
+ ${LIBRARIES}
${DBUS_LIBRARIES}
${COMMONAPI_LIBRARIES}
${COMMONAPI_DBUS_LIBRARIES}
diff --git a/src/navigation/navigation-core/locationinput-server-plugin/CMakeLists.txt b/src/navigation/navigation-core/locationinput-server-plugin/CMakeLists.txt
index 20cb3ac..461f8ed 100644
--- a/src/navigation/navigation-core/locationinput-server-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/locationinput-server-plugin/CMakeLists.txt
@@ -74,9 +74,10 @@ link_directories(
)
set(LIBRARIES
+ ${LIBRARIES}
+ ${DBUS_LIBRARIES}
${COMMONAPI_LIBRARIES}
${COMMONAPI_DBUS_LIBRARIES}
- ${DBUS_LIBRARIES}
${GOBJECT_LIBRARIES}
${GLIB_LIBRARIES}
${DBUS_CPP_GLIB_LIBRARIES}
diff --git a/src/navigation/navigation-core/mapmatchedposition-server-plugin/CMakeLists.txt b/src/navigation/navigation-core/mapmatchedposition-server-plugin/CMakeLists.txt
index bf5cac5..504cf5d 100644
--- a/src/navigation/navigation-core/mapmatchedposition-server-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/mapmatchedposition-server-plugin/CMakeLists.txt
@@ -74,6 +74,7 @@ link_directories(
)
set(LIBRARIES
+ ${LIBRARIES}
${DBUS_LIBRARIES}
${COMMONAPI_LIBRARIES}
${COMMONAPI_DBUS_LIBRARIES}
diff --git a/src/navigation/navigation-core/poicam-server-plugin/CMakeLists.txt b/src/navigation/navigation-core/poicam-server-plugin/CMakeLists.txt
index 32ead21..169087d 100644
--- a/src/navigation/navigation-core/poicam-server-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/poicam-server-plugin/CMakeLists.txt
@@ -81,6 +81,7 @@ link_directories(
)
set(LIBRARIES
+ ${LIBRARIES}
${DBUS_LIBRARIES}
${COMMONAPI_LIBRARIES}
${COMMONAPI_DBUS_LIBRARIES}
diff --git a/src/navigation/navigation-core/routing-server-plugin/CMakeLists.txt b/src/navigation/navigation-core/routing-server-plugin/CMakeLists.txt
index ea1fbcf..237ec66 100644
--- a/src/navigation/navigation-core/routing-server-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/routing-server-plugin/CMakeLists.txt
@@ -74,6 +74,7 @@ link_directories(
)
set(LIBRARIES
+ ${LIBRARIES}
${DBUS_LIBRARIES}
${COMMONAPI_LIBRARIES}
${COMMONAPI_DBUS_LIBRARIES}
diff --git a/src/navigation/navigation-core/session-server-plugin/CMakeLists.txt b/src/navigation/navigation-core/session-server-plugin/CMakeLists.txt
index 5a4931a..9531e2e 100644
--- a/src/navigation/navigation-core/session-server-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/session-server-plugin/CMakeLists.txt
@@ -73,6 +73,7 @@ link_directories(
)
set(LIBRARIES
+ ${LIBRARIES}
${DBUS_LIBRARIES}
${COMMONAPI_LIBRARIES}
${COMMONAPI_DBUS_LIBRARIES}
diff --git a/src/poi-service/poi-manager-server/poi-manager-server-stub.cpp b/src/poi-service/poi-manager-server/poi-manager-server-stub.cpp
index 07f4c93..07a917f 100644
--- a/src/poi-service/poi-manager-server/poi-manager-server-stub.cpp
+++ b/src/poi-service/poi-manager-server/poi-manager-server-stub.cpp
@@ -1372,7 +1372,7 @@ void PoiManagerServerStub::addPOIs(const std::shared_ptr<CommonAPI::ClientId> _c
}
else
{
- firePOIAddedEvent(addedPoiList);
+ firePoiAddedEvent(addedPoiList);
}
}
@@ -1392,7 +1392,7 @@ void PoiManagerServerStub::removePOIs(const std::shared_ptr<CommonAPI::ClientId>
}
else
{
- firePOIRemovedEvent(_ids);
+ firePoiRemovedEvent(_ids);
}
}