summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Residori <marco.residori@xse.de>2015-07-15 09:42:15 +0200
committerMarco Residori <marco.residori@xse.de>2015-07-15 09:42:15 +0200
commitc226b6c20e63892a26a95f5535fb52ed03672dea (patch)
tree7aa36fb4d0fc60cb76fb196a652b715995563451
parente74c236e7cca258ec2e17be7fb8e8a25730b0ce4 (diff)
downloadpositioning-c226b6c20e63892a26a95f5535fb52ed03672dea.tar.gz
Replace hexadecimal values with decimal values in fidl files since hexadecimal values are not supported by Franca yet. Code cleanup
-rw-r--r--CMakeLists.txt2
-rw-r--r--enhanced-position-service/dbus/CMakeLists.txt3
-rw-r--r--enhanced-position-service/franca/CMakeLists.txt2
-rw-r--r--enhanced-position-service/franca/api/CMakeLists.txt33
-rwxr-xr-xenhanced-position-service/franca/api/EnhancedPositionServiceTypes.fidl89
-rwxr-xr-xenhanced-position-service/franca/src/CMakeLists.txt10
-rw-r--r--enhanced-position-service/franca/src/ConfigurationStubImpl.cpp10
-rw-r--r--gnss-service/CMakeLists.txt2
-rw-r--r--log-replayer/CMakeLists.txt3
-rw-r--r--log-replayer/src/CMakeLists.txt1
-rw-r--r--sensors-service/CMakeLists.txt3
11 files changed, 72 insertions, 86 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5d2e8c9..38a0adc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,6 +34,8 @@ option(WITH_DBUS_INTERFACE
option(WITH_DEBUG
"Enable the debug messages" OFF)
+message(STATUS "---------------------------------------------------------")
+
if(WITH_ENHANCED_POSITION_SERVICE)
add_subdirectory(enhanced-position-service)
endif(WITH_ENHANCED_POSITION_SERVICE)
diff --git a/enhanced-position-service/dbus/CMakeLists.txt b/enhanced-position-service/dbus/CMakeLists.txt
index c3f8fef..a835625 100644
--- a/enhanced-position-service/dbus/CMakeLists.txt
+++ b/enhanced-position-service/dbus/CMakeLists.txt
@@ -34,9 +34,6 @@ option(WITH_REPLAYER
option(WITH_TESTS
"Compile test applications" OFF)
-message(STATUS)
-message(STATUS "---------------------------------------------------------")
-
set(gnss-service_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/../../gnss-service/api")
set(gnss-service_LIBRARY_DIRS "${PROJECT_BINARY_DIR}/../../gnss-service/src")
diff --git a/enhanced-position-service/franca/CMakeLists.txt b/enhanced-position-service/franca/CMakeLists.txt
index 0659666..ac2e7d1 100644
--- a/enhanced-position-service/franca/CMakeLists.txt
+++ b/enhanced-position-service/franca/CMakeLists.txt
@@ -62,6 +62,8 @@ endif()
include_directories(src test ${gnss-service_INCLUDE_DIRS} ${sensors-service_INCLUDE_DIRS})
add_subdirectory(api)
+message(STATUS "---------------------------------------------------------")
add_subdirectory(src)
+message(STATUS "---------------------------------------------------------")
diff --git a/enhanced-position-service/franca/api/CMakeLists.txt b/enhanced-position-service/franca/api/CMakeLists.txt
index c787944..416b84f 100644
--- a/enhanced-position-service/franca/api/CMakeLists.txt
+++ b/enhanced-position-service/franca/api/CMakeLists.txt
@@ -24,30 +24,11 @@ cmake_minimum_required (VERSION 2.8.1)
PROJECT(EnhancedPositionService)
-message("Project name: ${PROJECT_NAME}")
-
option(COMMONAPI_TOOL_GENERATOR
"Absolute path to CommonAPI code generator" "")
option(COMMONAPI_DBUS_TOOL_GENERATOR
"Absolute path to CommonAPI-DBus code generator" "")
-if (COMMONAPI_TOOL_GENERATOR)
- message (STATUS "COMMONAPI_TOOL_GENERATOR = " ${COMMONAPI_TOOL_GENERATOR})
-else ()
- message (FATAL_ERROR "Set the variable -DCOMMONAPI_TOOL_GENERATOR=<path>")
-endif ()
-
-
-if (COMMONAPI_DBUS_TOOL_GENERATOR)
- message (STATUS "COMMONAPI_DBUS_TOOL_GENERATOR = " ${COMMONAPI_DBUS_TOOL_GENERATOR})
-else ()
- message (FATAL_ERROR "Set the variable -DCOMMONAPI_DBUS_TOOL_GENERATOR=<path>")
-endif ()
-
-#set(FRANCA_DIR "..")
-#set(COMMONAPI_TOOL_GENERATOR "${FRANCA_DIR}/generators/common-api-tools/commonapi-generator-linux-x86" )
-#set(COMMONAPI_DBUS_TOOL_GENERATOR "${FRANCA_DIR}/generators/common-api-dbus-tools/commonapi-dbus-generator-linux-x86" )
-
set(COMMONAPI_FIDL_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(COMMONAPI_GEN_DIR "${CMAKE_BINARY_DIR}/enhanced-position-service/franca/api")
@@ -64,9 +45,17 @@ message("CMAKE_CURRENT_SOURCE_DIR" ${CMAKE_CURRENT_SOURCE_DIR})
file(GLOB FIDL_FILES "${COMMONAPI_FIDL_DIR}/*.fidl")
message("FIDL_FILES: ${FIDL_FILES}")
-execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR}
+if (COMMONAPI_TOOL_GENERATOR)
+ execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR}
COMMAND ${COMMONAPI_DBUS_TOOL_GENERATOR} -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES})
-execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR}
- COMMAND ${COMMONAPI_TOOL_GENERATOR} -sk -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES})
+else ()
+ message (FATAL_ERROR "Set the variable -DCOMMONAPI_TOOL_GENERATOR=<path>")
+endif ()
+if (COMMONAPI_DBUS_TOOL_GENERATOR)
+ execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR}
+ COMMAND ${COMMONAPI_TOOL_GENERATOR} -sk -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES})
+else ()
+ message (FATAL_ERROR "Set the variable -DCOMMONAPI_DBUS_TOOL_GENERATOR=<path>")
+endif ()
diff --git a/enhanced-position-service/franca/api/EnhancedPositionServiceTypes.fidl b/enhanced-position-service/franca/api/EnhancedPositionServiceTypes.fidl
index c67bce7..f631857 100755
--- a/enhanced-position-service/franca/api/EnhancedPositionServiceTypes.fidl
+++ b/enhanced-position-service/franca/api/EnhancedPositionServiceTypes.fidl
@@ -38,29 +38,29 @@ typeCollection EnhancedPositionServiceTypes {
}
enumeration PositionInfoKey {
- LATITUDE = 0x00000001
- LONGITUDE = 0x00000002
- ALTITUDE = 0x00000004
- HEADING = 0x00000008
- SPEED = 0x00000010
- CLIMB = 0x00000020
- ROLL_RATE = 0x00000040
- PITCH_RATE = 0x00000080
- YAW_RATE = 0x00000100
- PDOP = 0x00000200
- HDOP = 0x00000400
- VDOP = 0x00000800
- USED_SATELLITES = 0x00001000
- TRACKED_SATELLITES = 0x00002000
- VISIBLE_SATELLITES = 0x00004000
- SIGMA_HPOSITION = 0x00008000
- SIGMA_ALTITUDE = 0x00010000
- SIGMA_HEADING = 0x00020000
- SIGMA_SPEED = 0x00040000
- SIGMA_CLIMB = 0x00080000
- GNSS_FIX_STATUS = 0x00100000
- DR_STATUS = 0x00200000
- RELIABILTY_INDEX = 0x00400000
+ LATITUDE = 1
+ LONGITUDE = 2
+ ALTITUDE = 4
+ HEADING = 8
+ SPEED = 16
+ CLIMB = 32
+ ROLL_RATE = 64
+ PITCH_RATE = 128
+ YAW_RATE = 256
+ PDOP = 512
+ HDOP = 1024
+ VDOP = 2048
+ USED_SATELLITES = 4096
+ TRACKED_SATELLITES = 8192
+ VISIBLE_SATELLITES = 16384
+ SIGMA_HPOSITION = 32768
+ SIGMA_ALTITUDE = 65536
+ SIGMA_HEADING = 131072
+ SIGMA_SPEED = 262144
+ SIGMA_CLIMB = 524288
+ GNSS_FIX_STATUS = 1048576
+ DR_STATUS = 2097152
+ RELIABILTY_INDEX = 4194304
}
<** @description : PositionInfo = array of tuples (key,value)
@@ -93,10 +93,10 @@ typeCollection EnhancedPositionServiceTypes {
}
enumeration SatelliteSystem {
- GPS = 0x00000001
- GLONASS = 0x00000002
- GALILEO = 0x00000003
- COMPASS = 0x00000004
+ GPS = 1
+ GLONASS = 2
+ GALILEO = 3
+ COMPASS = 4
}
<** @description : SatelliteInfo = array(struct(system,satelliteId,azimuth,elevation,snr,inUse))
@@ -116,14 +116,17 @@ typeCollection EnhancedPositionServiceTypes {
Boolean inUse
}
+ <** @description: since the hexadecimal format is not supported by Franca yet
+ the bitmask below is expressed using numbers in decimal format.
+ Example: 0x01000000 = 16777216 **>
enumeration TimeInfoKey {
- YEAR = 0x01000000
- MONTH = 0x02000000
- DAY = 0x04000000
- HOUR = 0x08000000
- MINUTE = 0x10000000
- SECOND = 0x20000000
- MS = 0x40000000
+ YEAR = 16777216
+ MONTH = 33554432
+ DAY = 67108864
+ HOUR = 134217728
+ MINUTE = 268435456
+ SECOND = 536870912
+ MS = 1073741824
}
<** @description : TimeInfo = array of tuples (key,value)
@@ -141,18 +144,18 @@ typeCollection EnhancedPositionServiceTypes {
}
enumeration PositionFeedbackKey {
- LATITUDE = 0x00000001
- LONGITUDE = 0x00000002
- ALTITUDE = 0x00000004
- HEADING = 0x00000008
- SPEED = 0x00000010
- CLIMB = 0x00000020
- RELIABILTY_INDEX = 0x00400000
+ LATITUDE = 1
+ LONGITUDE = 2
+ ALTITUDE = 4
+ HEADING = 8
+ SPEED = 16
+ CLIMB = 32
+ RELIABILTY_INDEX = 64
}
enumeration PositionFeedbackType {
- MAP_MATCHED_FEEDBACK = 0x00000001
- TEST_FEEDBACK = 0x00000002
+ MAP_MATCHED_FEEDBACK = 1
+ TEST_FEEDBACK = 2
}
<**
diff --git a/enhanced-position-service/franca/src/CMakeLists.txt b/enhanced-position-service/franca/src/CMakeLists.txt
index 944eccc..b117ec2 100755
--- a/enhanced-position-service/franca/src/CMakeLists.txt
+++ b/enhanced-position-service/franca/src/CMakeLists.txt
@@ -15,9 +15,7 @@ set(CMAKE_VERBOSE_MAKEFILE on)
set(CMAKE_CXX_FLAGS "-Wall -std=c++0x")
set(CMAKE_BUILD_TYPE Debug)
-message(STATUS)
-message(STATUS "---------------------------------------------------------")
-message(STATUS "ENHANCED-POSITION-SERVICE-COMMON-API")
+message(STATUS "ENHANCED-POSITION-SERVICE-FRANCA")
message(STATUS "WITH_DLT = ${WITH_DLT}")
message(STATUS "WITH_GPSD = ${WITH_GPSD}")
message(STATUS "WITH_REPLAYER = ${WITH_REPLAYER}")
@@ -101,10 +99,4 @@ target_link_libraries(${PRJ_NAME_CLIENT} ${LIBRARIES} CommonAPI CommonAPI-DBus)
add_executable(${PRJ_NAME_SERVICE} ${PRJ_SERVICE_SRCS})
target_link_libraries(${PRJ_NAME_SERVICE} ${LIBRARIES} CommonAPI CommonAPI-DBus)
-message(STATUS "CMAKE_CURRENT_BINARY_DIR!!!!!!!!!! = " ${CMAKE_CURRENT_BINARY_DIR})
-message(STATUS "PRJ_STUB_IMPL_SRCS!!!!!!!!!! = " ${PRJ_STUB_IMPL_SRCS})
-message(STATUS "PRJ_STUB_GEN_SRCS!!!!!!!!!! = " ${PRJ_STUB_GEN_SRCS})
-message(STATUS "COMMONAPI_INCLUDE_DIRS!!!!!!!!!! = " ${COMMONAPI_INCLUDE_DIRS})
-message(STATUS "COMMONAPI_LIBDIR!!!!!!!!!! = " ${COMMONAPI_LIBDIR})
-
diff --git a/enhanced-position-service/franca/src/ConfigurationStubImpl.cpp b/enhanced-position-service/franca/src/ConfigurationStubImpl.cpp
index e37af2d..68270fb 100644
--- a/enhanced-position-service/franca/src/ConfigurationStubImpl.cpp
+++ b/enhanced-position-service/franca/src/ConfigurationStubImpl.cpp
@@ -52,7 +52,15 @@ void ConfigurationStubImpl::GetVersion(const std::shared_ptr<CommonAPI::ClientId
//check if the value belongs to the list of supported satellite systems
bool ConfigurationStubImpl::validateSatSystemAttributeRequestedValue(const EnhancedPositionServiceTypes::SatelliteSystem& value) {
- return true; //(std::find(mSupportedSatSystems.begin(), mSupportedSatSystems.end(), value) != mSupportedSatSystems.end());
+
+ for (unsigned int i = 0; i < mSupportedSatSystems.size(); i++)
+ {
+ if(mSupportedSatSystems[i] == value)
+ {
+ return true; //found
+ }
+ }
+ return false; //not found
}
void ConfigurationStubImpl::GetSupportedSatelliteSystems(const std::shared_ptr<CommonAPI::ClientId> _client, GetSupportedSatelliteSystemsReply_t _reply) {
diff --git a/gnss-service/CMakeLists.txt b/gnss-service/CMakeLists.txt
index 04d38e4..dd87232 100644
--- a/gnss-service/CMakeLists.txt
+++ b/gnss-service/CMakeLists.txt
@@ -37,8 +37,6 @@ option(WITH_TESTS
SET(CMAKE_INSTALL_RPATH "")
#SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
-message(STATUS "CMAKE_BINARY_DIR =" ${CMAKE_BINARY_DIR})
-
add_subdirectory(src)
message(STATUS "---------------------------------------------------------")
diff --git a/log-replayer/CMakeLists.txt b/log-replayer/CMakeLists.txt
index 7ef8cdb..c078f20 100644
--- a/log-replayer/CMakeLists.txt
+++ b/log-replayer/CMakeLists.txt
@@ -28,15 +28,14 @@ option(WITH_DLT
option(WITH_TESTS
"Compile test applications" OFF)
-message(STATUS "---------------------------------------------------------")
add_subdirectory(src)
message(STATUS "---------------------------------------------------------")
add_subdirectory(logs)
-message(STATUS "---------------------------------------------------------")
if(WITH_TESTS)
add_subdirectory(test)
message(STATUS "---------------------------------------------------------")
endif()
+
diff --git a/log-replayer/src/CMakeLists.txt b/log-replayer/src/CMakeLists.txt
index 039ed94..c930858 100644
--- a/log-replayer/src/CMakeLists.txt
+++ b/log-replayer/src/CMakeLists.txt
@@ -40,7 +40,6 @@ target_link_libraries(log-replayer ${LIBRARIES})
install(TARGETS log-replayer DESTINATION bin)
-message(STATUS "---------------------------------------------------------")
diff --git a/sensors-service/CMakeLists.txt b/sensors-service/CMakeLists.txt
index aaa4a13..e251637 100644
--- a/sensors-service/CMakeLists.txt
+++ b/sensors-service/CMakeLists.txt
@@ -37,9 +37,6 @@ option(WITH_IPHONE
option(WITH_TESTS
"Compile test applications" OFF)
-message(STATUS)
-message(STATUS "---------------------------------------------------------")
-
add_subdirectory(src)
message(STATUS "---------------------------------------------------------")