summaryrefslogtreecommitdiff
path: root/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api
diff options
context:
space:
mode:
Diffstat (limited to 'SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api')
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Async.js7
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/BasicCommunication.qml88
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Buttons.qml48
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Navigation.qml127
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/TTS.qml115
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/UI.qml449
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/VR.qml93
-rw-r--r--SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/VehicleInfo.qml749
8 files changed, 1676 insertions, 0 deletions
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Async.js b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Async.js
new file mode 100644
index 000000000..ebc5bfa3c
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Async.js
@@ -0,0 +1,7 @@
+.pragma library
+
+var async_uid = 1;
+
+function AsyncCall() {
+ this.__async_uid = async_uid++;
+}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/BasicCommunication.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/BasicCommunication.qml
new file mode 100644
index 000000000..9d7e0432f
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/BasicCommunication.qml
@@ -0,0 +1,88 @@
+/**
+ * @file BasicCommunication.qml
+ * @brief Implement of interface Basic Communication.
+ * Copyright (c) 2013, Ford Motor Company
+ * 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 Ford Motor Company 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 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.
+ */
+
+import QtQuick 1.1
+
+Item {
+ function updateDeviceList (deviceList) {
+ dataContainer.deviceList.clear();
+ for(var i = 0; i < deviceList.length; i++) {
+ dataContainer.deviceList.append({ name: deviceList[i].name, devid: deviceList[i].id })
+ }
+ }
+
+ function updateAppList (applications) {
+ dataContainer.applicationList.clear();
+ for(var i = 0; i < applications.length; i++) {
+ dataContainer.applicationList.append({
+ appName: applications[i].appName,
+ ngnMediaScreenAppName: applications[i].ngnMediaScreenAppName,
+ icon: applications[i].icon,
+ deviceName: applications[i].deviceName,
+ appId: applications[i].appID,
+ hmiDisplayLanguageDesired: applications[i].hmiDisplayLanguageDesired,
+ isMediaApplication: applications[i].isMediaApplication,
+ appType: applications[i].appType
+ });
+ }
+ }
+
+ function allowDeviceToConnect (device) {
+ return {
+ allow: true
+ }
+ }
+
+ function mixingAudioSupported() {
+ return {
+ attenuatedSupport: true
+ }
+ }
+
+ function allowAllApps() {
+ return {
+ allowed: true
+ }
+ }
+
+ function allowApp(app, appPermissions) {
+ return {
+ allowed: true
+ }
+ }
+
+ function activateApp() {
+ contentLoader.go("views/SDLPlayerView.qml", appID);
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Buttons.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Buttons.qml
new file mode 100644
index 000000000..83ea933ed
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Buttons.qml
@@ -0,0 +1,48 @@
+/**
+ * @file Buttons.qml
+ * @brief Implement of interface Buttons.
+ * Copyright (c) 2013, Ford Motor Company
+ * 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 Ford Motor Company 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 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.
+ */
+
+import QtQuick 1.1
+
+Item
+{
+ function getCapabilities()
+ {
+ return {
+ capabilities: settingsContainer.buttonCapabilities,
+ presetBankCapabilities: {
+ onScreenPresetsAvailable: true
+ }
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Navigation.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Navigation.qml
new file mode 100644
index 000000000..3ec131c8c
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/Navigation.qml
@@ -0,0 +1,127 @@
+/**
+ * @file Navigation.qml
+ * @brief Navigation.
+ * Copyright (c) 2013, Ford Motor Company
+ * 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 Ford Motor Company 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 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.
+ */
+
+import QtQuick 1.1
+import "Common.js" as Common
+
+Item {
+ function isReady () {
+ return {
+ available: dataContainer.hmiNavigationAvailable
+ }
+ }
+
+ function showConstantTBT(navigationTexts, turnIcon, nextTurnIcon, distanceToManeuver,
+ distanceToManeuverScale, maneuverComplete,
+ softButtons, appID) {
+ console.debug("enter")
+ navigationTexts.forEach(fillTexts);
+ dataContainer.navigationModel.turnIcon = turnIcon ? turnIcon.value : ""
+ dataContainer.navigationModel.nextTurnIcon = nextTurnIcon ? nextTurnIcon.value : ""
+ dataContainer.navigationModel.distanceToManeuver = distanceToManeuver;
+ dataContainer.navigationModel.distanceToManeuverScale = distanceToManeuverScale;
+ if (maneuverComplete !== undefined) {
+ dataContainer.navigationModel.maneuverComplete = maneuverComplete;
+ }
+ if (softButtons !== undefined) {
+ dataContainer.navigationModel.softButtons.clear();
+ softButtons.forEach(fillSoftButtons, dataContainer.navigationModel.softButtons);
+ }
+ dataContainer.navigationModel.appId = appID;
+ contentLoader.go("./views/TurnByTurnView.qml");
+ console.debug("exit")
+ }
+
+ function alertManeuver(softButtons) {
+ console.debug("enter")
+ if (softButtons !== undefined) {
+ dataContainer.navigationModel.alertManeuverSoftButtons.clear();
+ softButtons.forEach(fillSoftButtons, dataContainer.navigationModel.alertManeuverSoftButtons);
+ }
+ console.debug("exit")
+ }
+
+ function updateTurnList(turnList, softButtons, appID) {
+ console.debug("enter")
+ if (turnList !== undefined) {
+ dataContainer.getApplication(appID).turnList.clear();
+ turnList.forEach(fillTurnList, dataContainer.getApplication(appID).turnList);
+ }
+ if (softButtons !== undefined) {
+ dataContainer.getApplication(appID).turnListSoftButtons.clear();
+ softButtons.forEach(fillSoftButtons, dataContainer.getApplication(appID).turnListSoftButtons);
+ }
+ dataContainer.navigationModel.appId = appID;
+ console.debug("exit")
+ }
+
+ function fillTexts(element, index, array) {
+ switch (element.fieldName) {
+ case Common.TextFieldName.navigationText1:
+ dataContainer.navigationModel.text1 = element.fieldText;
+ break;
+ case Common.TextFieldName.navigationText2:
+ dataContainer.navigationModel.text2 = element.fieldText;
+ break;
+ case Common.TextFieldName.ETA:
+ dataContainer.navigationModel.eta = element.fieldText;
+ break;
+ case Common.TextFieldName.totalDistance:
+ dataContainer.navigationModel.totalDistance = element.fieldText;
+ break;
+ case Common.TextFieldName.timeToDestination:
+ dataContainer.navigationModel.timeToDestination = element.fieldText;
+ break;
+ }
+ }
+
+ function fillSoftButtons(element, index, array) {
+ this.append({
+ type: element.type,
+ text: element.text,
+ image: element.image,
+ isHighlighted: element.isHighlighted,
+ buttonId: element.softButtonID,
+ systemAction: element.systemAction
+ });
+ }
+
+ function fillTurnList(element, index, array) {
+ this.append({
+ navigationText: element.navigationText,
+ turnIcon: element.turnIcon
+ });
+ console.debug(element.navigationText)
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/TTS.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/TTS.qml
new file mode 100644
index 000000000..96aa9b2c2
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/TTS.qml
@@ -0,0 +1,115 @@
+/**
+ * Copyright (c) 2013, Ford Motor Company
+ * 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 Ford Motor Company 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 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.
+ */
+
+import QtQuick 1.1
+import "Common.js" as Common
+import "Async.js" as Async
+
+Item {
+ function isReady() {
+ return {
+ available: dataContainer.hmiTTSAvailable
+ }
+ }
+
+ function speak(ttsChunks, appID) {
+ // appID unused
+ console.debug('enter:', ttsChunks, appID);
+ if (ttsPopUp.async) {
+ console.log('speak send abort');
+ throw Common.Result.ABORTED;
+ }
+
+ var message = ttsChunks.map(function(str) { return str.text }).join('\n');
+ ttsPopUp.activate(message);
+ ttsPopUp.async = new Async.AsyncCall();
+ console.debug('exit');
+ return ttsPopUp.async;
+ }
+
+ function stopSpeaking() {
+ console.debug("enter");
+ ttsPopUp.deactivate();
+ console.debug("exit");
+ }
+
+ function getLanguage() {
+ return {
+ language: dataContainer.hmiTTSVRLanguage
+ }
+ }
+
+ function getSupportedLanguages() {
+ return {
+ languages: settingsContainer.sdlLanguagesList
+ }
+ }
+
+ function getCapabilities() {
+ return {
+ capabilities: Common.SpeechCapabilities.SC_TEXT
+ }
+ }
+
+ function changeRegistration(language, appID) {
+ console.debug("enter:", language, appID);
+ dataContainer.changeRegistrationTTSVR(language, appID);
+ console.debug("exit");
+ }
+
+ function setGlobalProperties(helpPrompt, timeoutPrompt, appID) {
+ console.debug("enter: " + helpPrompt + ", " + timeoutPrompt + ", " + appID)
+
+ var newHelpPropmt = helpPrompt ?
+ helpPrompt.map(
+ function (structure) {
+ return structure.text
+ }
+ ).join(", ") :
+ dataContainer.currentApplication.helpPrompt
+
+ var newTimeoutPrompt = timeoutPrompt ?
+ timeoutPrompt.map(
+ function (structure) {
+ return structure.text
+ }
+ ).join(", ") :
+ dataContainer.currentApplication.timeoutPrompt
+
+ dataContainer.setApplicationProperties(dataContainer.currentApplication.appId, {
+ helpPrompt: newHelpPropmt,
+ timeoutPrompt: newTimeoutPrompt
+ })
+ console.debug("exit")
+ }
+}
+
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/UI.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/UI.qml
new file mode 100644
index 000000000..648cd1397
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/UI.qml
@@ -0,0 +1,449 @@
+/**
+ * @file UI.qml
+ * @brief UI interface implementation.
+ * Copyright (c) 2013, Ford Motor Company
+ * 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 Ford Motor Company 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 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.
+ */
+
+import QtQuick 1.1
+import "Common.js" as Common
+import "Async.js" as Async
+import "../models/Internal.js" as Internal
+
+Item {
+ function filter (strings, fields) {
+ console.debug("enter")
+// substrings for each allowed field
+ var fieldSubstrings = {}
+// this cycle concatenates allowed lines sorting them by field
+ for (var stringIndex = 0; stringIndex < strings.length; ++stringIndex) {
+ for (var fieldIndex = 0; fieldIndex < fields.length; ++fieldIndex) {
+ var fieldName = strings[stringIndex].fieldName
+ if (fieldName === fields[fieldIndex]) {
+ if (fieldSubstrings[fieldName] !== undefined) {
+ fieldSubstrings[fieldName] += "\n";
+ fieldSubstrings[fieldName] += strings[stringIndex].fieldText
+ }
+ else {
+ fieldSubstrings[fieldName] = strings[stringIndex].fieldText
+ }
+ }
+ }
+ }
+ console.debug("exit")
+ return fieldSubstrings
+ }
+
+ function alert (alertStrings, duration, softButtons, progressIndicator, appID) {
+ var fieldSubstrings = alertStrings
+ .sort(function(a, b) { return a.fieldName - b.fieldName }) // sorting by fieldName
+ .map(function(val) { return val.fieldText }); // mapping to array of strings
+
+ var tryAgainTime = alertWindow.alert(fieldSubstrings, duration, progressIndicator, softButtons, appID)
+ if (tryAgainTime === undefined) {
+ alertWindow.async = new Async.AsyncCall();
+ return alertWindow.async;
+ }
+ else {
+ return {
+ "__retCode": Common.Result.REJECTED,
+ "tryAgainTime": tryAgainTime
+ }
+ }
+ }
+
+ function show (showStrings, alignment, graphic, softButtons, customPresets, appID) {
+ console.debug("enter: " + showStrings + ", " + alignment + ", " + graphic + ", "+ softButtons + ", " + customPresets + ", " + appID)
+ var app = dataContainer.getApplication(appID);
+
+ if (softButtons) {
+ app.softButtons.clear()
+ softButtons.forEach(function(x) { app.softButtons.append(x); });
+ }
+
+ if (customPresets) {
+ app.customPresets.clear()
+ customPresets.forEach( function(x) { app.customPresets.append( {text: x} ); } )
+ }
+
+ var textAlignment
+ switch (alignment) {
+ case Common.TextAlignment.LEFT_ALIGNED:
+ textAlignment = Text.AlignLeft
+ break;
+ case Common.TextAlignment.RIGHT_ALIGNED:
+ textAlignment = Text.AlignRight
+ break;
+ case Common.TextAlignment.CENTERED:
+ textAlignment = Text.AlignHCenter
+ break;
+ default:
+ textAlignment = Text.AlignHCenter
+ break;
+ }
+
+ // with this array we grab only the lines we need
+ var showFields = [
+ Common.TextFieldName.mainField1,
+ Common.TextFieldName.mainField2,
+ Common.TextFieldName.mainField3,
+ Common.TextFieldName.mainField4,
+ Common.TextFieldName.statusBar,
+ Common.TextFieldName.mediaClock,
+ Common.TextFieldName.mediaTrack
+ ]
+ var fieldSubstrings = filter(showStrings, showFields)
+ var showData = { hmiUIText: {} }
+ if (fieldSubstrings[Common.TextFieldName.mainField1] !== undefined) { showData.hmiUIText.mainField1 = fieldSubstrings[Common.TextFieldName.mainField1]; }
+ if (fieldSubstrings[Common.TextFieldName.mainField2] !== undefined) { showData.hmiUIText.mainField2 = fieldSubstrings[Common.TextFieldName.mainField2]; }
+ if (fieldSubstrings[Common.TextFieldName.mainField3] !== undefined) { showData.hmiUIText.mainField3 = fieldSubstrings[Common.TextFieldName.mainField3]; }
+ if (fieldSubstrings[Common.TextFieldName.mainField4] !== undefined) { showData.hmiUIText.mainField4 = fieldSubstrings[Common.TextFieldName.mainField4]; }
+ if (fieldSubstrings[Common.TextFieldName.statusBar] !== undefined) { showData.hmiUIText.statusBar = fieldSubstrings[Common.TextFieldName.statusBar]; }
+ if (fieldSubstrings[Common.TextFieldName.mediaTrack] !== undefined) { showData.hmiUIText.mediaTrack = fieldSubstrings[Common.TextFieldName.mediaTrack]; }
+ if (graphic) { showData.hmiUIText.image = graphic.value; }
+ if (textAlignment) { showData.hmiUITextAlignment = textAlignment; }
+ if (fieldSubstrings[Common.TextFieldName.mediaClock]) {
+ showData.mediaClock = {
+ "updateMode": Internal.MediaClockUpdateMode.MCU_COUNTUP,
+ "runningMode": Internal.MediaClockRunningMode.MCR_STOPPED,
+ "magic": Internal.stringToHmsTime(fieldSubstrings[Common.TextFieldName.mediaClock]),
+ "total": 0
+ }
+ }
+
+ dataContainer.setApplicationProperties(appID, showData);
+ console.debug("exit")
+ }
+
+ function addCommand (cmdID, menuParams, cmdIcon, appID) {
+ dataContainer.addCommand(cmdID, menuParams, cmdIcon, appID)
+ }
+
+ function deleteCommand (cmdID, appID) {
+ dataContainer.deleteCommand(cmdID, appID)
+ }
+
+ function addSubMenu (menuID, menuParams, appID) {
+ dataContainer.addSubMenu(menuID, menuParams, appID)
+ }
+
+ function deleteSubMenu (menuID, appID) {
+ dataContainer.deleteSubMenu(menuID, appID)
+ }
+
+ function performInteraction (initialText, choiceSet, vrHelp, timeout, appID) {
+ console.debug("enter")
+ var async = dataContainer.interactionModel.performInteraction(initialText, choiceSet, vrHelp, timeout, appID)
+ console.debug("exit")
+ return async
+ }
+
+ function setMediaClockTimer (startTime, endTime, updateMode, appID) {
+ console.debug("enter: {", startTime, ", ", endTime, ", ", updateMode, ", ", appID, "}")
+
+ var app = dataContainer.getApplication(appID)
+ var newStartTime
+ var newEndTime
+ var newUpdateMode
+ var newRunningMode
+ var newStartTimeForProgress
+ var resultCode
+ var sendErrorResponce = false
+
+ switch (updateMode) {
+ case Common.ClockUpdateMode.COUNTUP:
+ if (startTime === undefined) {
+ resultCode = Common.Result.INVALID_DATA
+ sendErrorResponce = true
+ break
+ }
+ newStartTime = Internal.hmsTime(startTime.hours, startTime.minutes, startTime.seconds)
+ newEndTime = endTime ? Internal.hmsTime(endTime.hours, endTime.minutes, endTime.seconds) : -1
+ newUpdateMode = Internal.MediaClockUpdateMode.MCU_COUNTUP
+ newRunningMode = Internal.MediaClockRunningMode.MCR_RUNNING
+ newStartTimeForProgress = Internal.hmsTime(startTime.hours, startTime.minutes, startTime.seconds)
+ resultCode = Common.Result.SUCCESS
+ break
+
+ case Common.ClockUpdateMode.COUNTDOWN:
+ if (startTime === undefined) {
+ resultCode = Common.Result.INVALID_DATA
+ sendErrorResponce = true
+ break
+ }
+ newStartTime = Internal.hmsTime(startTime.hours, startTime.minutes, startTime.seconds)
+ newEndTime = endTime ? Internal.hmsTime(endTime.hours, endTime.minutes, endTime.seconds) : -1
+ newUpdateMode = Internal.MediaClockUpdateMode.MCU_COUNTDOWN
+ newRunningMode = Internal.MediaClockRunningMode.MCR_RUNNING
+ newStartTimeForProgress = Internal.hmsTime(startTime.hours, startTime.minutes, startTime.seconds)
+ resultCode = Common.Result.SUCCESS
+ break
+
+ case Common.ClockUpdateMode.PAUSE:
+ // Already paused or cleared
+ if ((app.mediaClock.runningMode === Internal.MediaClockRunningMode.MCR_STOPPED)
+ || (app.mediaClock.startTime === -1 && app.mediaClock.endTime === -1)) {
+ resultCode = Common.Result.IGNORED
+ sendErrorResponce = true
+ break
+ }
+ newStartTime = app.mediaClock.startTime
+ newEndTime = app.mediaClock.endTime
+ newRunningMode = Internal.MediaClockRunningMode.MCR_STOPPED
+ newUpdateMode = app.mediaClock.updateMode
+ newStartTimeForProgress = app.mediaClock.startTime
+ resultCode = Common.Result.SUCCESS
+ break
+
+ case Common.ClockUpdateMode.RESUME:
+ // Already resumed or cleared
+ if ((app.mediaClock.runningMode === Internal.MediaClockRunningMode.MCR_RUNNING)
+ || (app.mediaClock.startTime === -1 && app.mediaClock.endTime === -1)) {
+ resultCode = Common.Result.IGNORED
+ sendErrorResponce = true
+ break
+ }
+ newStartTime = app.mediaClock.startTime
+ newEndTime = app.mediaClock.endTime
+ newRunningMode = Internal.MediaClockRunningMode.MCR_RUNNING
+ newStartTimeForProgress = app.mediaClock.startTime
+ newUpdateMode = app.mediaClock.updateMode
+ resultCode = Common.Result.SUCCESS
+ break
+
+ case Common.ClockUpdateMode.CLEAR:
+ newStartTime = -1
+ newEndTime = -1
+ newRunningMode = Internal.MediaClockRunningMode.MCR_STOPPED
+ newUpdateMode = app.mediaClock.updateMode
+ newStartTimeForProgress = -1
+ resultCode = Common.Result.SUCCESS
+ break
+ }
+
+ if (sendErrorResponce) {
+ console.debug("exit with result code: ", resultCode)
+ return { __retCode: resultCode }
+ }
+
+ dataContainer.setApplicationProperties(appID, {
+ "mediaClock": {
+ "updateMode": newUpdateMode,
+ "runningMode": newRunningMode,
+ "startTime": newStartTime,
+ "endTime": newEndTime,
+ "startTimeForProgress": newStartTimeForProgress
+ }
+ })
+
+ console.debug("exit")
+ return { __retCode: resultCode }
+ }
+
+ function setGlobalProperties (vrHelpTitle, vrHelp, menuTitle, menuIcon, keyboardProperties, appID) {
+ console.debug("enter: " + vrHelpTitle + ", " + vrHelp + ", " + menuTitle + ", " + menuIcon + ", " + keyboardProperties + ", " + appID)
+ if (vrHelpTitle) {
+ vrHelpPopup.title = vrHelpTitle
+ }
+ dataContainer.setVrHelp(vrHelp)
+ console.debug("exit")
+ }
+
+ function showVrHelp (vrHelpTitle, vrHelp, appID) {
+ console.debug("enter: " + vrHelpTitle + ", " + vrHelp + ", " + appID)
+ if (vrHelpTitle) {
+ vrHelpPopup.title = vrHelpTitle
+ }
+ dataContainer.setVrHelp(vrHelp)
+ vrHelpPopup.show()
+ console.debug("exit")
+ }
+
+ function isReady () {
+ return {
+ available: dataContainer.hmiUIAvailable
+ }
+ }
+
+ function getLanguage () {
+ return {
+ language: dataContainer.hmiUILanguage
+ }
+ }
+
+ function getSupportedLanguages () {
+ return {
+ languages: settingsContainer.sdlLanguagesList
+ }
+ }
+
+ function changeRegistration (language, appID) {
+ dataContainer.changeRegistrationUI(language, appID)
+ }
+
+ function setAppIcon (syncFileName, appID) {
+ dataContainer.setApplicationProperties(appID, { icon: syncFileName.value })
+ }
+
+ function slider (numTicks, position, sliderHeader, sliderFooter, timeout, appID) {
+ console.debug("enter", numTicks, position, sliderHeader, sliderFooter, timeout, appID)
+ if (dataContainer.uiSlider.running) {
+ console.debug("aborted")
+ return {__retCode: Common.Result.ABORTED, sliderPosition: position}
+ }
+
+ dataContainer.uiSlider.appName = dataContainer.getApplication(appID).appName
+ dataContainer.uiSlider.header = sliderHeader
+ dataContainer.uiSlider.footer = sliderFooter
+ dataContainer.uiSlider.numTicks = numTicks
+ dataContainer.uiSlider.position = position
+ dataContainer.uiSlider.timeout = timeout
+
+ if (timeout !== 0) {
+ sliderPopup.showSlider()
+ sliderPopup.async = new Async.AsyncCall();
+ console.debug("exit")
+ return sliderPopup.async;
+ } else {
+ return { sliderPosition: position }
+ }
+ }
+
+ function scrollableMessage (messageText, timeout, softButtons, appID) {
+ console.debug("scrollableMessage ", messageText, timeout, softButtons, appID)
+ if(dataContainer.scrollableMessageModel.running){
+ //send error response if long message already running
+ console.debug("scrollableMessage throw")
+ throw Common.Result.ABORTED
+ }
+
+ dataContainer.scrollableMessageModel.longMessageText = messageText.fieldText
+ dataContainer.scrollableMessageModel.softButtons.clear();
+ if (softButtons !== undefined) {
+ softButtons.forEach(fillSoftButtons, dataContainer.scrollableMessageModel.softButtons);
+ }
+ dataContainer.scrollableMessageModel.timeout = timeout
+ dataContainer.scrollableMessageModel.appId = appID
+ dataContainer.scrollableMessageModel.async = new Async.AsyncCall()
+ contentLoader.go("./views/ScrollableMessageView.qml")
+ console.debug("scrollableMessage exit")
+ return dataContainer.scrollableMessageModel.async
+ }
+
+ function getCapabilities() {
+ return {
+ "audioPassThruCapabilities": {
+ "samplingRate": Common.SamplingRate.RATE_44KHZ,
+ "bitsPerSample": Common.BitsPerSample.RATE_8_BIT,
+ "audioType": Common.AudioType.PCM
+ },
+ "displayCapabilities": settingsContainer.displayCapabilities,
+ "hmiZoneCapabilities": Common.HmiZoneCapabilities.FRONT,
+ "softButtonCapabilities": settingsContainer.softButtonCapabilities
+ }
+ }
+
+ function performAudioPassThru (audioPassThruDisplayTexts, timeout, appID) {
+ console.debug("enter", audioPassThruDisplayTexts, timeout)
+
+ if (dataContainer.uiAudioPassThru.running) {
+ console.debug("aborted")
+ throw Common.Result.ABORTED
+ }
+
+ dataContainer.uiAudioPassThru.appName = dataContainer.getApplication(appID).appName
+ dataContainer.uiAudioPassThru.timeout = timeout
+ if (audioPassThruDisplayTexts.length === 2) {
+ dataContainer.uiAudioPassThru.firstLine = audioPassThruDisplayTexts[0].fieldText
+ dataContainer.uiAudioPassThru.secondLine = audioPassThruDisplayTexts[1].fieldText
+ }
+ performAudioPassThruPopup.async = new Async.AsyncCall();
+ performAudioPassThruPopup.showAudioPassThru()
+ console.debug("exit")
+ return performAudioPassThruPopup.async;
+ }
+
+ function endAudioPassThru () {
+ console.debug("enter")
+ if (!dataContainer.uiAudioPassThru.running) {
+ console.debug("rejected")
+ throw Common.Result.REJECTED
+ }
+ DBus.sendReply({__retCode: Common.Result.SUCCESS})
+ performAudioPassThruPopup.complete(Common.Result.SUCCESS)
+ console.debug("exit")
+ }
+
+ function closePopUp (methodName) {
+ console.debug("enter")
+ var popUpToClose
+
+ if (dataContainer.activePopup.length === 0) {
+ return { __retCode: Common.Result.ABORT, __message: "No active PopUps"}
+ }
+
+ if (methodName !== undefined) {
+ popUpToClose = methodName
+ } else {
+ popUpToClose = dataContainer.activePopup[dataContain.activePopUp.length - 1]
+ }
+
+ switch (popUpToClose) {
+ case "UI.PerformInteraction":
+ interactionPopup.complete(Common.Result.SUCCESS)
+ break
+ case "UI.Slider":
+ sliderPopup.complete(Common.Result.SUCCESS)
+ break
+ case "UI.PerformAudioPassThru":
+ performAudioPassThruPopup.complete(Common.Result.SUCCESS)
+ break
+ case "UI.Alert":
+ alertWindow.complete(Common.Result.SUCCESS)
+ break
+ case "UI.VrHelp":
+ vrHelpPopup.complete(Common.Result.SUCCESS)
+ break
+ }
+ console.debug("exit")
+ }
+
+ function fillSoftButtons(element, index, array) {
+ this.append({
+ type: element.type,
+ text: element.text,
+ image: element.image,
+ isHighlighted: element.isHighlighted,
+ softButtonID: element.softButtonID,
+ systemAction: element.systemAction
+ });
+ }
+
+}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/VR.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/VR.qml
new file mode 100644
index 000000000..37d19f6a4
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/VR.qml
@@ -0,0 +1,93 @@
+/**
+ * @file VR.qml
+ * @brief Implement of interface VR.
+ * Copyright (c) 2013, Ford Motor Company
+ * 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 Ford Motor Company 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 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.
+ */
+
+import QtQuick 1.1
+import "Common.js" as Common
+
+Item {
+ function isReady() {
+ return {
+ available: dataContainer.hmiVRAvailable
+ }
+ }
+
+ function addCommand(cmdID, vrCommands, appID) {
+ console.log("VR.AddCommand: cmd ", cmdID, ", app ", appID);
+ for (var i = 0; i < vrCommands.length; ++i) {
+ dataContainer.vrCommands.append({
+ cmdID: cmdID,
+ command: vrCommands[i],
+ appID: appID === undefined ? 0 : appID,
+ });
+ }
+ console.log("exit")
+ }
+
+ function deleteCommand(cmdID, appID) {
+ console.log("VR.DeleteCommand: cmd ", cmdID, ", app ", appID);
+ for (var i = 0; i < dataContainer.vrCommands.count; ) {
+ if ((dataContainer.vrCommands.get(i).cmdID === cmdID) &&
+ ((appID === undefined) || (dataContainer.vrCommands.get(i).appID === appID))) {
+ dataContainer.vrCommands.remove(i);
+ continue;
+ }
+ ++i;
+ }
+ console.log("exit")
+ }
+
+ function getLanguage() {
+ return {
+ language: dataContainer.hmiTTSVRLanguage
+ }
+ }
+
+ function getSupportedLanguages() {
+ return {
+ languages: settingsContainer.sdlLanguagesList
+ }
+ }
+
+ function getCapabilities() {
+ return {
+ vrCapabilities: [ Common.VrCapabilities.VR_TEXT ]
+ }
+ }
+
+ function changeRegistration(language, appID) {
+ console.debug("enter:", language, appID);
+ dataContainer.changeRegistrationTTSVR(language, appID);
+ console.debug("exit");
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/VehicleInfo.qml b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/VehicleInfo.qml
new file mode 100644
index 000000000..18f3a1ce9
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/qml_model_qt4/hmi_api/VehicleInfo.qml
@@ -0,0 +1,749 @@
+/**
+ * @file VehicleInfo.qml
+ * @brief Vehicle information interface realisation.
+ * Copyright (c) 2013, Ford Motor Company
+ * 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 Ford Motor Company 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 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.
+ */
+
+import QtQuick 1.1
+import "Common.js" as Common
+
+Item {
+ function isReady () {
+ return {
+ available: dataContainer.hmiVehicleInfoAvailable
+ }
+ }
+
+ function getVehicleType() {
+ return {
+ "vehicleType": {
+ "make": "Ford",
+ "model": "Fiesta",
+ "modelYear": "2013",
+ "trim": "SE"
+ }
+ }
+ }
+
+ function getGpsData(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { gps: dataContainer.vehicleInfoModel.gps }
+ }
+
+ function getSpeed(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { speed: dataContainer.vehicleInfoModel.speed }
+ }
+
+ function getRpm(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return {
+ rpm: dataContainer.vehicleInfoModel.rpm,
+ __retCode: Common.Result.DATA_NOT_AVAILABLE
+ }
+ }
+
+ function getFuelLevel(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { fuelLevel: dataContainer.vehicleInfoModel.fuelLevel }
+ }
+
+ function getFuelLevelState(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { fuelLevel_State: dataContainer.vehicleInfoModel.fuelLevel_State }
+ }
+
+ function getInstantFuelConsumption(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { instantFuelConsumption: dataContainer.vehicleInfoModel.instantFuelConsumption }
+ }
+
+ function getExternalTemperature(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { externalTemperature: dataContainer.vehicleInfoModel.externalTemperature }
+ }
+
+ function getVin(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { vin: dataContainer.vehicleInfoModel.vin }
+ }
+
+ function getPrndl(appID) {
+ console.debug("enter")
+ if (dataContainer.vehicleInfoModel.prndl === -1) { // Test value, to check response
+ console.debug("exit")
+ return {
+ prndl: dataContainer.vehicleInfoModel.prndl,
+ __retCode: Common.Result.DATA_NOT_AVAILABLE
+ }
+ }
+ console.debug("exit")
+ return { prndl: dataContainer.vehicleInfoModel.prndl }
+ }
+
+ function getTirePressure(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { tirePressure: dataContainer.vehicleInfoModel.tirePressure }
+ }
+
+ function getOdometer(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { odometer: dataContainer.vehicleInfoModel.odometer }
+ }
+
+ function getBeltStatus(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { beltStatus: dataContainer.vehicleInfoModel.beltStatus }
+ }
+
+ function getBodyInformation(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { bodyInformation: dataContainer.vehicleInfoModel.bodyInformation }
+ }
+
+ function getDeviceStatus(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { deviceStatus: dataContainer.vehicleInfoModel.deviceStatus }
+ }
+
+ function getDriverBraking(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { driverBraking: dataContainer.vehicleInfoModel.driverBraking }
+ }
+
+ function getWiperStatus(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { wiperStatus: dataContainer.vehicleInfoModel.wiperStatus }
+ }
+
+ function getHeadLampStatus(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { headLampStatus: dataContainer.vehicleInfoModel.headLampStatus }
+ }
+
+ function getEngineTorque(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { engineTorque: dataContainer.vehicleInfoModel.engineTorque }
+ }
+
+ function getAccPedalPosition(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { accPedalPosition: dataContainer.vehicleInfoModel.accPedalPosition }
+ }
+
+ function getSteeringWheelAngle(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { steeringWheelAngle: dataContainer.vehicleInfoModel.steeringWheelAngle }
+ }
+
+ function getECallInfo(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { eCallInfo: dataContainer.vehicleInfoModel.eCallInfo }
+ }
+
+ function getAirbagStatus(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { airbagStatus: dataContainer.vehicleInfoModel.airbagStatus }
+ }
+
+ function getEmergencyEvent(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { emergencyEvent: dataContainer.vehicleInfoModel.emergencyEvent }
+ }
+
+ function getClusterModeStatus(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { clusterModeStatus: dataContainer.vehicleInfoModel.clusterModeStatus }
+ }
+
+ function getMyKey(appID) {
+ console.debug("enter")
+ console.debug("exit")
+ return { myKey: dataContainer.vehicleInfoModel.myKey }
+ }
+
+ function getDTCs(ecuName, dtcMask, appID) {
+ var ecuHeader = 2
+ var dtc = []
+
+ for (var i = 0; i < 3; i++) {
+ dtc.push("line" + i)
+ }
+ return {ecuHeader: ecuHeader, dtc: dtc}
+ }
+
+ function readDID(ecuName, didLocation, appID) {
+ console.debug("Enter")
+ //TODO{ALeshin}: refactoring of this function, when we'll have Vehicle Info module
+ var didResult = []
+
+ for (var i = 0; i < didLocation.length; i++) {
+ if (i < 10) {
+ didResult[i] = {}
+ didResult[i].resultCode = Common.VehicleDataResultCode.VDRC_SUCCESS
+ didResult[i].didLocation = didLocation[i]
+ didResult[i].data = '0'
+ }
+ else {
+ didResult[i] = {}
+ didResult[i].resultCode = Common.VehicleDataResultCode.VDRC_DATA_NOT_AVAILABLE
+ didResult[i].didLocation = didLocation[i]
+ didResult[i].data = '0'
+ }
+ }
+ console.debug("Exit")
+ return {didResult: didResult}
+ }
+
+ function subscribeGps(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onGpsChanged.disconnect(model.sendGpsChange)
+ model.onGpsChanged.connect(model.sendGpsChange)
+ console.debug("exit")
+ return {gps:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_GPS,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS} }
+ }
+ function unsubscribeGps(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onGpsChanged.disconnect(model.sendGpsChange)
+ console.debug("exit")
+ return {gps:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_GPS,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS} }
+
+ }
+
+ function subscribeSpeed(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onSpeedChanged.disconnect(model.sendSpeedChange)
+ model.onSpeedChanged.connect(model.sendSpeedChange)
+ console.debug("exit")
+ return { speed:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_SPEED,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeSpeed(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onSpeedChanged.disconnect(model.sendSpeedChange)
+ console.debug("exit")
+ return { speed:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_SPEED,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeRpm(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onRpmChanged.disconnect(model.sendRpmChange)
+ model.onRpmChanged.connect(model.sendRpmChange)
+ console.debug("exit")
+ return { rpm:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_RPM,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeRpm(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onRpmChanged.disconnect(model.sendRpmChange)
+ console.debug("exit")
+ return { rpm:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_RPM,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeFuelLevel(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onFuelLevelChanged.disconnect(model.sendFuelLevelChange)
+ model.onFuelLevelChanged.connect(model.sendFuelLevelChange)
+ console.debug("exit")
+ return { fuelLevel:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_FUELLEVEL,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeFuelLevel(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onFuelLevelChanged.disconnect(model.sendFuelLevelChange)
+ console.debug("exit")
+ return { fuelLevel:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_FUELLEVEL,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeFuelLevel_State(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onFuelLevel_StateChanged.disconnect(model.sendFuelLevel_StateChange)
+ model.onFuelLevel_StateChanged.connect(model.sendFuelLevel_StateChange)
+ console.debug("exit")
+ return { fuelLevel_State:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_FUELLEVEL_STATE,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeFuelLevel_State(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onFuelLevel_StateChanged.disconnect(model.sendFuelLevel_StateChange)
+ console.debug("exit")
+ return { fuelLevel_State:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_FUELLEVEL_STATE,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeInstantFuelConsumption(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onInstantFuelConsumptionChanged.disconnect(model.sendInstantFuelConsumptionChange)
+ model.onInstantFuelConsumptionChanged.connect(model.sendInstantFuelConsumptionChange)
+ console.debug("exit")
+ return { instantFuelConsumption:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_FUELCONSUMPTION,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeInstantFuelConsumption(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onInstantFuelConsumptionChanged.disconnect(model.sendInstantFuelConsumptionChange)
+ console.debug("exit")
+ return { instantFuelConsumption:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_FUELCONSUMPTION,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeExternalTemperature(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onExternalTemperatureChanged.disconnect(model.sendExternalTemperatureChange)
+ model.onExternalTemperatureChanged.connect(model.sendExternalTemperatureChange)
+ console.debug("exit")
+ return { externalTemperature:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_EXTERNTEMP,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeExternalTemperature(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onExternalTemperatureChanged.disconnect(model.sendExternalTemperatureChange)
+ console.debug("exit")
+ return { externalTemperature:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_EXTERNTEMP,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribePrndl(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onPrndlChanged.disconnect(model.sendPrndlChange)
+ model.onPrndlChanged.connect(model.sendPrndlChange)
+ console.debug("exit")
+ return { prndl:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_PRNDL,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribePrndl(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onPrndlChanged.disconnect(model.sendPrndlChange)
+ console.debug("exit")
+ return { prndl:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_PRNDL,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeVin(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onVinChanged.disconnect(model.sendVinChange)
+ model.onVinChanged.connect(model.sendVinChange)
+ console.debug("exit")
+ return { vin:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_VIN,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeVin(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onVinChanged.disconnect(model.sendVinChange)
+ console.debug("exit")
+ return { vin:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_VIN,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeTirePressure(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onTirePressureChanged.disconnect(model.sendTirePressureChange)
+ model.onTirePressureChanged.connect(model.sendTirePressureChange)
+ console.debug("exit")
+ return { tirePressure:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_TIREPRESSURE,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeTirePressure(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onTirePressureChanged.disconnect(model.sendTirePressureChange)
+ console.debug("exit")
+ return { tirePressure:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_TIREPRESSURE,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeOdometer(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onOdometerChanged.disconnect(model.sendOdometerChange)
+ model.onOdometerChanged.connect(model.sendOdometerChange)
+ console.debug("exit")
+ return { odometer:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_ODOMETER,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeOdometer(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onOdometerChanged.disconnect(model.sendOdometerChange)
+ console.debug("exit")
+ return { odometer:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_ODOMETER,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeBeltStatus(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onBeltStatusChanged.disconnect(model.sendBeltStatusChange)
+ model.onBeltStatusChanged.connect(model.sendBeltStatusChange)
+ console.debug("exit")
+ return { beltStatus:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_BELTSTATUS,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeBeltStatus(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onBeltStatusChanged.disconnect(model.sendBeltStatusChange)
+ console.debug("exit")
+ return { beltStatus:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_BELTSTATUS,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeBodyInformation(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onBodyInformationChanged.disconnect(model.sendBodyInformationChange)
+ model.onBodyInformationChanged.connect(model.sendBodyInformationChange)
+ console.debug("exit")
+ return { bodyInformation:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_BODYINFO,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeBodyInformation(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onBodyInformationChanged.disconnect(model.sendBodyInformationChange)
+ console.debug("exit")
+ return { bodyInformation:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_BODYINFO,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeDeviceStatus(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onDeviceStatusChanged.disconnect(model.sendDeviceStatusChange)
+ model.onDeviceStatusChanged.connect(model.sendDeviceStatusChange)
+ console.debug("exit")
+ return { deviceStatus:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_DEVICESTATUS,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeDeviceStatus(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onDeviceStatusChanged.disconnect(model.sendDeviceStatusChange)
+ console.debug("exit")
+ return { deviceStatus:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_DEVICESTATUS,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeDriverBraking(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onDriverBrakingChanged.disconnect(model.sendDriverBrakingChange)
+ model.onDriverBrakingChanged.connect(model.sendDriverBrakingChange)
+ console.debug("exit")
+ return { driverBraking:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_BRAKING,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeDriverBraking(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onDriverBrakingChanged.disconnect(model.sendDriverBrakingChange)
+ console.debug("exit")
+ return { driverBraking:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_BRAKING,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeWiperStatus(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onWiperStatusChanged.disconnect(model.sendWiperStatusChange)
+ model.onWiperStatusChanged.connect(model.sendWiperStatusChange)
+ console.debug("exit")
+ return { wiperStatus:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_WIPERSTATUS,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeWiperStatus(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onWiperStatusChanged.disconnect(model.sendWiperStatusChange)
+ console.debug("exit")
+ return { wiperStatus:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_WIPERSTATUS,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeHeadLampStatus(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onHeadLampStatusChanged.disconnect(model.sendHeadLampStatusChange)
+ model.onHeadLampStatusChanged.connect(model.sendHeadLampStatusChange)
+ console.debug("exit")
+ return { headLampStatus:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_HEADLAMPSTATUS,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeHeadLampStatus(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onHeadLampStatusChanged.disconnect(model.sendHeadLampStatusChange)
+ console.debug("exit")
+ return { headLampStatus:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_HEADLAMPSTATUS,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeEngineTorque(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onEngineTorqueChanged.disconnect(model.sendEngineTorqueChange)
+ model.onEngineTorqueChanged.connect(model.sendEngineTorqueChange)
+ console.debug("exit")
+ return { engineTorque:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_ENGINETORQUE,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeEngineTorque(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onEngineTorqueChanged.disconnect(model.sendEngineTorqueChange)
+ console.debug("exit")
+ return { engineTorque:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_ENGINETORQUE,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeAccPedalPosition(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onAccPedalPositionChanged.disconnect(model.sendAccPedalPositionChange)
+ model.onAccPedalPositionChanged.connect(model.sendAccPedalPositionChange)
+ console.debug("exit")
+ return { accPedalPosition:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_ACCPEDAL,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeAccPedalPosition(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onAccPedalPositionChanged.disconnect(model.sendAccPedalPositionChange)
+ console.debug("exit")
+ return { accPedalPosition:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_ACCPEDAL,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeSteeringWheelAngle(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onSteeringWheelAngleChanged.disconnect(model.sendSteeringWheelAngleChange)
+ model.onSteeringWheelAngleChanged.connect(model.sendSteeringWheelAngleChange)
+ console.debug("exit")
+ return { steeringWheelAngle:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_STEERINGWHEEL,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeSteeringWheelAngle(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onSteeringWheelAngleChanged.disconnect(model.sendSteeringWheelAngleChange)
+ console.debug("exit")
+ return { steeringWheelAngle:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_STEERINGWHEEL,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeECallInfo(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onECallInfoChanged.disconnect(model.sendECallInfoChange)
+ model.onECallInfoChanged.connect(model.sendECallInfoChange)
+ console.debug("exit")
+ return { eCallInfo:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_ECALLINFO,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeECallInfo(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onECallInfoChanged.disconnect(model.sendECallInfoChange)
+ console.debug("exit")
+ return { eCallInfo:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_ECALLINFO,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeAirbagStatus(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onAirbagStatusChanged.disconnect(model.sendAirbagStatusChange)
+ model.onAirbagStatusChanged.connect(model.sendAirbagStatusChange)
+ console.debug("exit")
+ return { airbagStatus:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_AIRBAGSTATUS,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeAirbagStatus(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onAirbagStatusChanged.disconnect(model.sendAirbagStatusChange)
+ console.debug("exit")
+ return { airbagStatus:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_AIRBAGSTATUS,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeEmergencyEvent(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onEmergencyEventChanged.disconnect(model.sendEmergencyEventChange)
+ model.onEmergencyEventChanged.connect(model.sendEmergencyEventChange)
+ console.debug("exit")
+ return { emergencyEvent:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_EMERGENCYEVENT,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeEmergencyEvent(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onEmergencyEventChanged.disconnect(model.sendEmergencyEventChange)
+ console.debug("exit")
+ return { emergencyEvent:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_EMERGENCYEVENT,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeClusterModeStatus(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onClusterModeStatusChanged.disconnect(model.sendClusterModeStatusChange)
+ model.onClusterModeStatusChanged.connect(model.sendClusterModeStatusChange)
+ console.debug("exit")
+ return { clusterModeStatus:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_CLUSTERMODESTATUS,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeClusterModeStatus(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onClusterModeStatusChanged.disconnect(model.sendClusterModeStatusChange)
+ console.debug("exit")
+ return { clusterModeStatus:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_CLUSTERMODESTATUS,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+
+ function subscribeMyKey(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onMyKeyChanged.disconnect(model.sendMyKeyChange)
+ model.onMyKeyChanged.connect(model.sendMyKeyChange)
+ console.debug("exit")
+ return { myKey:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_MYKEY,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+ function unsubscribeMyKey(appID) {
+ console.debug("enter")
+ var model = dataContainer.vehicleInfoModel;
+ model.onMyKeyChanged.disconnect(model.sendMyKeyChange)
+ console.debug("exit")
+ return { myKey:
+ { dataType: Common.VehicleDataType.VEHICLEDATA_MYKEY,
+ resultCode: Common.VehicleDataResultCode.VDRC_SUCCESS } }
+ }
+}