diff options
author | asanoaozora <fifitaneki@hotmail.com> | 2017-04-20 16:56:34 +0200 |
---|---|---|
committer | asanoaozora <fifitaneki@hotmail.com> | 2017-04-20 16:56:34 +0200 |
commit | dd7740c3da7400d7e51544a686888441971ba4f0 (patch) | |
tree | 822a1c0cae2884f250d92fdf7461633d54940ef9 | |
parent | d475fb3b22d6dbc704f1208202f86a5393137537 (diff) | |
download | poi-service-dd7740c3da7400d7e51544a686888441971ba4f0.tar.gz |
GT-3501: Inconsistency of scaleID format
-rw-r--r-- | api/franca/hmi/speechservice/SpeechOutput.fidl | 3 | ||||
-rwxr-xr-x | api/franca/navigation/mapviewer/MapViewerControl.fidl | 12 | ||||
-rw-r--r-- | api/map-viewer/genivi-mapviewer-mapviewercontrol.xml | 12 | ||||
-rw-r--r-- | src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx | 16 | ||||
-rw-r--r-- | src/speech/CMakeLists.txt | 15 | ||||
-rw-r--r-- | src/speech/main.cpp | 10 |
6 files changed, 31 insertions, 37 deletions
diff --git a/api/franca/hmi/speechservice/SpeechOutput.fidl b/api/franca/hmi/speechservice/SpeechOutput.fidl index be9cb40..98e94e1 100644 --- a/api/franca/hmi/speechservice/SpeechOutput.fidl +++ b/api/franca/hmi/speechservice/SpeechOutput.fidl @@ -28,9 +28,6 @@ interface SpeechOutput { } } - <** @description : Max length of a single prompt part. **> - const UInt32 MAX_CHUNK_LENGTH = 1024 - <** @description : String containing the prompt to play. **> typedef Chunk is String diff --git a/api/franca/navigation/mapviewer/MapViewerControl.fidl b/api/franca/navigation/mapviewer/MapViewerControl.fidl index af090d0..e29af10 100755 --- a/api/franca/navigation/mapviewer/MapViewerControl.fidl +++ b/api/franca/navigation/mapviewer/MapViewerControl.fidl @@ -188,7 +188,7 @@ interface MapViewerControl { @description : struct generated for DBus argument GetScaleList_scaleList **> struct MapScale { - UInt16 scaleId + UInt8 scaleId UInt16 scaleValue MapScaleUnit unit UInt32 millimetersPerPixel @@ -877,7 +877,7 @@ interface MapViewerControl { Handle mapViewInstanceHandle <** - @description : scaleID = scale identifier. Range[0:256] + @description : scaleID = scale identifier. Range[0:255] **> UInt8 scaleID @@ -1120,9 +1120,9 @@ interface MapViewerControl { Handle mapViewInstanceHandle <** - @description : scaleID = scale identifier. Range[0:256] + @description : scaleID = scale identifier. Range[0:255] **> - UInt16 scaleID + UInt8 scaleID } } @@ -1186,7 +1186,7 @@ interface MapViewerControl { out { <** - @description : scaleID = scale identifier. Range[0:256] + @description : scaleID = scale identifier. Range[0:255] **> UInt8 scaleID @@ -1960,4 +1960,4 @@ interface MapViewerControl { SelectedMapElement [] selectedElements } } -}
\ No newline at end of file +} diff --git a/api/map-viewer/genivi-mapviewer-mapviewercontrol.xml b/api/map-viewer/genivi-mapviewer-mapviewercontrol.xml index 261693a..6b4c65e 100644 --- a/api/map-viewer/genivi-mapviewer-mapviewercontrol.xml +++ b/api/map-viewer/genivi-mapviewer-mapviewercontrol.xml @@ -595,7 +595,7 @@ </arg> <arg name="scaleID" type="y"> <doc> - <line>scaleID = scale identifier. Range[0:256]</line> + <line>scaleID = scale identifier. Range[0:255]</line> </doc> </arg> <arg name="isMinMax" type="i"> @@ -796,10 +796,10 @@ <line>mapViewInstanceHandle = Map instance handle. Range[0x0:0x7fffffff]. 0x0 is reserved as an invalid handle value</line> </doc> </arg> - <arg name="scaleList" type="a(qqiu)" direction="out"> + <arg name="scaleList" type="a(yqiu)" direction="out"> <doc> <line>scaleList = array[struct(scaleId,scaleValue,scaleUnit,millimetersPerPixel)]</line> - <line>scaleId = scale identifier. Range [0:256]</line> + <line>scaleId = scale identifier. Range [0:255]</line> <line>scaleValue = scale value. It can assume values like 100, 200, 1000, ...</line> <line>scaleUnit = unit of measurement. It is an enum(INVALID,METER,KM,MILE,YARD,FOOT, ... )</line> <line>millimetersPerPixel = number indicating the number of millimeters per pixel</line> @@ -821,9 +821,9 @@ <line>mapViewInstanceHandle = Map instance handle. Range[0x0:0x7fffffff]. 0x0 is reserved as an invalid handle value</line> </doc> </arg> - <arg name="scaleID" type="q" direction="in"> + <arg name="scaleID" type="y" direction="in"> <doc> - <line>scaleID = scale identifier. Range[0:256]</line> + <line>scaleID = scale identifier. Range[0:255]</line> </doc> </arg> </method> @@ -878,7 +878,7 @@ </arg> <arg name="scaleID" type="y" direction="out"> <doc> - <line>scaleID = scale identifier. Range[0:256]</line> + <line>scaleID = scale identifier. Range[0:255]</line> </doc> </arg> <arg name="isMinMax" type="i" direction="out"> diff --git a/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx b/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx index c637c82..f85d187 100644 --- a/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx +++ b/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx @@ -151,8 +151,8 @@ class MapViewerControlObj void SetCameraHeadingTrackUp(uint32_t sessionHandle); void SetMapViewPerspective(uint32_t SessionHandle, uint16_t MapViewPerspectiveMode); void GetMapViewPerspective(uint16_t &MapViewPerspectiveMode); - void GetScaleList(std::vector< ::DBus::Struct< uint16_t, uint16_t, DBusCommonAPIEnumeration, uint32_t > >& ScalesList); - void SetMapViewScale(uint32_t SessionHandle, uint32_t ScaleID); + void GetScaleList(std::vector< ::DBus::Struct< uint8_t, uint16_t, DBusCommonAPIEnumeration, uint32_t > >& ScalesList); + void SetMapViewScale(uint32_t SessionHandle, uint8_t ScaleID); void SetMapViewScaleByDelta(uint32_t SessionHandle, int16_t ScaleDelta); void GetMapViewScale(uint8_t& ScaleID, DBusCommonAPIEnumeration &IsMinMax); void GetMapViewType(uint16_t& MapViewType); @@ -409,7 +409,7 @@ class MapViewerControl } void - SetMapViewScale(const uint32_t& SessionHandle, const uint32_t& MapViewInstanceHandle, const uint16_t& ScaleID) + SetMapViewScale(const uint32_t& SessionHandle, const uint32_t& MapViewInstanceHandle, const uint8_t& ScaleID) { dbg(lvl_debug,"enter\n"); MapViewerControlObj *obj=handles[MapViewInstanceHandle]; @@ -687,10 +687,10 @@ class MapViewerControl return ret; } - std::vector< ::DBus::Struct< uint16_t, uint16_t, DBusCommonAPIEnumeration, uint32_t > > + std::vector< ::DBus::Struct< uint8_t, uint16_t, DBusCommonAPIEnumeration, uint32_t > > GetScaleList(const uint32_t& mapViewInstanceHandle) { - std::vector< ::DBus::Struct< uint16_t, uint16_t, DBusCommonAPIEnumeration, uint32_t > > ret; + std::vector< ::DBus::Struct< uint8_t, uint16_t, DBusCommonAPIEnumeration, uint32_t > > ret; MapViewerControlObj *obj=handles[mapViewInstanceHandle]; if (!obj) throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle"); @@ -966,9 +966,9 @@ MapViewerControlObj::GetMapViewPerspective(uint16_t& MapViewPerspectiveMode) } void -MapViewerControlObj::GetScaleList(std::vector< ::DBus::Struct< uint16_t, uint16_t, DBusCommonAPIEnumeration, uint32_t > >& ScalesList) +MapViewerControlObj::GetScaleList(std::vector< ::DBus::Struct< uint8_t, uint16_t, DBusCommonAPIEnumeration, uint32_t > >& ScalesList) { - ::DBus::Struct< uint16_t, uint16_t, DBusCommonAPIEnumeration, uint32_t > scale; + ::DBus::Struct< uint8_t, uint16_t, DBusCommonAPIEnumeration, uint32_t > scale; uint32_t basisPixel = ZOOM_ZERO_METER_WIDTH/m_width; scale._1=0; @@ -1054,7 +1054,7 @@ MapViewerControlObj::GetScaleList(std::vector< ::DBus::Struct< uint16_t, uint16_ } void -MapViewerControlObj::SetMapViewScale(uint32_t SessionHandle, uint32_t ScaleID) +MapViewerControlObj::SetMapViewScale(uint32_t SessionHandle, uint8_t ScaleID) { long scale=1 << ScaleID; struct transformation *trans=navit_get_trans(m_navit.u.navit); diff --git a/src/speech/CMakeLists.txt b/src/speech/CMakeLists.txt index f8d73ab..ee62ba2 100644 --- a/src/speech/CMakeLists.txt +++ b/src/speech/CMakeLists.txt @@ -54,22 +54,21 @@ set(COMMONAPI_GEN_DIR "${CMAKE_CURRENT_BINARY_DIR}/src-gen") add_subdirectory(${FRANCA_DIR}/hmi/speechservice "${CMAKE_CURRENT_BINARY_DIR}/franca") # Path to the generated files -set(API_VERSION_MAJOR 4) -set(API_VERSION "v${API_VERSION_MAJOR}") -set(PRJ_SRC_GEN_ROOT_PATH ${COMMONAPI_GEN_DIR}/${API_VERSION}/org/genivi) #files shared by all the APIs -set(PRJ_SRC_GEN_HMI_PATH ${PRJ_SRC_GEN_ROOT_PATH}/hmi) #files shared by the hmi APIs -set(PRJ_SRC_GEN_SPEECHOUTPUTSERVICE_PATH ${PRJ_SRC_GEN_HMI_PATH}/speechoutputservice) #files shared by the speechservice APIs +set(API_VERSION_NAVIGATION_MAJOR 4) +set(API_VERSION_NAVIGATION "v${API_VERSION_NAVIGATION_MAJOR}") +set(API_VERSION_SPEECHOUTPUTSERVICE_MAJOR 1) +set(API_VERSION_SPEECHOUTPUTSERVICE "v${API_VERSION_SPEECHOUTPUTSERVICE_MAJOR}") +set(PRJ_SRC_GEN_COMMON_PATH ${COMMONAPI_GEN_DIR}/${API_VERSION_NAVIGATION}/org/genivi) #files shared by all the APIs +set(PRJ_SRC_GEN_SPEECHOUTPUTSERVICE_PATH ${COMMONAPI_GEN_DIR}/${API_VERSION_SPEECHOUTPUTSERVICE}/org/genivi/hmi/speechoutputservice) #files shared by the speechservice APIs # Source Files FILE(GLOB PRJ_LOCAL_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) FILE(GLOB PRJ_STUB_GEN_SRCS ${PRJ_SRC_GEN_ROOT_PATH}/*DBusStub*.cpp ${PRJ_SRC_GEN_ROOT_PATH}/*Types.cpp ${PRJ_SRC_GEN_ROOT_PATH}/*DBusDeployment.cpp ${PRJ_SRC_GEN_ROOT_PATH}/*StubDefault.cpp - ${PRJ_SRC_GEN_HMI_PATH}/*DBusStub*.cpp ${PRJ_SRC_GEN_HMI_PATH}/*Types.cpp ${PRJ_SRC_GEN_HMI_PATH}/*DBusDeployment.cpp ${PRJ_SRC_GEN_HMI_PATH}/*StubDefault.cpp ${PRJ_SRC_GEN_SPEECHOUTPUTSERVICE_PATH}/*DBusStub*.cpp ${PRJ_SRC_GEN_SPEECHOUTPUTSERVICE_PATH}/*Types.cpp ${PRJ_SRC_GEN_SPEECHOUTPUTSERVICE_PATH}/*DBusDeployment.cpp ${PRJ_SRC_GEN_SPEECHOUTPUTSERVICE_PATH}/*StubDefault.cpp ) FILE(GLOB PRJ_STUB_IMPL_SRCS ${PRJ_SRC_GEN_ROOT_PATH}/*Stub*.cpp - ${PRJ_SRC_GEN_HMI_PATH}/*Stub*.cpp ${PRJ_SRC_GEN_SPEECHOUTPUTSERVICE_PATH}/*Stub*.cpp ) @@ -82,7 +81,7 @@ set(FLITE_LIBRARIES /usr/lib/x86_64-linux-gnu/libflite.so /usr/lib/x86_64-linux- include_directories( ${COMMONAPI_GEN_DIR} ${PRJ_SRC_GEN_ROOT_PATH} - ${PRJ_SRC_GEN_HMI_PATH} + ${PRJ_SRC_GEN_COMMON_PATH} ${PRJ_SRC_GEN_SPEECHOUTPUTSERVICE_PATH} ${DBUS_INCLUDE_DIRS} ${COMMONAPI_INCLUDE_DIRS} diff --git a/src/speech/main.cpp b/src/speech/main.cpp index 261cd5a..4d3b1bc 100644 --- a/src/speech/main.cpp +++ b/src/speech/main.cpp @@ -50,7 +50,7 @@ extern "C" { #include <CommonTypes.hpp> #include <SpeechOutputStubDefault.hpp> -using namespace v4::org::genivi::hmi::speechoutputservice; +using namespace v1::org::genivi::hmi::speechoutputservice; using namespace v4::org::genivi; static std::shared_ptr < CommonAPI::Runtime > runtime; @@ -211,7 +211,7 @@ public: } } - fireNotifyQueueStatusEvent(qStatus); + fireNotifyQueueStatusSelective(qStatus); _reply(_chunkID); } @@ -220,19 +220,17 @@ public: * description: A prompt must be playing to perform an abort action. If no prompting operation * in progress there will be no reaction of the system. */ - void abortPrompter(const std::shared_ptr<CommonAPI::ClientId> _client, abortPrompterReply_t _reply) { + void abortPrompter(const std::shared_ptr<CommonAPI::ClientId> _client) { printf("\n>>> [server] abortPrompter()\n"); - _reply(); } /** * description: The prompter is closed after the last text chunk submitted has finished playing. */ - void closePrompter(const std::shared_ptr<CommonAPI::ClientId> _client, closePrompterReply_t _reply) { + void closePrompter(const std::shared_ptr<CommonAPI::ClientId> _client) { printf("\n>>> [server] closePrompter()\n"); - _reply(); } |