--- /dev/null
+\1d4Ezay^ק<yi'\1a*';(*'-N)z:\ enx:\bRǂi^^笴ǭO9$ySgږ爞ZDžYh\17ږǜzۭ\7fקoj[nruZ\ 6\a\18L
+w>\14\1e\ 3^7\10\ 4k\e\15͆
SDL.TBTClientStateView,\r
SDL.DriverDistraction,\r
SDL.ExitApp,\r
+ SDL.SystemRequest,\r
SDL.ControlButtons\r
],\r
\r
*/
showVRHelpItems: function() {
-// if (SDL.SDLAppController.model) {
-// if (SDL.SDLModel.VRActive && SDL.SDLModel.interactionData.vrHelp) {
-//
-// SDL.SDLModel.ShowVrHelp(SDL.SDLModel.interactionData.vrHelpTitle, SDL.SDLModel.interactionData.vrHelp);
-// } else if (SDL.SDLModel.VRActive && !SDL.SDLModel.interactionData.vrHelp && SDL.SDLAppController.model.globalProperties.vrHelp) {
-//
-// if (SDL.SDLAppController.model) {
-// SDL.SDLModel.ShowVrHelp(SDL.SDLAppController.model.globalProperties.vrHelpTitle, SDL.SDLAppController.model.globalProperties.vrHelp );
-// }
-// } else {
-// if (SDL.VRHelpListView.active) {
-// SDL.VRHelpListView.deactivate();
-// }
-// }
-// }
+ if (SDL.SDLAppController.model) {
+ if (SDL.SDLModel.VRActive && SDL.SDLModel.interactionData.vrHelp) {
+
+ SDL.SDLModel.ShowVrHelp(SDL.SDLModel.interactionData.vrHelpTitle, SDL.SDLModel.interactionData.vrHelp);
+ } else if (SDL.SDLModel.VRActive && !SDL.SDLModel.interactionData.vrHelp && SDL.SDLAppController.model.globalProperties.vrHelp) {
+
+ if (SDL.SDLAppController.model) {
+ SDL.SDLModel.ShowVrHelp(SDL.SDLAppController.model.globalProperties.vrHelpTitle, SDL.SDLAppController.model.globalProperties.vrHelp );
+ }
+ } else {
+ if (SDL.VRHelpListView.active) {
+ SDL.VRHelpListView.deactivate();
+ }
+ }
+ }
}.observes('SDL.SDLModel.VRActive', 'SDL.SDLModel.interactionData.vrHelp'),
/**
FFW.BasicCommunication.ExitAllApplications(state);
},
/**
+ * Method to sent notification with selected reason of OnSystemRequest
+ *
+ * @param {String}
+ */
+ systemRequestViewSelected: function(state) {
+
+ FFW.BasicCommunication.OnSystemRequest(state);
+ },
+ /**
* Method to sent notification ABORTED for PerformInteractionChoise
*/
interactionChoiseCloseResponse: function(appID, result, choiceID, manualTextEntry) {
id: 9
}
],
+
/**
* List of states for ExitApplication notification
*/
],
/**
+ * List of states for OnSystemRequest notification
+ */
+ systemRequestState: [
+ {
+ name: "HTTP",
+ id : 0
+ },
+ {
+ name: "FILE_RESUME",
+ id : 1
+ },
+ {
+ name: "AUTH_REQUEST",
+ id : 2
+ },
+ {
+ name: "AUTH_CHALLENGE",
+ id : 3
+ },
+ {
+ name: "AUTH_ACK",
+ id : 4
+ },
+ {
+ name: "PROPRIETARY",
+ id : 5
+ }
+ ],
+
+ /**
* Data for AudioPassThruPopUp that contains params for visualisation
*
* @type {Object}
'buttonControls',
'driverDistractionControl',
'infoTable',
- 'sendData',
'vehicleInfo',
'tbtClientState',
'ExitApp',
+ 'SystemRequest',
'UILanguages',
'TTSVRLanguages',
'UILanguagesLabel',
}),
/**
- * Sending data from HMI for processing in SDLCore
- */
- sendData: SDL.Button.create( {
- elementId: 'sendData',
- classNames: 'sendData btnNotPressed',
- action: function() {
-
- FFW.BasicCommunication.OnSystemRequest();
- },
- text: 'OnSystemRequest',
- templateName: 'text'
- }),
-
- /**
* VehicleInfo button
*/
vehicleInfo: SDL.Button.create( {
}),
/**
+ * Exit Application button opens Exit Application reasons popup
+ */
+ SystemRequest: SDL.Button.create( {
+ elementId: 'systemRequest',
+ classNames: 'systemRequest btn',
+ text: 'System Request',
+ action: function() {
+
+ // this._super();
+ SDL.SystemRequest.toggleActivity();
+ },
+ templateName: 'text'
+ }),
+
+ /**
* Voice Recognition button
*/
VRButton: SDL.Button.create( {
--- /dev/null
+/*
+ * 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.
+ */
+/**
+ * @name SDL.systemRequest
+ * @desc Exit All Applications reason select visual representation
+ * @category View
+ * @filesource app/view/sdl/systemRequestView.js
+ * @version 1.0
+ */
+
+SDL.SystemRequest = Em.ContainerView.create( {
+
+ elementId: 'systemRequestView',
+
+ classNames: 'systemRequestView',
+
+ classNameBindings:
+ [
+ 'active'
+ ],
+
+ childViews:
+ [
+ 'systemRequestViewLabel',
+ 'systemRequestViewTitle',
+ 'systemRequestViewSelect'
+ ],
+
+ /**
+ * Title of VehicleInfo PopUp view
+ */
+ systemRequestViewLabel: SDL.Label.extend( {
+
+ elementId: 'systemRequestViewLabel',
+
+ classNames: 'systemRequestViewLabel',
+
+ content: 'System Request'
+ } ),
+
+ /**
+ * Property indicates the activity state of TBTClientStateView
+ */
+ active: false,
+
+ /**
+ * Title of tbtClientState group of parameters
+ */
+ systemRequestViewTitle: SDL.Label.extend( {
+
+ elementId: 'systemRequestViewTitle',
+
+ classNames: 'systemRequestViewTitle',
+
+ content: 'System Request reason'
+ } ),
+
+ /**
+ * HMI element Select with parameters of TBTClientStates
+ */
+ systemRequestViewSelect: Em.Select.extend( {
+
+ elementId: 'systemRequestViewSelect',
+
+ classNames: 'systemRequestViewSelect',
+
+ contentBinding: 'SDL.SDLModel.systemRequestState',
+
+ optionValuePath: 'content.id',
+
+ optionLabelPath: 'content.name',
+
+ /**
+ * Selected data sent on model for further processing
+ */
+ click: function() {
+
+ SDL.SDLController.systemRequestViewSelected( this.selection.name );
+
+ }
+ } ),
+
+ /**
+ * Trigger function that activates and deactivates tbtClientStateView
+ */
+ toggleActivity: function() {
+ this.toggleProperty( 'active' );
+ }
+} );
\ No newline at end of file
top: 55px !important;
}
-#app_controlButtons .sendData {
+#app_controlButtons .systemRequest {
top: 252px !important;
- left: 1049px !important;
+ left: 1059px !important;
width: 150px !important;
font-size: 16px !important;
+ text-align: center;
+ line-height: 48px;
}
#app_controlButtons .btnNotPressed {
line-height: 48px;
}
-#exitAppView,#tbtClientStateView,#VehicleInfo {
+#exitAppView,#tbtClientStateView,#VehicleInfo,#systemRequestView {
opacity: 0;
left: 50px;
width: 700px;
border: 1px solid white;
}
-#exitAppView .exitAppViewLabel,#tbtClientStateView .tbtClientStateLabel,#VehicleInfo .vehicleInfoLabel
+#exitAppView .exitAppViewLabel,#systemRequestView .systemRequestViewLabel, #tbtClientStateView .tbtClientStateLabel,#VehicleInfo .vehicleInfoLabel
{
top: 10px;
width: 600px;
background: #393939;
}
-#exitAppView.active,#tbtClientStateView.active,#VehicleInfo.active {
+#exitAppView.active,#systemRequestView.active,#tbtClientStateView.active,#VehicleInfo.active {
opacity: 1;
display: block;
}
-#exitAppView .exitAppViewTitle,#tbtClientStateView .tbtClientState,#VehicleInfo .prndl
+#exitAppView .exitAppViewTitle, #systemRequestView .systemRequestViewTitle, #tbtClientStateView .tbtClientState,#VehicleInfo .prndl
{
top: 70px;
width: 600px;
background: #535353;
}
-#exitAppView .exitAppViewSelect,#tbtClientStateView .tbtClientStateSelect,#VehicleInfo .prndlSelect
+#exitAppView .exitAppViewSelect, #systemRequestView .systemRequestViewSelect, #tbtClientStateView .tbtClientStateSelect,#VehicleInfo .prndlSelect
{
top: 125px;
position: absolute;
componentName: "BasicCommunication"
}),
+
+ //OnPutFile
+
+
+ onPutFileSubscribeRequestID: -1,
onFileRemovedSubscribeRequestID: -1,
onAppRegisteredSubscribeRequestID: -1,
onAppUnregisteredSubscribeRequestID: -1,
onPlayToneSubscribeRequestID: -1,
onSDLCloseSubscribeRequestID: -1,
+ onPutFileUnsubscribeRequestID: -1,
onFileRemovedUnsubscribeRequestID: -1,
onAppRegisteredUnsubscribeRequestID: -1,
onAppUnregisteredUnsubscribeRequestID: -1,
onSDLCloseUnsubscribeRequestID: -1,
// const
+ onPutFileNotification: "BasicCommunication.OnPutFile",
onFileRemovedNotification: "BasicCommunication.OnFileRemoved",
onAppRegisteredNotification: "BasicCommunication.OnAppRegistered",
onAppUnregisteredNotification: "BasicCommunication.OnAppUnregistered",
this._super();
// subscribe to notifications
+ this.onPutFileSubscribeRequestID = this.client
+ .subscribeToNotification(this.onPutFileNotification);
this.onFileRemovedSubscribeRequestID = this.client
.subscribeToNotification(this.onFileRemovedNotification);
this.onAppRegisteredSubscribeRequestID = this.client
// unsubscribe from notifications
+ this.onPutFileUnsubscribeRequestID = this.client
+ .unsubscribeFromNotification(this.onPutFileNotification);
this.onFileRemovedUnsubscribeRequestID = this.client
.unsubscribeFromNotification(this.onFileRemovedNotification);
this.onAppRegisteredUnsubscribeRequestID = this.client
/**
* Initiated by HMI.
*/
- OnSystemRequest: function() {
+ OnSystemRequest: function(type) {
Em.Logger.log("FFW.BasicCommunication.OnSystemRequest");
"jsonrpc": "2.0",
"method": "BasicCommunication.OnSystemRequest",
"params":{
- "requestType": "HTTP",
+ "requestType": type,
"url": ["http://127.0.0.1"],
"fileType": "JSON",
"offset": 1000,
"length": 10000,
- "timeout": 500
+ "timeout": 500,
+ "fileName": document.location.pathname.replace("index.html", "IVSU/PROPRIETARY_REQUEST"),
+ "appID": SDL.SDLAppController.model ? SDL.SDLAppController.model.appID : null
}
};
this.client.send(JSONMessage);
<script type="text/javascript" src="app/view/sdl/tbtClientStateView.js"></script>\r
<script type="text/javascript" src="app/view/sdl/driverDistraction.js"></script>\r
<script type="text/javascript" src="app/view/sdl/ExitAppView.js"></script>\r
+ <script type="text/javascript" src="app/view/sdl/SystemRequestView.js"></script>\r
\r
\r
\r