diff options
author | kboskin <kboskin> | 2020-06-16 13:51:07 +0300 |
---|---|---|
committer | kboskin <kboskin> | 2020-06-16 13:51:07 +0300 |
commit | 24b5395210f9414aa70bfa8b8c7ab9901fdda717 (patch) | |
tree | c5103e10eaa0141ca891bec0d2e56b73e767b707 /base/src/main/java/com/smartdevicelink/proxy | |
parent | 230737e50c21d7de5e25f8fdb3ac1a8c77d06aff (diff) | |
download | sdl_android-24b5395210f9414aa70bfa8b8c7ab9901fdda717.tar.gz |
Implement code changes related to HandsOffSteering
Diffstat (limited to 'base/src/main/java/com/smartdevicelink/proxy')
8 files changed, 330 insertions, 198 deletions
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleData.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleData.java index 0f4e70f9b..e8a77aca8 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleData.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleData.java @@ -1,34 +1,34 @@ -/* - * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc. - * 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 SmartDeviceLink Consortium, Inc. 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. - */ +/*
+ * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
+ * 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 SmartDeviceLink Consortium, Inc. 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.
+ */
package com.smartdevicelink.proxy.rpc;
import com.smartdevicelink.protocol.enums.FunctionID;
@@ -287,8 +287,9 @@ public class GetVehicleData extends RPCRequest { public static final String KEY_TURN_SIGNAL = "turnSignal";
public static final String KEY_ELECTRONIC_PARK_BRAKE_STATUS = "electronicParkBrakeStatus";
public static final String KEY_CLOUD_APP_VEHICLE_ID = "cloudAppVehicleID";
+ public static final String KEY_HANDS_OFF_STEERING = "handsOffSteering";
- /**
+ /**
* Constructs a new GetVehicleData object
*/
@@ -540,21 +541,37 @@ public class GetVehicleData extends RPCRequest { public Boolean getCloudAppVehicleID(){
return getBoolean(KEY_CLOUD_APP_VEHICLE_ID);
}
- - /** - * Sets a boolean value for OEM Custom VehicleData. - * @param vehicleDataName a String value - * @param vehicleDataState a boolean value - */ - public void setOEMCustomVehicleData(String vehicleDataName, Boolean vehicleDataState){ - setParameters(vehicleDataName, vehicleDataState); - } - - /** - * Gets a boolean value for OEM Custom VehicleData. - * @return a Boolean value. - */ - public Boolean getOEMCustomVehicleData(String vehicleDataName){ - return getBoolean(vehicleDataName); - } -} +
+ /**
+ * Sets a boolean value for OEM Custom VehicleData.
+ * @param vehicleDataName a String value
+ * @param vehicleDataState a boolean value
+ */
+ public void setOEMCustomVehicleData(String vehicleDataName, Boolean vehicleDataState){
+ setParameters(vehicleDataName, vehicleDataState);
+ }
+
+ /**
+ * Gets a boolean value for OEM Custom VehicleData.
+ * @return a Boolean value.
+ */
+ public Boolean getOEMCustomVehicleData(String vehicleDataName){
+ return getBoolean(vehicleDataName);
+ }
+
+ /**
+ * Gets a boolean value for HandsOffSteering. If true, means the handsOffSteering has been subscribed.
+ * @return a Boolean value.
+ */
+ public Boolean getHandsOffSteering(){
+ return getBoolean(KEY_HANDS_OFF_STEERING);
+ }
+
+ /**
+ * Sets a boolean value
+ * @param handsOffSteering a boolean value
+ */
+ public void setHandsOffSteering(boolean handsOffSteering){
+ setParameters(KEY_HANDS_OFF_STEERING, handsOffSteering);
+ }
+}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java index 60b3b7cc4..3ed770921 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java @@ -1,34 +1,34 @@ -/* - * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc. - * 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 SmartDeviceLink Consortium, Inc. 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. - */ +/*
+ * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
+ * 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 SmartDeviceLink Consortium, Inc. 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.
+ */
package com.smartdevicelink.proxy.rpc;
@@ -84,6 +84,7 @@ public class GetVehicleDataResponse extends RPCResponse { public static final String KEY_TURN_SIGNAL = "turnSignal";
public static final String KEY_ELECTRONIC_PARK_BRAKE_STATUS = "electronicParkBrakeStatus";
public static final String KEY_CLOUD_APP_VEHICLE_ID = "cloudAppVehicleID";
+ public static final String KEY_HANDS_OFF_STEERING = "handsOffSteering";
/**
* Constructs a new GetVehicleDataResponse object
@@ -372,22 +373,38 @@ public class GetVehicleDataResponse extends RPCResponse { public String getCloudAppVehicleID(){
return getString(KEY_CLOUD_APP_VEHICLE_ID);
}
- - - /** - * Sets a value for OEM Custom VehicleData. - * @param vehicleDataName a String value - * @param vehicleDataState a VehicleDataResult value - */ - public void setOEMCustomVehicleData(String vehicleDataName, Object vehicleDataState){ - setParameters(vehicleDataName, vehicleDataState); - } - - /** - * Gets a VehicleData value for the vehicle data item. - * @return a Object related to the vehicle data - */ - public Object getOEMCustomVehicleData(String vehicleDataName){ - return getParameters(vehicleDataName); - } -} +
+
+ /**
+ * Sets a value for OEM Custom VehicleData.
+ * @param vehicleDataName a String value
+ * @param vehicleDataState a VehicleDataResult value
+ */
+ public void setOEMCustomVehicleData(String vehicleDataName, Object vehicleDataState){
+ setParameters(vehicleDataName, vehicleDataState);
+ }
+
+ /**
+ * Gets a VehicleData value for the vehicle data item.
+ * @return a Object related to the vehicle data
+ */
+ public Object getOEMCustomVehicleData(String vehicleDataName){
+ return getParameters(vehicleDataName);
+ }
+
+ /**
+ * Gets a boolean value for HandsOffSteering. If true, means the handsOffSteering has been subscribed.
+ * @return a Boolean value.
+ */
+ public Boolean getHandsOffSteering(){
+ return getBoolean(KEY_HANDS_OFF_STEERING);
+ }
+
+ /**
+ * Sets a boolean value
+ * @param handsOffSteering a boolean value
+ */
+ public void setHandsOffSteering(boolean handsOffSteering){
+ setParameters(KEY_HANDS_OFF_STEERING, handsOffSteering);
+ }
+}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/OnVehicleData.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/OnVehicleData.java index 3dea74d1d..086ee10d6 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/OnVehicleData.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/OnVehicleData.java @@ -1,34 +1,34 @@ -/* - * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc. - * 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 SmartDeviceLink Consortium, Inc. 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. - */ +/*
+ * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
+ * 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 SmartDeviceLink Consortium, Inc. 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.
+ */
package com.smartdevicelink.proxy.rpc;
import com.smartdevicelink.protocol.enums.FunctionID;
@@ -324,6 +324,7 @@ public class OnVehicleData extends RPCNotification { public static final String KEY_TURN_SIGNAL = "turnSignal";
public static final String KEY_ELECTRONIC_PARK_BRAKE_STATUS = "electronicParkBrakeStatus";
public static final String KEY_CLOUD_APP_VEHICLE_ID = "cloudAppVehicleID";
+ public static final String KEY_HANDS_OFF_STEERING = "handsOffSteering";
public OnVehicleData() {
@@ -582,21 +583,37 @@ public class OnVehicleData extends RPCNotification { public String getCloudAppVehicleID(){
return getString(KEY_CLOUD_APP_VEHICLE_ID);
}
- - /** - * Sets a value for OEM Custom VehicleData. - * @param vehicleDataName a String value - * @param vehicleDataState a VehicleDataResult value - */ - public void setOEMCustomVehicleData(String vehicleDataName, Object vehicleDataState){ - setParameters(vehicleDataName, vehicleDataState); - } - - /** - * Gets a VehicleData value for the vehicle data item. - * @return a Object related to the vehicle data - */ - public Object getOEMCustomVehicleData(String vehicleDataName){ - return getParameters(vehicleDataName); - } -} +
+ /**
+ * Sets a value for OEM Custom VehicleData.
+ * @param vehicleDataName a String value
+ * @param vehicleDataState a VehicleDataResult value
+ */
+ public void setOEMCustomVehicleData(String vehicleDataName, Object vehicleDataState){
+ setParameters(vehicleDataName, vehicleDataState);
+ }
+
+ /**
+ * Gets a VehicleData value for the vehicle data item.
+ * @return a Object related to the vehicle data
+ */
+ public Object getOEMCustomVehicleData(String vehicleDataName){
+ return getParameters(vehicleDataName);
+ }
+
+ /**
+ * Gets a boolean value for HandsOffSteering
+ * @return a Boolean value.
+ */
+ public Boolean getHandsOffSteering(){
+ return getBoolean(KEY_HANDS_OFF_STEERING);
+ }
+
+ /**
+ * Sets a boolean value
+ * @param handsOffSteering a boolean value
+ */
+ public void setHandsOffSteering(boolean handsOffSteering){
+ setParameters(KEY_HANDS_OFF_STEERING, handsOffSteering);
+ }
+}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java index b2e299e24..3e057ce52 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java @@ -1,34 +1,34 @@ -/* - * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc. - * 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 SmartDeviceLink Consortium, Inc. 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. - */ +/*
+ * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
+ * 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 SmartDeviceLink Consortium, Inc. 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.
+ */
package com.smartdevicelink.proxy.rpc;
import com.smartdevicelink.protocol.enums.FunctionID;
@@ -273,6 +273,14 @@ import java.util.Hashtable; * <td>Subscribable</td>
* <td>SmartDeviceLink 5.1 </td>
* </tr>
+ * <tr>
+ * <td>handsOffSteering</td>
+ * <td>Boolean</td>
+ * <td>To indicate whether driver hands are off the steering wheel</td>
+ * <td>N</td>
+ * <td>Subscribable</td>
+ * <td>SmartDeviceLink 5.1 </td>
+ * </tr>
* </table>
*
* <p> <b>Response</b></p>
@@ -322,6 +330,7 @@ public class SubscribeVehicleData extends RPCRequest { public static final String KEY_TURN_SIGNAL = "turnSignal";
public static final String KEY_ELECTRONIC_PARK_BRAKE_STATUS = "electronicParkBrakeStatus";
public static final String KEY_CLOUD_APP_VEHICLE_ID = "cloudAppVehicleID";
+ public static final String KEY_HANDS_OFF_STEERING = "handsOffSteering";
/**
* Constructs a new SubscribeVehicleData object
@@ -864,21 +873,37 @@ public class SubscribeVehicleData extends RPCRequest { public Boolean getCloudAppVehicleID(){
return getBoolean(KEY_CLOUD_APP_VEHICLE_ID);
}
- - /** - * Sets a boolean value for OEM Custom VehicleData. - * @param vehicleDataName a String value - * @param vehicleDataState a boolean value - */ - public void setOEMCustomVehicleData(String vehicleDataName, Boolean vehicleDataState){ - setParameters(vehicleDataName, vehicleDataState); - } - - /** - * Gets a boolean value for OEM Custom VehicleData. - * @return a Boolean value. - */ - public Boolean getOEMCustomVehicleData(String vehicleDataName){ - return getBoolean(vehicleDataName); - } -} +
+ /**
+ * Sets a boolean value for OEM Custom VehicleData.
+ * @param vehicleDataName a String value
+ * @param vehicleDataState a boolean value
+ */
+ public void setOEMCustomVehicleData(String vehicleDataName, Boolean vehicleDataState){
+ setParameters(vehicleDataName, vehicleDataState);
+ }
+
+ /**
+ * Gets a boolean value for OEM Custom VehicleData.
+ * @return a Boolean value.
+ */
+ public Boolean getOEMCustomVehicleData(String vehicleDataName){
+ return getBoolean(vehicleDataName);
+ }
+
+ /**
+ * Gets a boolean value for HandsOffSteering. If true, means the handsOffSteering has been subscribed.
+ * @return a Boolean value.
+ */
+ public Boolean getHandsOffSteering(){
+ return getBoolean(KEY_HANDS_OFF_STEERING);
+ }
+
+ /**
+ * Sets a boolean value for HandsOffSteering.
+ * @param handsOffSteering a boolean value
+ */
+ public void setHandsOffSteering(boolean handsOffSteering){
+ setParameters(KEY_HANDS_OFF_STEERING, handsOffSteering);
+ }
+}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java index a1f63aa71..9a9673302 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java @@ -74,6 +74,7 @@ public class SubscribeVehicleDataResponse extends RPCResponse { public static final String KEY_TURN_SIGNAL = "turnSignal";
public static final String KEY_ELECTRONIC_PARK_BRAKE_STATUS = "electronicParkBrakeStatus";
public static final String KEY_CLOUD_APP_VEHICLE_ID = "cloudAppVehicleID";
+ public static final String KEY_HANDS_OFF_STEERING = "handsOffSteering";
/**
* Constructs a new SubscribeVehicleDataResponse object
@@ -531,4 +532,20 @@ public class SubscribeVehicleDataResponse extends RPCResponse { public VehicleDataResult getOEMCustomVehicleData(String vehicleDataName){
return (VehicleDataResult) getObject(VehicleDataResult.class, vehicleDataName);
}
+
+ /**
+ * Sets a value for HandsOffSteering VehicleData.
+ * @param vehicleDataResult a VehicleDataResult value
+ */
+ public void setHandsOffSteering(VehicleDataResult vehicleDataResult){
+ setParameters(KEY_HANDS_OFF_STEERING, vehicleDataResult);
+ }
+
+ /**
+ * Gets a VehicleDataResult for the HandsOffSteering.
+ * @return a VehicleDataResult related to the HandsOffSteering
+ */
+ public VehicleDataResult getHandsOffSteering(){
+ return (VehicleDataResult) getObject(VehicleDataResult.class, KEY_HANDS_OFF_STEERING);
+ }
}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java index f2bfb16dc..71f0f9ffc 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java @@ -307,6 +307,7 @@ public class UnsubscribeVehicleData extends RPCRequest { public static final String KEY_TURN_SIGNAL = "turnSignal";
public static final String KEY_ELECTRONIC_PARK_BRAKE_STATUS = "electronicParkBrakeStatus";
public static final String KEY_CLOUD_APP_VEHICLE_ID = "cloudAppVehicleID";
+ public static final String KEY_HANDS_OFF_STEERING = "handsOffSteering";
/**
* Constructs a new UnsubscribeVehicleData object
@@ -867,4 +868,20 @@ public class UnsubscribeVehicleData extends RPCRequest { public Boolean getOEMCustomVehicleData(String vehicleDataName){
return getBoolean(vehicleDataName);
}
+
+ /**
+ * Gets a boolean value for HandsOffSteering. If true, means the handsOffSteering has been subscribed.
+ * @return a Boolean value.
+ */
+ public Boolean getHandsOffSteering(){
+ return getBoolean(KEY_HANDS_OFF_STEERING);
+ }
+
+ /**
+ * Sets a boolean value. If true, unsubscribes from handsOffSteering data
+ * @param handsOffSteering a boolean value
+ */
+ public void setHandsOffSteering(boolean handsOffSteering){
+ setParameters(KEY_HANDS_OFF_STEERING, handsOffSteering);
+ }
}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java index 580f399eb..4e7fde853 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java @@ -74,6 +74,7 @@ public class UnsubscribeVehicleDataResponse extends RPCResponse { public static final String KEY_TURN_SIGNAL = "turnSignal";
public static final String KEY_ELECTRONIC_PARK_BRAKE_STATUS = "electronicParkBrakeStatus";
public static final String KEY_CLOUD_APP_VEHICLE_ID = "cloudAppVehicleID";
+ public static final String KEY_HANDS_OFF_STEERING = "handsOffSteering";
/**
* Constructs a new UnsubscribeVehicleDataResponse object
@@ -533,4 +534,20 @@ public class UnsubscribeVehicleDataResponse extends RPCResponse { public VehicleDataResult getOEMCustomVehicleData(String vehicleDataName){
return (VehicleDataResult) getObject(VehicleDataResult.class, vehicleDataName);
}
+
+ /**
+ * Sets a value for HandsOffSteering VehicleData.
+ * @param vehicleDataResult a VehicleDataResult value
+ */
+ public void setHandsOffSteering(VehicleDataResult vehicleDataResult){
+ setParameters(KEY_HANDS_OFF_STEERING, vehicleDataResult);
+ }
+
+ /**
+ * Gets a VehicleDataResult for the HandsOffSteering.
+ * @return a VehicleDataResult related to the HandsOffSteering
+ */
+ public VehicleDataResult getHandsOffSteering(){
+ return (VehicleDataResult) getObject(VehicleDataResult.class, KEY_HANDS_OFF_STEERING);
+ }
}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataType.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataType.java index f661ca7db..7175e0c78 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataType.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataType.java @@ -167,6 +167,11 @@ public enum VehicleDataType { * @since SmartDeviceLink 6.0
*/
VEHICLEDATA_OEM_CUSTOM_DATA,
+
+ /**
+ * To know whether or not a driver has his or her hands on the steering wheel.
+ */
+ VEHICLEDATA_HANDSOFFSTEERING
;
/**
|