diff options
Diffstat (limited to 'sdl_android/src/main/java/com/smartdevicelink/proxy')
27 files changed, 1864 insertions, 6 deletions
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java index c61eecc49..3b59d1ddf 100644 --- a/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java @@ -2818,6 +2818,34 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase> _proxyListener.onUpdateTurnListResponse(msg);
onRPCResponseReceived(msg);
}
+ } else if (functionName.equals(FunctionID.SET_INTERIOR_VEHICLE_DATA.toString())) {
+ final SetInteriorVehicleDataResponse msg = new SetInteriorVehicleDataResponse(hash);
+ if (_callbackToUIThread) {
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onSetInteriorVehicleDataResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onSetInteriorVehicleDataResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.GET_INTERIOR_VEHICLE_DATA.toString())) {
+ final GetInteriorVehicleDataResponse msg = new GetInteriorVehicleDataResponse(hash);
+ if (_callbackToUIThread) {
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onGetInteriorVehicleDataResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onGetInteriorVehicleDataResponse(msg);
+ onRPCResponseReceived(msg);
+ }
} else if (functionName.equals(FunctionID.GET_SYSTEM_CAPABILITY.toString())) {
// GetSystemCapabilityResponse
final GetSystemCapabilityResponse msg = new GetSystemCapabilityResponse(hash);
@@ -2833,8 +2861,21 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase> _proxyListener.onGetSystemCapabilityResponse(msg);
onRPCResponseReceived(msg);
}
- }
- else if (functionName.equals(FunctionID.SEND_HAPTIC_DATA.toString())) {
+ } else if (functionName.equals(FunctionID.BUTTON_PRESS.toString())) {
+ final ButtonPressResponse msg = new ButtonPressResponse(hash);
+ if (_callbackToUIThread) {
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onButtonPressResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onButtonPressResponse(msg);
+ onRPCResponseReceived(msg);
+ }
+ } else if (functionName.equals(FunctionID.SEND_HAPTIC_DATA.toString())) {
final SendHapticDataResponse msg = new SendHapticDataResponse(hash);
if (_callbackToUIThread) {
// Run in UI thread
@@ -3246,6 +3287,22 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase> onRPCNotificationReceived(msg);
}
}
+ else if (functionName.equals(FunctionID.ON_INTERIOR_VEHICLE_DATA.toString())) {
+ final OnInteriorVehicleData msg = new OnInteriorVehicleData(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onOnInteriorVehicleData(msg);
+ onRPCNotificationReceived(msg);
+ }
+ });
+ } else {
+ _proxyListener.onOnInteriorVehicleData(msg);
+ onRPCNotificationReceived(msg);
+ }
+ }
else {
if (_sdlMsgVersion != null) {
DebugTool.logInfo("Unrecognized notification Message: " + functionName +
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java index 80842cfc2..618819f20 100644 --- a/sdl_android/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java @@ -6,6 +6,7 @@ import com.smartdevicelink.proxy.rpc.AddCommandResponse; import com.smartdevicelink.proxy.rpc.AddSubMenuResponse;
import com.smartdevicelink.proxy.rpc.AlertManeuverResponse;
import com.smartdevicelink.proxy.rpc.AlertResponse;
+import com.smartdevicelink.proxy.rpc.ButtonPressResponse;
import com.smartdevicelink.proxy.rpc.ChangeRegistrationResponse;
import com.smartdevicelink.proxy.rpc.CreateInteractionChoiceSetResponse;
import com.smartdevicelink.proxy.rpc.DeleteCommandResponse;
@@ -17,6 +18,7 @@ import com.smartdevicelink.proxy.rpc.DialNumberResponse; import com.smartdevicelink.proxy.rpc.EndAudioPassThruResponse;
import com.smartdevicelink.proxy.rpc.GenericResponse;
import com.smartdevicelink.proxy.rpc.GetDTCsResponse;
+import com.smartdevicelink.proxy.rpc.GetInteriorVehicleDataResponse;
import com.smartdevicelink.proxy.rpc.GetSystemCapabilityResponse;
import com.smartdevicelink.proxy.rpc.GetVehicleDataResponse;
import com.smartdevicelink.proxy.rpc.GetWayPointsResponse;
@@ -28,6 +30,7 @@ import com.smartdevicelink.proxy.rpc.OnCommand; import com.smartdevicelink.proxy.rpc.OnDriverDistraction;
import com.smartdevicelink.proxy.rpc.OnHMIStatus;
import com.smartdevicelink.proxy.rpc.OnHashChange;
+import com.smartdevicelink.proxy.rpc.OnInteriorVehicleData;
import com.smartdevicelink.proxy.rpc.OnKeyboardInput;
import com.smartdevicelink.proxy.rpc.OnLanguageChange;
import com.smartdevicelink.proxy.rpc.OnLockScreenStatus;
@@ -49,6 +52,7 @@ import com.smartdevicelink.proxy.rpc.SendLocationResponse; import com.smartdevicelink.proxy.rpc.SetAppIconResponse;
import com.smartdevicelink.proxy.rpc.SetDisplayLayoutResponse;
import com.smartdevicelink.proxy.rpc.SetGlobalPropertiesResponse;
+import com.smartdevicelink.proxy.rpc.SetInteriorVehicleDataResponse;
import com.smartdevicelink.proxy.rpc.SetMediaClockTimerResponse;
import com.smartdevicelink.proxy.rpc.ShowConstantTbtResponse;
import com.smartdevicelink.proxy.rpc.ShowResponse;
@@ -340,5 +344,13 @@ public interface IProxyListenerBase { public void onGetSystemCapabilityResponse(GetSystemCapabilityResponse response);
+ public void onGetInteriorVehicleDataResponse(GetInteriorVehicleDataResponse response);
+
+ public void onButtonPressResponse(ButtonPressResponse response);
+
+ public void onSetInteriorVehicleDataResponse(SetInteriorVehicleDataResponse response);
+
+ public void onOnInteriorVehicleData(OnInteriorVehicleData notification);
+
public void onSendHapticDataResponse(SendHapticDataResponse response);
}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ButtonPress.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ButtonPress.java new file mode 100644 index 000000000..d0162e7ac --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ButtonPress.java @@ -0,0 +1,94 @@ +package com.smartdevicelink.proxy.rpc; + +import com.smartdevicelink.protocol.enums.FunctionID; +import com.smartdevicelink.proxy.RPCRequest; +import com.smartdevicelink.proxy.rpc.enums.ButtonName; +import com.smartdevicelink.proxy.rpc.enums.ButtonPressMode; +import com.smartdevicelink.proxy.rpc.enums.ModuleType; +import java.util.Hashtable; + +/** + * This function allows a remote control type mobile application + * simulate a hardware button press event. + */ +public class ButtonPress extends RPCRequest { + public static final String KEY_MODULE_TYPE = "moduleType"; + public static final String KEY_BUTTON_NAME = "buttonName"; + public static final String KEY_BUTTON_PRESS_MODE = "buttonPressMode"; + + /** + * Constructs a new ButtonPress object + */ + public ButtonPress() { + super(FunctionID.BUTTON_PRESS.toString()); + } + + /** + * <p>Constructs a new ButtonPress object indicated by the + * Hashtable parameter</p> + * + * + * @param hash + * The Hashtable to use + */ + public ButtonPress(Hashtable<String, Object> hash) { + super(hash); + } + + /** + * Gets the ModuleType + * + * @return ModuleType - The module where the button should be pressed + */ + public ModuleType getModuleType() { + return (ModuleType) getObject(ModuleType.class, KEY_MODULE_TYPE); + } + + /** + * Sets a ModuleType + * + * @param moduleType + * Represents module where the button should be pressed + */ + public void setModuleType(ModuleType moduleType) { + setParameters(KEY_MODULE_TYPE, moduleType); + } + + /** + * Gets the ButtonName + * + * @return ButtonName - The name of supported RC climate or radio button + */ + public ButtonName getButtonName() { + return (ButtonName) getObject(ButtonName.class, KEY_BUTTON_NAME); + } + + /** + * Sets a ButtonName + * + * @param buttonName + * Represents name of supported RC climate or radio button + */ + public void setButtonName(ButtonName buttonName) { + setParameters(KEY_BUTTON_NAME, buttonName); + } + + /** + * Gets the ButtonPressMode + * + * @return ButtonPressMode - Indicates whether this is a LONG or SHORT button press event. + */ + public ButtonPressMode getButtonPressMode() { + return (ButtonPressMode) getObject(ButtonPressMode.class, KEY_BUTTON_PRESS_MODE); + } + + /** + * Sets a ButtonPressMode + * + * @param buttonPressMode + * Indicates whether this is a LONG or SHORT button press event. + */ + public void setButtonPressMode(ButtonPressMode buttonPressMode) { + setParameters(KEY_BUTTON_PRESS_MODE, buttonPressMode); + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ButtonPressResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ButtonPressResponse.java new file mode 100644 index 000000000..94ccd61a6 --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ButtonPressResponse.java @@ -0,0 +1,28 @@ +package com.smartdevicelink.proxy.rpc; + +import com.smartdevicelink.protocol.enums.FunctionID; +import com.smartdevicelink.proxy.RPCResponse; + +import java.util.Hashtable; + +public class ButtonPressResponse extends RPCResponse { + + /** + * Constructs a new ButtonPressResponse object + */ + public ButtonPressResponse() { + super(FunctionID.BUTTON_PRESS.toString()); + } + + /** + * <p>Constructs a new ButtonPressResponse object indicated by the + * Hashtable parameter</p> + * + * + * @param hash + * The Hashtable to use + */ + public ButtonPressResponse(Hashtable<String, Object> hash) { + super(hash); + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ClimateControlCapabilities.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ClimateControlCapabilities.java new file mode 100644 index 000000000..ac9c3fc1c --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ClimateControlCapabilities.java @@ -0,0 +1,280 @@ +package com.smartdevicelink.proxy.rpc; + +import com.smartdevicelink.proxy.RPCStruct; +import com.smartdevicelink.proxy.rpc.enums.DefrostZone; +import com.smartdevicelink.proxy.rpc.enums.VentilationMode; +import java.util.Hashtable; +import java.util.List; + +/** + * Contains information about a climate control module's capabilities. + */ + +public class ClimateControlCapabilities extends RPCStruct{ + public static final String KEY_MODULE_NAME= "moduleName"; + public static final String KEY_FAN_SPEED_AVAILABLE= "fanSpeedAvailable"; + public static final String KEY_DESIRED_TEMPERATURE_AVAILABLE= "desiredTemperatureAvailable"; + public static final String KEY_AC_ENABLE_AVAILABLE= "acEnableAvailable"; + public static final String KEY_AC_MAX_ENABLE_AVAILABLE= "acMaxEnableAvailable"; + public static final String KEY_CIRCULATE_AIR_ENABLE_AVAILABLE= "circulateAirEnableAvailable"; + public static final String KEY_AUTO_MODE_ENABLE_AVAILABLE= "autoModeEnableAvailable"; + public static final String KEY_DUAL_MODE_ENABLE_AVAILABLE= "dualModeEnableAvailable"; + public static final String KEY_DEFROST_ZONE_AVAILABLE= "defrostZoneAvailable"; + public static final String KEY_DEFROST_ZONE= "defrostZone"; + public static final String KEY_VENTILATION_MODE_AVAILABLE= "ventilationModeAvailable"; + public static final String KEY_VENTILATION_MODE= "ventilationMode"; + + public ClimateControlCapabilities() { + } + + public ClimateControlCapabilities(Hashtable<String, Object> hash) { + super(hash); + } + + /** + * Sets the moduleName portion of the ClimateControlCapabilities class + * + * @param moduleName + * The short friendly name of the climate control module. + * It should not be used to identify a module by mobile application. + */ + public void setModuleName(String moduleName) { + setValue(KEY_MODULE_NAME, moduleName); + } + + /** + * Gets the moduleName portion of the ClimateControlCapabilities class + * + * @return String - Short friendly name of the climate control module. + */ + public String getModuleName() { + return getString(KEY_MODULE_NAME); + } + + /** + * Sets the fanSpeedAvailable portion of the ClimateControlCapabilities class + * + * @param fanSpeedAvailable + * Availability of the control of fan speed. + * True: Available, False: Not Available, Not present: Not Available. + */ + public void setFanSpeedAvailable(Boolean fanSpeedAvailable) { + setValue(KEY_FAN_SPEED_AVAILABLE, fanSpeedAvailable); + } + + /** + * Gets the fanSpeedAvailable portion of the ClimateControlCapabilities class + * + * @return Boolean - Availability of the control of fan speed. + * True: Available, False: Not Available, Not present: Not Available. + */ + public Boolean getFanSpeedAvailable() { + return getBoolean(KEY_FAN_SPEED_AVAILABLE); + } + + /** + * Sets the desiredTemperatureAvailable portion of the ClimateControlCapabilities class + * + * @param desiredTemperatureAvailable + * Availability of the control of desired temperature. + * True: Available, False: Not Available, Not present: Not Available. + */ + public void setDesiredTemperatureAvailable(Boolean desiredTemperatureAvailable) { + setValue(KEY_DESIRED_TEMPERATURE_AVAILABLE, desiredTemperatureAvailable); + } + + /** + * Gets the desiredTemperatureAvailable portion of the ClimateControlCapabilities class + * + * @return Boolean - Availability of the control of desired temperature. + * True: Available, False: Not Available, Not present: Not Available. + */ + public Boolean getDesiredTemperatureAvailable() { + return getBoolean(KEY_DESIRED_TEMPERATURE_AVAILABLE); + } + + /** + * Sets the acEnableAvailable portion of the ClimateControlCapabilities class + * + * @param acEnableAvailable + * Availability of the control of turn on/off AC. + * True: Available, False: Not Available, Not present: Not Available. + */ + public void setAcEnableAvailable(Boolean acEnableAvailable) { + setValue(KEY_AC_ENABLE_AVAILABLE, acEnableAvailable); + } + + /** + * Gets the acEnableAvailable portion of the ClimateControlCapabilities class + * + * @return Boolean - Availability of the control of turn on/off AC. + * True: Available, False: Not Available, Not present: Not Available. + */ + public Boolean getAcEnableAvailable() { + return getBoolean(KEY_AC_ENABLE_AVAILABLE); + } + + /** + * Sets the acMaxEnableAvailable portion of the ClimateControlCapabilities class + * + * @param acMaxEnableAvailable + * Availability of the control of enable/disable air conditioning is ON on the maximum level. + * True: Available, False: Not Available, Not present: Not Available. + */ + public void setAcMaxEnableAvailable(Boolean acMaxEnableAvailable) { + setValue(KEY_AC_MAX_ENABLE_AVAILABLE, acMaxEnableAvailable); + } + + /** + * Gets the acMaxEnableAvailable portion of the ClimateControlCapabilities class + * + * @return Boolean - Availability of the control of enable/disable air conditioning is ON on the maximum level. + * True: Available, False: Not Available, Not present: Not Available. + */ + public Boolean getAcMaxEnableAvailable() { + return getBoolean(KEY_AC_MAX_ENABLE_AVAILABLE); + } + + /** + * Sets the circulateAirEnableAvailable portion of the ClimateControlCapabilities class + * + * @param circulateAirEnableAvailable + * Availability of the control of enable/disable circulate Air mode. + * True: Available, False: Not Available, Not present: Not Available. + */ + public void setCirculateAirEnableAvailable(Boolean circulateAirEnableAvailable) { + setValue(KEY_CIRCULATE_AIR_ENABLE_AVAILABLE, circulateAirEnableAvailable); + } + + /** + * Gets the circulateAirEnableAvailable portion of the ClimateControlCapabilities class + * + * @return Boolean - Availability of the control of enable/disable circulate Air mode. + * True: Available, False: Not Available, Not present: Not Available. + */ + public Boolean getCirculateAirEnableAvailable() { + return getBoolean(KEY_CIRCULATE_AIR_ENABLE_AVAILABLE); + } + + /** + * Sets the autoModeEnableAvailable portion of the ClimateControlCapabilities class + * + * @param autoModeEnableAvailable + * Availability of the control of enable/disable auto mode. + * True: Available, False: Not Available, Not present: Not Available. + */ + public void setAutoModeEnableAvailable(Boolean autoModeEnableAvailable) { + setValue(KEY_AUTO_MODE_ENABLE_AVAILABLE, autoModeEnableAvailable); + } + + /** + * Gets the autoModeEnableAvailable portion of the ClimateControlCapabilities class + * + * @return Boolean - Availability of the control of enable/disable auto mode. + * True: Available, False: Not Available, Not present: Not Available. + */ + public Boolean getAutoModeEnableAvailable() { + return getBoolean(KEY_AUTO_MODE_ENABLE_AVAILABLE); + } + + /** + * Sets the dualModeEnableAvailable portion of the ClimateControlCapabilities class + * + * @param dualModeEnableAvailable + * Availability of the control of enable/disable dual mode. + * True: Available, False: Not Available, Not present: Not Available. + */ + public void setDualModeEnableAvailable(Boolean dualModeEnableAvailable) { + setValue(KEY_DUAL_MODE_ENABLE_AVAILABLE, dualModeEnableAvailable); + } + + /** + * Gets the dualModeEnableAvailable portion of the ClimateControlCapabilities class + * + * @return Boolean - Availability of the control of enable/disable dual mode. + * True: Available, False: Not Available, Not present: Not Available. + */ + public Boolean getDualModeEnableAvailable() { + return getBoolean(KEY_DUAL_MODE_ENABLE_AVAILABLE); + } + + /** + * Sets the defrostZoneAvailable portion of the ClimateControlCapabilities class + * + * @param defrostZoneAvailable + * Availability of the control of defrost zones. + * True: Available, False: Not Available, Not present: Not Available. + */ + public void setDefrostZoneAvailable(Boolean defrostZoneAvailable) { + setValue(KEY_DEFROST_ZONE_AVAILABLE, defrostZoneAvailable); + } + + /** + * Gets the defrostZoneAvailable portion of the ClimateControlCapabilities class + * + * @return Boolean - Availability of the control of defrost zones. + * True: Available, False: Not Available, Not present: Not Available. + */ + public Boolean getDefrostZoneAvailable() { + return getBoolean(KEY_DEFROST_ZONE_AVAILABLE); + } + + /** + * Gets the List<DefrostZone> portion of the ClimateControlCapabilities class + * + * @return List<DefrostZone> - A set of all defrost zones that are controllable. + */ + public List<DefrostZone> getDefrostZone() { + return (List<DefrostZone>) getObject(DefrostZone.class, KEY_DEFROST_ZONE); + } + + /** + * Sets the defrostZone portion of the ClimateControlCapabilities class + * + * @param defrostZone + * A set of all defrost zones that are controllable. + */ + public void setDefrostZone(List<DefrostZone> defrostZone) { + setValue(KEY_DEFROST_ZONE, defrostZone); + } + + /** + * Sets the ventilationModeAvailable portion of the ClimateControlCapabilities class + * + * @param ventilationModeAvailable + * Availability of the control of air ventilation mode. + * True: Available, False: Not Available, Not present: Not Available. + */ + public void setVentilationModeAvailable(Boolean ventilationModeAvailable) { + setValue(KEY_VENTILATION_MODE_AVAILABLE, ventilationModeAvailable); + } + + /** + * Gets the ventilationModeAvailable portion of the ClimateControlCapabilities class + * + * @return Boolean - Availability of the control of air ventilation mode. + * True: Available, False: Not Available, Not present: Not Available. + */ + public Boolean getVentilationModeAvailable() { + return getBoolean(KEY_VENTILATION_MODE_AVAILABLE); + } + + /** + * Gets the List<VentilationMode> portion of the ClimateControlCapabilities class + * + * @return List<VentilationMode> - A set of all ventilation modes that are controllable. + */ + public List<VentilationMode> getVentilationMode() { + return (List<VentilationMode>) getObject(VentilationMode.class, KEY_VENTILATION_MODE); + } + + /** + * Sets the ventilationMode portion of the ClimateControlCapabilities class + * + * @param ventilationMode + * A set of all ventilation modes that are controllable. + */ + public void setVentilationMode(List<VentilationMode> ventilationMode) { + setValue(KEY_VENTILATION_MODE, ventilationMode); + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ClimateControlData.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ClimateControlData.java new file mode 100644 index 000000000..0da8060f3 --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ClimateControlData.java @@ -0,0 +1,106 @@ +package com.smartdevicelink.proxy.rpc; + +import com.smartdevicelink.proxy.RPCStruct; +import com.smartdevicelink.proxy.rpc.enums.DefrostZone; +import com.smartdevicelink.proxy.rpc.enums.VentilationMode; +import java.util.Hashtable; + +public class ClimateControlData extends RPCStruct{ + public static final String KEY_FAN_SPEED= "fanSpeed"; + public static final String KEY_CURRENT_TEMPERATURE= "currentTemperature"; + public static final String KEY_DESIRED_TEMPERATURE= "desiredTemperature"; + public static final String KEY_AC_ENABLE= "acEnable"; + public static final String KEY_CIRCULATE_AIR_ENABLE= "circulateAirEnable"; + public static final String KEY_AUTO_MODE_ENABLE= "autoModeEnable"; + public static final String KEY_DEFROST_ZONE= "defrostZone"; + public static final String KEY_DUAL_MODE_ENABLE= "dualModeEnable"; + public static final String KEY_AC_MAX_ENABLE= "acMaxEnable"; + public static final String KEY_VENTILATION_MODE= "ventilationMode"; + + public ClimateControlData() { + } + + public ClimateControlData(Hashtable<String, Object> hash) { + super(hash); + } + + public void setFanSpeed(Integer fanSpeed) { + setValue(KEY_FAN_SPEED, fanSpeed); + } + + public Integer getFanSpeed() { + return getInteger(KEY_FAN_SPEED); + } + + public void setCurrentTemperature(Temperature currentTemperature) { + setValue(KEY_CURRENT_TEMPERATURE, currentTemperature); + } + + public Temperature getCurrentTemperature() { + return (Temperature) getObject(Temperature.class, KEY_CURRENT_TEMPERATURE); + } + + public void setDesiredTemperature(Temperature desiredTemperature) { + setValue(KEY_DESIRED_TEMPERATURE, desiredTemperature); + } + + public Temperature getDesiredTemperature() { + return (Temperature) getObject(Temperature.class, KEY_DESIRED_TEMPERATURE); + } + + public void setAcEnable(Boolean acEnable) { + setValue(KEY_AC_ENABLE, acEnable); + } + + public Boolean getAcEnable() { + return getBoolean(KEY_AC_ENABLE); + } + + public void setCirculateAirEnable(Boolean circulateAirEnable) { + setValue(KEY_CIRCULATE_AIR_ENABLE, circulateAirEnable); + } + + public Boolean getCirculateAirEnable() { + return getBoolean(KEY_CIRCULATE_AIR_ENABLE); + } + + public void setAutoModeEnable(Boolean autoModeEnable) { + setValue(KEY_AUTO_MODE_ENABLE, autoModeEnable); + } + + public Boolean getAutoModeEnable() { + return getBoolean(KEY_AUTO_MODE_ENABLE); + } + + public void setDefrostZone(DefrostZone defrostZone) { + setValue(KEY_DEFROST_ZONE, defrostZone); + } + + public DefrostZone getDefrostZone() { + return (DefrostZone) getObject(DefrostZone.class, KEY_DEFROST_ZONE); + } + + public void setDualModeEnable(Boolean dualModeEnable) { + setValue(KEY_DUAL_MODE_ENABLE, dualModeEnable); + } + + public Boolean getDualModeEnable() { + return getBoolean(KEY_DUAL_MODE_ENABLE); + } + + public void setAcMaxEnable(Boolean acMaxEnable) { + setValue(KEY_AC_MAX_ENABLE, acMaxEnable); + } + + public Boolean getAcMaxEnable() { + return getBoolean(KEY_AC_MAX_ENABLE); + } + + public void setVentilationMode(VentilationMode ventilationMode) { + setValue(KEY_VENTILATION_MODE, ventilationMode); + } + + public VentilationMode getVentilationMode() { + return (VentilationMode) getObject(VentilationMode.class, KEY_VENTILATION_MODE); + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetInteriorVehicleData.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetInteriorVehicleData.java new file mode 100644 index 000000000..53108b4fb --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetInteriorVehicleData.java @@ -0,0 +1,79 @@ +package com.smartdevicelink.proxy.rpc; + +import com.smartdevicelink.protocol.enums.FunctionID; +import com.smartdevicelink.proxy.RPCRequest; +import com.smartdevicelink.proxy.rpc.enums.ModuleType; +import java.util.Hashtable; + +/** + * Read the current status value of specified remote control module (type). In addition, + * When subscribe=true, subscribes for specific remote control module data items; + * When subscribe=false, un-subscribes for specific remote control module data items. + * Once subscribed, the application will be notified by the onInteriorVehicleData notification + * whenever new data is available for the module. + */ +public class GetInteriorVehicleData extends RPCRequest { + public static final String KEY_MODULE_TYPE = "moduleType"; + public static final String KEY_SUBSCRIBE = "subscribe"; + + /** + * Constructs a new GetInteriorVehicleData object + */ + public GetInteriorVehicleData() { + super(FunctionID.GET_INTERIOR_VEHICLE_DATA.toString()); + } + + /** + * <p>Constructs a new GetInteriorVehicleData object indicated by the + * Hashtable parameter</p> + * + * + * @param hash + * The Hashtable to use + */ + public GetInteriorVehicleData(Hashtable<String, Object> hash) { + super(hash); + } + + /** + * Gets the ModuleType + * + * @return ModuleType - The type of a RC module to retrieve module data from the vehicle. + * In the future, this should be the Identification of a module. + */ + public ModuleType getModuleType() { + return (ModuleType) getObject(ModuleType.class, KEY_MODULE_TYPE); + } + + /** + * Sets a ModuleType + * + * @param moduleType + * The type of a RC module to retrieve module data from the vehicle. + * In the future, this should be the Identification of a module. + */ + public void setModuleType(ModuleType moduleType) { + setParameters(KEY_MODULE_TYPE, moduleType); + } + + /** + * Sets subscribe parameter + * + * @param subscribe + * If subscribe is true, the head unit will register onInteriorVehicleData notifications for the requested moduelType. + * If subscribe is false, the head unit will unregister onInteriorVehicleData notifications for the requested moduelType. + */ + public void setSubscribe(Boolean subscribe) { + setParameters(KEY_SUBSCRIBE, subscribe); + } + + /** + * Gets subscribe parameter + * + * @return Boolean - If subscribe is true, the head unit will register onInteriorVehicleData notifications for the requested moduelType. + * If subscribe is false, the head unit will unregister onInteriorVehicleData notifications for the requested moduelType. + */ + public Boolean getSubscribe() { + return getBoolean(KEY_SUBSCRIBE); + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetInteriorVehicleDataResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetInteriorVehicleDataResponse.java new file mode 100644 index 000000000..0e74001f6 --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetInteriorVehicleDataResponse.java @@ -0,0 +1,70 @@ +package com.smartdevicelink.proxy.rpc; + +import com.smartdevicelink.protocol.enums.FunctionID; +import com.smartdevicelink.proxy.RPCResponse; +import java.util.Hashtable; + +public class GetInteriorVehicleDataResponse extends RPCResponse { + public static final String KEY_MODULE_DATA = "moduleData"; + public static final String KEY_IS_SUBSCRIBED = "isSubscribed"; + + /** + * Constructs a new GetInteriorVehicleDataResponse object + */ + public GetInteriorVehicleDataResponse() { + super(FunctionID.GET_INTERIOR_VEHICLE_DATA.toString()); + } + + /** + * <p>Constructs a new GetInteriorVehicleDataResponse object indicated by the + * Hashtable parameter</p> + * + * + * @param hash + * The Hashtable to use + */ + public GetInteriorVehicleDataResponse(Hashtable<String, Object> hash) { + super(hash); + } + + /** + * Gets the moduleData + * + * @return ModuleData + */ + public ModuleData getModuleData() { + return (ModuleData) getObject(ModuleData.class, KEY_MODULE_DATA); + } + + /** + * Sets the moduleData + * + * @param moduleData + */ + public void setModuleData(ModuleData moduleData) { + setParameters(KEY_MODULE_DATA, moduleData); + } + + /** + * Sets isSubscribed parameter + * + * @param isSubscribed + * It is a conditional-mandatory parameter: must be returned in case "subscribe" parameter was present in the related request. + * If "true" - the "moduleType" from request is successfully subscribed and the head unit will send onInteriorVehicleData notifications for the moduleType. + * If "false" - the "moduleType" from request is either unsubscribed or failed to subscribe. + * */ + public void setIsSubscribed(Boolean isSubscribed) { + setParameters(KEY_IS_SUBSCRIBED, isSubscribed); + } + + /** + * Gets isSubscribed parameter + * + * @return Boolean - It is a conditional-mandatory parameter: must be returned in case "subscribe" parameter was present in the related request. + * If "true" - the "moduleType" from request is successfully subscribed and the head unit will send onInteriorVehicleData notifications for the moduleType. + * If "false" - the "moduleType" from request is either unsubscribed or failed to subscribe. + * */ + public Boolean getIsSubscribed() { + return getBoolean(KEY_IS_SUBSCRIBED); + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ModuleData.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ModuleData.java new file mode 100644 index 000000000..e04ab1ad5 --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ModuleData.java @@ -0,0 +1,75 @@ +package com.smartdevicelink.proxy.rpc; + +import com.smartdevicelink.proxy.RPCStruct; +import com.smartdevicelink.proxy.rpc.enums.ModuleType; +import java.util.Hashtable; + +public class ModuleData extends RPCStruct{ + public static final String KEY_MODULE_TYPE= "moduleType"; + public static final String KEY_RADIO_CONTROL_DATA = "radioControlData"; + public static final String KEY_CLIMATE_CONTROL_DATA = "climateControlData"; + + public ModuleData() { + } + + public ModuleData(Hashtable<String, Object> hash) { + super(hash); + } + + /** + * Sets the moduleType portion of the ModuleData class + * + * @param moduleType + * The moduleType indicates which type of data should be changed and identifies which data object exists in this struct. + * For example, if the moduleType is CLIMATE then a "climateControlData" should exist + */ + public void setModuleType(ModuleType moduleType) { + setValue(KEY_MODULE_TYPE, moduleType); + } + + /** + * Gets the moduleType portion of the ModuleData class + * + * @return ModuleType - The moduleType indicates which type of data should be changed and identifies which data object exists in this struct. + * For example, if the moduleType is CLIMATE then a "climateControlData" should exist. + */ + public ModuleType getModuleType() { + return (ModuleType) getObject(ModuleType.class, KEY_MODULE_TYPE); + } + + /** + * Sets the radioControlData portion of the ModuleData class + * + * @param radioControlData + */ + public void setRadioControlData(RadioControlData radioControlData) { + setValue(KEY_RADIO_CONTROL_DATA, radioControlData); + } + + /** + * Gets the radioControlData portion of the ModuleData class + * + * @return RadioControlData + */ + public RadioControlData getRadioControlData() { + return (RadioControlData) getObject(RadioControlData.class, KEY_RADIO_CONTROL_DATA); + } + + /** + * Sets the climateControlData portion of the ModuleData class + * + * @param climateControlData + */ + public void setClimateControlData(ClimateControlData climateControlData) { + setValue(KEY_CLIMATE_CONTROL_DATA, climateControlData); + } + + /** + * Gets the climateControlData portion of the ModuleData class + * + * @return ClimateControlData + */ + public ClimateControlData getClimateControlData() { + return (ClimateControlData) getObject(ClimateControlData.class, KEY_CLIMATE_CONTROL_DATA); + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnInteriorVehicleData.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnInteriorVehicleData.java new file mode 100644 index 000000000..61e9ee17a --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnInteriorVehicleData.java @@ -0,0 +1,47 @@ +package com.smartdevicelink.proxy.rpc; + +import com.smartdevicelink.protocol.enums.FunctionID; +import com.smartdevicelink.proxy.RPCNotification; + +import java.util.Hashtable; + +public class OnInteriorVehicleData extends RPCNotification { + public static final String KEY_MODULE_DATA = "moduleData"; + + /** + * Constructs a new OnInteriorVehicleData object + */ + public OnInteriorVehicleData() { + super(FunctionID.ON_INTERIOR_VEHICLE_DATA.toString()); + } + + /** + * <p>Constructs a new OnInteriorVehicleData object indicated by the + * Hashtable parameter</p> + * + * + * @param hash + * The Hashtable to use + */ + public OnInteriorVehicleData(Hashtable<String, Object> hash) { + super(hash); + } + + /** + * Gets the moduleData + * + * @return ModuleData + */ + public ModuleData getModuleData() { + return (ModuleData) getObject(ModuleData.class, KEY_MODULE_DATA); + } + + /** + * Sets the moduleData + * + * @param moduleData + */ + public void setModuleData(ModuleData moduleData) { + setParameters(KEY_MODULE_DATA, moduleData); + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlCapabilities.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlCapabilities.java new file mode 100644 index 000000000..3acfe77a9 --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlCapabilities.java @@ -0,0 +1,236 @@ +package com.smartdevicelink.proxy.rpc; + +import com.smartdevicelink.proxy.RPCStruct; +import java.util.Hashtable; + +/** + * Contains information about a radio control module's capabilities. + */ +public class RadioControlCapabilities extends RPCStruct{ + public static final String KEY_MODULE_NAME= "moduleName"; + public static final String KEY_RADIO_ENABLE_AVAILABLE= "radioEnableAvailable"; + public static final String KEY_RADIO_BAND_AVAILABLE= "radioBandAvailable"; + public static final String KEY_RADIO_FREQUENCY_AVAILABLE= "radioFrequencyAvailable"; + public static final String KEY_HD_CHANNEL_AVAILABLE= "hdChannelAvailable"; + public static final String KEY_RDS_DATA_AVAILABLE= "rdsDataAvailable"; + public static final String KEY_AVAILABLE_HDS_AVAILABLE= "availableHDsAvailable"; + public static final String KEY_STATE_AVAILABLE= "stateAvailable"; + public static final String KEY_SIGNAL_STRENGTH_AVAILABLE= "signalStrengthAvailable"; + public static final String KEY_SIGNAL_CHANGE_THRESHOLD_AVAILABLE= "signalChangeThresholdAvailable"; + + public RadioControlCapabilities() { + } + + public RadioControlCapabilities(Hashtable<String, Object> hash) { + super(hash); + } + + /** + * Sets the moduleName portion of the RadioControlCapabilities class + * + * @param moduleName + * The short friendly name of the climate control module. + * It should not be used to identify a module by mobile application. + */ + public void setModuleName(String moduleName) { + setValue(KEY_MODULE_NAME, moduleName); + } + + /** + * Gets the moduleName portion of the RadioControlCapabilities class + * + * @return String - Short friendly name of the climate control module. + */ + public String getModuleName() { + return getString(KEY_MODULE_NAME); + } + + /** + * Sets the radioEnableAvailable portion of the RadioControlCapabilities class + * + * @param radioEnableAvailable + * Availability of the control of enable/disable radio. + * True: Available, False: Not Available, Not present: Not Available. + */ + public void setRadioEnableAvailable(Boolean radioEnableAvailable) { + setValue(KEY_RADIO_ENABLE_AVAILABLE, radioEnableAvailable); + } + + /** + * Gets the radioEnableAvailable portion of the RadioControlCapabilities class + * + * @return Boolean - Availability of the control of enable/disable radio. + * True: Available, False: Not Available, Not present: Not Available. + */ + public Boolean getRadioEnableAvailable() { + return getBoolean(KEY_RADIO_ENABLE_AVAILABLE); + } + + /** + * Sets the radioBandAvailable portion of the RadioControlCapabilities class + * + * @param radioBandAvailable + * Availability of the control of radio band. + * True: Available, False: Not Available, Not present: Not Available. + */ + public void setRadioBandAvailable(Boolean radioBandAvailable) { + setValue(KEY_RADIO_BAND_AVAILABLE, radioBandAvailable); + } + + /** + * Gets the radioBandAvailable portion of the RadioControlCapabilities class + * + * @return Boolean - Availability of the control of radio band. + * True: Available, False: Not Available, Not present: Not Available. + */ + public Boolean getRadioBandAvailable() { + return getBoolean(KEY_RADIO_BAND_AVAILABLE); + } + + /** + * Sets the radioFrequencyAvailable portion of the RadioControlCapabilities class + * + * @param radioFrequencyAvailable + * Availability of the control of radio frequency. + * True: Available, False: Not Available, Not present: Not Available. + */ + public void setRadioFrequencyAvailable(Boolean radioFrequencyAvailable) { + setValue(KEY_RADIO_FREQUENCY_AVAILABLE, radioFrequencyAvailable); + } + + /** + * Gets the radioFrequencyAvailable portion of the RadioControlCapabilities class + * + * @return Boolean - Availability of the control of radio frequency. + * True: Available, False: Not Available, Not present: Not Available. + */ + public Boolean getRadioFrequencyAvailable() { + return getBoolean(KEY_RADIO_FREQUENCY_AVAILABLE); + } + + /** + * Sets the hdChannelAvailable portion of the RadioControlCapabilities class + * + * @param hdChannelAvailable + * Availability of the control of HD radio channel. + * True: Available, False: Not Available, Not present: Not Available. + */ + public void setHdChannelAvailable(Boolean hdChannelAvailable) { + setValue(KEY_HD_CHANNEL_AVAILABLE, hdChannelAvailable); + } + + /** + * Gets the hdChannelAvailable portion of the RadioControlCapabilities class + * + * @return Boolean - Availability of the control of HD radio channel. + * True: Available, False: Not Available, Not present: Not Available. + */ + public Boolean getHdChannelAvailable() { + return getBoolean(KEY_HD_CHANNEL_AVAILABLE); + } + + /** + * Sets the rdsDataAvailable portion of the RadioControlCapabilities class + * + * @param rdsDataAvailable + * Availability of the getting Radio Data System (RDS) data. + * True: Available, False: Not Available, Not present: Not Available. + */ + public void setRdsDataAvailable(Boolean rdsDataAvailable) { + setValue(KEY_RDS_DATA_AVAILABLE, rdsDataAvailable); + } + + /** + * Gets the rdsDataAvailable portion of the RadioControlCapabilities class + * + * @return Boolean - Availability of the getting Radio Data System (RDS) data. + * True: Available, False: Not Available, Not present: Not Available. + */ + public Boolean getRdsDataAvailable() { + return getBoolean(KEY_RDS_DATA_AVAILABLE); + } + + /** + * Sets the availableHDsAvailable portion of the RadioControlCapabilities class + * + * @param availableHDsAvailable + * Availability of the getting the number of available HD channels. + * True: Available, False: Not Available, Not present: Not Available. + */ + public void setAvailableHDsAvailable(Boolean availableHDsAvailable) { + setValue(KEY_AVAILABLE_HDS_AVAILABLE, availableHDsAvailable); + } + + /** + * Gets the availableHDsAvailable portion of the RadioControlCapabilities class + * + * @return Boolean - Availability of the getting the number of available HD channels. + * True: Available, False: Not Available, Not present: Not Available. + */ + public Boolean getAvailableHDsAvailable() { + return getBoolean(KEY_AVAILABLE_HDS_AVAILABLE); + } + + /** + * Sets the stateAvailable portion of the RadioControlCapabilities class + * + * @param stateAvailable + * Availability of the getting the Radio state. + * True: Available, False: Not Available, Not present: Not Available. + */ + public void setStateAvailable(Boolean stateAvailable) { + setValue(KEY_STATE_AVAILABLE, stateAvailable); + } + + /** + * Gets the stateAvailable portion of the RadioControlCapabilities class + * + * @return Boolean - Availability of the getting the Radio state. + * True: Available, False: Not Available, Not present: Not Available. + */ + public Boolean getStateAvailable() { + return getBoolean(KEY_STATE_AVAILABLE); + } + + /** + * Sets the signalStrengthAvailable portion of the RadioControlCapabilities class + * + * @param signalStrengthAvailable + * Availability of the getting the signal strength. + * True: Available, False: Not Available, Not present: Not Available. + */ + public void setSignalStrengthAvailable(Boolean signalStrengthAvailable) { + setValue(KEY_SIGNAL_STRENGTH_AVAILABLE, signalStrengthAvailable); + } + + /** + * Gets the signalStrengthAvailable portion of the RadioControlCapabilities class + * + * @return Boolean - Availability of the getting the signal strength. + * True: Available, False: Not Available, Not present: Not Available. + */ + public Boolean getSignalStrengthAvailable() { + return getBoolean(KEY_SIGNAL_STRENGTH_AVAILABLE); + } + + /** + * Sets the signalChangeThresholdAvailable portion of the RadioControlCapabilities class + * + * @param signalChangeThresholdAvailable + * Availability of the getting the signal Change Threshold. + * True: Available, False: Not Available, Not present: Not Available. + */ + public void setSignalChangeThresholdAvailable(Boolean signalChangeThresholdAvailable) { + setValue(KEY_SIGNAL_CHANGE_THRESHOLD_AVAILABLE, signalChangeThresholdAvailable); + } + + /** + * Gets the signalChangeThresholdAvailable portion of the RadioControlCapabilities class + * + * @return Boolean - Availability of the getting the signal Change Threshold. + * True: Available, False: Not Available, Not present: Not Available. + */ + public Boolean getSignalChangeThresholdAvailable() { + return getBoolean(KEY_SIGNAL_CHANGE_THRESHOLD_AVAILABLE); + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlData.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlData.java new file mode 100644 index 000000000..90d8a9de0 --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlData.java @@ -0,0 +1,220 @@ +package com.smartdevicelink.proxy.rpc; + +import com.smartdevicelink.proxy.RPCStruct; +import com.smartdevicelink.proxy.rpc.enums.RadioBand; +import com.smartdevicelink.proxy.rpc.enums.RadioState; +import java.util.Hashtable; + +/** + * Include information (both read-only and changeable data) about a + * remote control radio module. + */ +public class RadioControlData extends RPCStruct{ + public static final String KEY_FREQUENCY_INTEGER= "frequencyInteger"; + public static final String KEY_FREQUENCY_FRACTION= "frequencyFraction"; + public static final String KEY_BAND= "band"; + public static final String KEY_RDS_DATA= "rdsData"; + public static final String KEY_AVAILABLE_HDS= "availableHDs"; + public static final String KEY_HD_CHANNEL= "hdChannel"; + public static final String KEY_SIGNAL_STRENGTH= "signalStrength"; + public static final String KEY_SIGNAL_CHANGE_THRESHOLD= "signalChangeThreshold"; + public static final String KEY_RADIO_ENABLE= "radioEnable"; + public static final String KEY_STATE= "state"; + + public RadioControlData() { + } + + public RadioControlData(Hashtable<String, Object> hash) { + super(hash); + } + + /** + * Sets the frequencyInteger portion of the RadioControlData class + * + * @param frequencyInteger + * The integer part of the frequency i.e. for 101.7 this value should be 101 + */ + public void setFrequencyInteger(Integer frequencyInteger) { + setValue(KEY_FREQUENCY_INTEGER, frequencyInteger); + } + + /** + * Gets the frequencyInteger portion of the RadioControlData class + * + * @return Integer - The integer part of the frequency i.e. for 101.7 this value should be 101. + */ + public Integer getFrequencyInteger() { + return getInteger(KEY_FREQUENCY_INTEGER); + } + + /** + * Sets the frequencyFraction portion of the RadioControlData class + * + * @param frequencyFraction + * The fractional part of the frequency i.e. for 101.7 is 7. + */ + public void setFrequencyFraction(Integer frequencyFraction) { + setValue(KEY_FREQUENCY_FRACTION, frequencyFraction); + } + + /** + * Gets the frequencyFraction portion of the RadioControlData class + * + * @return Integer - The fractional part of the frequency i.e. for 101.7 is 7. + */ + public Integer getFrequencyFraction() { + return getInteger(KEY_FREQUENCY_FRACTION); + } + + /** + * Sets the band portion of the RadioControlData class + * + * @param band + * The radio band (AM|FM|XM) of the radio tuner. + */ + public void setBand(RadioBand band) { + setValue(KEY_BAND, band); + } + + /** + * Gets the band portion of the RadioControlData class + * + * @return RadioBand - The radio band (AM|FM|XM) of the radio tuner. + */ + public RadioBand getBand() { + return (RadioBand) getObject(RadioBand.class, KEY_BAND); + } + + /** + * Sets the rdsData portion of the RadioControlData class + * + * @param rdsData + * Read only parameter. See RdsData data type for details. + */ + public void setRdsData(RdsData rdsData) { + setValue(KEY_RDS_DATA, rdsData); + } + + /** + * Gets the rdsData portion of the RadioControlData class + * + * @return RdsData - Read only parameter. See RdsData data type for details. + */ + public RdsData getRdsData() { + return (RdsData) getObject(RdsData.class, KEY_RDS_DATA); + } + + /** + * Sets the availableHDs portion of the RadioControlData class + * + * @param availableHDs + * Number of HD sub-channels if available. + */ + public void setAvailableHDs(Integer availableHDs) { + setValue(KEY_AVAILABLE_HDS, availableHDs); + } + + /** + * Gets the availableHDs portion of the RadioControlData class + * + * @return Integer - Number of HD sub-channels if available. + */ + public Integer getAvailableHDs() { + return getInteger(KEY_AVAILABLE_HDS); + } + + /** + * Sets the hdChannel portion of the RadioControlData class + * + * @param hdChannel + * Current HD sub-channel if available. + */ + public void setHdChannel(Integer hdChannel) { + setValue(KEY_HD_CHANNEL, hdChannel); + } + + /** + * Gets the hdChannel portion of the RadioControlData class + * + * @return Integer - Current HD sub-channel if available. + */ + public Integer getHdChannel() { + return getInteger(KEY_HD_CHANNEL); + } + + /** + * Sets the signalStrength portion of the RadioControlData class + * + * @param signalStrength + * Read only parameter. Indicates the strength of receiving radio signal in current frequency. + */ + public void setSignalStrength(Integer signalStrength) { + setValue(KEY_SIGNAL_STRENGTH, signalStrength); + } + + /** + * Gets the signalStrength portion of the RadioControlData class + * + * @return Integer - Read only parameter. Indicates the strength of receiving radio signal in current frequency. + */ + public Integer getSignalStrength() { + return getInteger(KEY_SIGNAL_STRENGTH); + } + + /** + * Sets the signalChangeThreshold portion of the RadioControlData class + * + * @param signalChangeThreshold + * If the signal strength falls below the set value for this parameter, the radio will tune to an alternative frequency. + */ + public void setSignalChangeThreshold(Integer signalChangeThreshold) { + setValue(KEY_SIGNAL_CHANGE_THRESHOLD, signalChangeThreshold); + } + + /** + * Gets the signalChangeThreshold portion of the RadioControlData class + * + * @return Integer - If the signal strength falls below the set value for this parameter, the radio will tune to an alternative frequency. + */ + public Integer getSignalChangeThreshold() { + return getInteger(KEY_SIGNAL_CHANGE_THRESHOLD); + } + + /** + * Sets the radioEnable portion of the RadioControlData class + * + * @param radioEnable + * True if the radio is on, false is the radio is off. + */ + public void setRadioEnable(Boolean radioEnable) { + setValue(KEY_RADIO_ENABLE, radioEnable); + } + + /** + * Gets the radioEnable portion of the RadioControlData class + * + * @return Boolean - True if the radio is on, false is the radio is off. + */ + public Boolean getRadioEnable() { + return getBoolean(KEY_RADIO_ENABLE); + } + + /** + * Sets the state portion of the RadioControlData class + * + * @param state + * Read only parameter. See RadioState data type for details. + */ + public void setState(RadioState state) { + setValue(KEY_STATE, state); + } + + /** + * Gets the state portion of the RadioControlData class + * + * @return RadioState - Read only parameter. See RadioState data type for details. + */ + public RadioState getState() { + return (RadioState) getObject(RadioState.class, KEY_STATE); + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RdsData.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RdsData.java new file mode 100644 index 000000000..2ed934865 --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RdsData.java @@ -0,0 +1,180 @@ +package com.smartdevicelink.proxy.rpc; + +import com.smartdevicelink.proxy.RPCStruct; + +import java.util.Hashtable; + +/** + * Include the data defined in Radio Data System, which is a communications protocol standard + * for embedding small amounts of digital information in conventional FM radio broadcasts. + */ +public class RdsData extends RPCStruct{ + public static final String KEY_PS= "PS"; + public static final String KEY_RT= "RT"; + public static final String KEY_CT= "CT"; + public static final String KEY_PI= "PI"; + public static final String KEY_PTY= "PTY"; + public static final String KEY_TP= "TP"; + public static final String KEY_TA= "TA"; + public static final String KEY_REG= "REG"; + + public RdsData() { + } + + public RdsData(Hashtable<String, Object> hash) { + super(hash); + } + + /** + * Sets the programService portion of the RdsData class + * + * @param programService + * Program Service Name. + */ + public void setProgramService(String programService) { + setValue(KEY_PS, programService); + } + + /** + * Gets the programService portion of the RdsData class + * + * @return String - Program Service Name. + */ + public String getProgramService() { + return getString(KEY_PS); + } + + /** + * Sets the radioText portion of the RdsData class + * + * @param radioText + * Radio Text. + */ + public void setRadioText(String radioText) { + setValue(KEY_RT, radioText); + } + + /** + * Gets the radioText portion of the RdsData class + * + * @return String - Radio Text. + */ + public String getRadioText() { + return getString(KEY_RT); + } + + /** + * Sets the clockText portion of the RdsData class + * + * @param clockText + * The clock text in UTC format as YYYY-MM-DDThh:mm:ss.sTZD. + */ + public void setClockText(String clockText) { + setValue(KEY_CT, clockText); + } + + /** + * Gets the clockText portion of the RdsData class + * + * @return String - The clock text in UTC format as YYYY-MM-DDThh:mm:ss.sTZD. + */ + public String getClockText() { + return getString(KEY_CT); + } + + /** + * Sets the programIdentification portion of the RdsData class + * + * @param programIdentification + * Program Identification - the call sign for the radio station. + */ + public void setProgramIdentification(String programIdentification) { + setValue(KEY_PI, programIdentification); + } + + /** + * Gets the programIdentification portion of the RdsData class + * + * @return String - Program Identification - the call sign for the radio station. + */ + public String getProgramIdentification() { + return getString(KEY_PI); + } + + /** + * Sets the region portion of the RdsData class + * + * @param region + * Region. + */ + public void setRegion(String region) { + setValue(KEY_REG, region); + } + + /** + * Gets the region portion of the RdsData class + * + * @return String - Region. + */ + public String getRegion() { + return getString(KEY_REG); + } + + /** + * Sets the trafficProgram portion of the RdsData class + * + * @param trafficProgram + * Traffic Program Identification - Identifies a station that offers traffic. + */ + public void setTrafficProgram(Boolean trafficProgram) { + setValue(KEY_TP, trafficProgram); + } + + /** + * Gets the trafficProgram portion of the RdsData class + * + * @return Boolean - Traffic Program Identification - Identifies a station that offers traffic. + */ + public Boolean getTrafficProgram() { + return getBoolean(KEY_TP); + } + + /** + * Sets the trafficAnnouncement portion of the RdsData class + * + * @param trafficAnnouncement + * Traffic Announcement Identification - Indicates an ongoing traffic announcement. + */ + public void setTrafficAnnouncement(Boolean trafficAnnouncement) { + setValue(KEY_TA, trafficAnnouncement); + } + + /** + * Gets the trafficAnnouncement portion of the RdsData class + * + * @return Boolean - Traffic Announcement Identification - Indicates an ongoing traffic announcement. + */ + public Boolean getTrafficAnnouncement() { + return getBoolean(KEY_TA); + } + + /** + * Sets the programType portion of the RdsData class + * + * @param programType + * The program type - The region should be used to differentiate between EU and North America program types. + */ + public void setProgramType(Integer programType) { + setValue(KEY_PTY, programType); + } + + /** + * Gets the programType portion of the RdsData class + * + * @return Integer - The program type. + * The region should be used to differentiate between EU and North America program types. + */ + public Integer getProgramType() { + return getInteger(KEY_PTY); + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RemoteControlCapabilities.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RemoteControlCapabilities.java new file mode 100644 index 000000000..ec51aa633 --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RemoteControlCapabilities.java @@ -0,0 +1,82 @@ +package com.smartdevicelink.proxy.rpc; + +import com.smartdevicelink.proxy.RPCStruct; +import java.util.Hashtable; +import java.util.List; + +public class RemoteControlCapabilities extends RPCStruct{ + public static final String KEY_CLIMATE_CONTROL_CAPABILITIES= "climateControlCapabilities"; + public static final String KEY_RADIO_CONTROL_CAPABILITIES = "radioControlCapabilities"; + public static final String KEY_BUTTON_CAPABILITIES = "buttonCapabilities"; + + public RemoteControlCapabilities() { + } + + public RemoteControlCapabilities(Hashtable<String, Object> hash) { + super(hash); + } + + /** + * Sets the climateControlCapabilities portion of the RemoteControlCapabilities class + * + * @param climateControlCapabilities + * If included, the platform supports RC climate controls. + * For this baseline version, maxsize=1. i.e. only one climate control module is supported. + */ + public void setClimateControlCapabilities(List<ClimateControlCapabilities> climateControlCapabilities) { + setValue(KEY_CLIMATE_CONTROL_CAPABILITIES, climateControlCapabilities); + } + + /** + * Gets the climateControlCapabilities portion of the RemoteControlCapabilities class + * + * @return List<ClimateControlCapabilities> + * If included, the platform supports RC climate controls. + * For this baseline version, maxsize=1. i.e. only one climate control module is supported. + */ + public List<ClimateControlCapabilities> getClimateControlCapabilities() { + return (List<ClimateControlCapabilities>) getObject(ClimateControlCapabilities.class, KEY_CLIMATE_CONTROL_CAPABILITIES); + } + + /** + * Sets the radioControlCapabilities portion of the RemoteControlCapabilities class + * + * @param radioControlCapabilities + * If included, the platform supports RC climate controls. + * For this baseline version, maxsize=1. i.e. only one radio control module is supported. + */ + public void setRadioControlCapabilities(List<RadioControlCapabilities> radioControlCapabilities) { + setValue(KEY_RADIO_CONTROL_CAPABILITIES, radioControlCapabilities); + } + + /** + * Gets the radioControlCapabilities portion of the RemoteControlCapabilities class + * + * @return List<RadioControlCapabilities> + * If included, the platform supports RC climate controls. + * For this baseline version, maxsize=1. i.e. only one radio control module is supported. + */ + public List<RadioControlCapabilities> getRadioControlCapabilities() { + return (List<RadioControlCapabilities>) getObject(RadioControlCapabilities.class, KEY_RADIO_CONTROL_CAPABILITIES); + } + + /** + * Sets the buttonCapabilities portion of the RemoteControlCapabilities class + * + * @param buttonCapabilities + * If included, the platform supports RC button controls with the included button names. + */ + public void setButtonCapabilities(List<ButtonCapabilities> buttonCapabilities) { + setValue(KEY_BUTTON_CAPABILITIES, buttonCapabilities); + } + + /** + * Gets the buttonCapabilities portion of the RemoteControlCapabilities class + * + * @return List<ButtonCapabilities> + * If included, the platform supports RC button controls with the included button names. + */ + public List<ButtonCapabilities> getButtonCapabilities() { + return (List<ButtonCapabilities>) getObject(ButtonCapabilities.class, KEY_BUTTON_CAPABILITIES); + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetInteriorVehicleData.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetInteriorVehicleData.java new file mode 100644 index 000000000..75077e3cb --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetInteriorVehicleData.java @@ -0,0 +1,51 @@ +package com.smartdevicelink.proxy.rpc; + +import com.smartdevicelink.protocol.enums.FunctionID; +import com.smartdevicelink.proxy.RPCRequest; + +import java.util.Hashtable; + +/** + * This function allows a remote control type mobile application change the settings + * of a specific remote control module. + */ +public class SetInteriorVehicleData extends RPCRequest { + public static final String KEY_MODULE_DATA = "moduleData"; + + /** + * Constructs a new SetInteriorVehicleData object + */ + public SetInteriorVehicleData() { + super(FunctionID.SET_INTERIOR_VEHICLE_DATA.toString()); + } + + /** + * <p>Constructs a new SetInteriorVehicleData object indicated by the + * Hashtable parameter</p> + * + * + * @param hash + * The Hashtable to use + */ + public SetInteriorVehicleData(Hashtable<String, Object> hash) { + super(hash); + } + + /** + * Sets the moduleData + * + * @param moduleData + */ + public void setModuleData(ModuleData moduleData) { + setParameters(KEY_MODULE_DATA, moduleData); + } + + /** + * Gets the moduleData + * + * @return ModuleData + */ + public ModuleData getModuleData() { + return (ModuleData) getObject(ModuleData.class, KEY_MODULE_DATA); + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetInteriorVehicleDataResponse.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetInteriorVehicleDataResponse.java new file mode 100644 index 000000000..6a7079735 --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SetInteriorVehicleDataResponse.java @@ -0,0 +1,47 @@ +package com.smartdevicelink.proxy.rpc; + +import com.smartdevicelink.protocol.enums.FunctionID; +import com.smartdevicelink.proxy.RPCResponse; + +import java.util.Hashtable; + +public class SetInteriorVehicleDataResponse extends RPCResponse { + public static final String KEY_MODULE_DATA = "moduleData"; + + /** + * Constructs a new SetInteriorVehicleDataResponse object + */ + public SetInteriorVehicleDataResponse() { + super(FunctionID.SET_INTERIOR_VEHICLE_DATA.toString()); + } + + /** + * <p>Constructs a new SetInteriorVehicleDataResponse object indicated by the + * Hashtable parameter</p> + * + * + * @param hash + * The Hashtable to use + */ + public SetInteriorVehicleDataResponse(Hashtable<String, Object> hash) { + super(hash); + } + + /** + * Gets the moduleData + * + * @return ModuleData + */ + public ModuleData getModuleData() { + return (ModuleData) getObject(ModuleData.class, KEY_MODULE_DATA); + } + + /** + * Sets the moduleData + * + * @param moduleData + */ + public void setModuleData(ModuleData moduleData) { + setParameters(KEY_MODULE_DATA, moduleData); + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SystemCapability.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SystemCapability.java index 2fb2e41e3..386f28b45 100644 --- a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SystemCapability.java +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SystemCapability.java @@ -14,7 +14,7 @@ public class SystemCapability extends RPCStruct { public static final String KEY_NAVIGATION_CAPABILITY = "navigationCapability"; public static final String KEY_PHONE_CAPABILITY = "phoneCapability"; public static final String KEY_VIDEO_STREAMING_CAPABILITY = "videoStreamingCapability"; - + public static final String KEY_REMOTE_CONTROL_CAPABILITY = "remoteControlCapability"; public SystemCapability(){} @@ -44,6 +44,8 @@ public class SystemCapability extends RPCStruct { return (RPCStruct) getObject(PhoneCapability.class, KEY_PHONE_CAPABILITY); } else if (type.equals(SystemCapabilityType.VIDEO_STREAMING)){ return (RPCStruct) getObject(VideoStreamingCapability.class, KEY_VIDEO_STREAMING_CAPABILITY); + }else if(type.equals(SystemCapabilityType.REMOTE_CONTROL)){ + return (RPCStruct) getObject(RemoteControlCapabilities.class, KEY_REMOTE_CONTROL_CAPABILITY); }else{ return null; } @@ -56,6 +58,8 @@ public class SystemCapability extends RPCStruct { setValue(KEY_PHONE_CAPABILITY, capability); }else if(type.equals(SystemCapabilityType.VIDEO_STREAMING)){ setValue(KEY_VIDEO_STREAMING_CAPABILITY, capability); + }else if(type.equals(SystemCapabilityType.REMOTE_CONTROL)){ + setValue(KEY_REMOTE_CONTROL_CAPABILITY, capability); }else{ return; } diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Temperature.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Temperature.java new file mode 100644 index 000000000..29fea734f --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/Temperature.java @@ -0,0 +1,56 @@ +package com.smartdevicelink.proxy.rpc; + +import com.smartdevicelink.proxy.RPCStruct; +import com.smartdevicelink.proxy.rpc.enums.TemperatureUnit; +import com.smartdevicelink.util.SdlDataTypeConverter; + +import java.util.Hashtable; + +public class Temperature extends RPCStruct{ + public static final String KEY_UNIT = "unit"; + public static final String KEY_VALUE = "value"; + + public Temperature() { } + public Temperature(Hashtable<String, Object> hash) { + super(hash); + } + + /** + * Sets the unit portion of the Temperature class + * + * @param unit + * Temperature Unit. + */ + public void setUnit(TemperatureUnit unit) { + setValue(KEY_UNIT, unit); + } + + /** + * Gets the unit portion of the Temperature class + * + * @return TemperatureUnit - Temperature Unit. + */ + public TemperatureUnit getUnit() { + return (TemperatureUnit) getObject(TemperatureUnit.class, KEY_UNIT); + } + + /** + * Gets the value portion of the Temperature class + * + * @return Float - Temperature Value in TemperatureUnit specified unit. Range depends on OEM and is not checked by SDL. + */ + public Float getValue() { + Object value = getValue(KEY_VALUE); + return SdlDataTypeConverter.objectToFloat(value); + } + + /** + * Sets the value portion of the Temperature class + * + * @param value + * Temperature Value in TemperatureUnit specified unit. Range depends on OEM and is not checked by SDL. + */ + public void setValue(Float value) { + setValue(KEY_VALUE, value); + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AppHMIType.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AppHMIType.java index 2a12bec1e..0a4f56255 100644 --- a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AppHMIType.java +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/AppHMIType.java @@ -45,7 +45,12 @@ public enum AppHMIType { /**
* System App
*/
- SYSTEM;
+ SYSTEM,
+ /**
+ * Remote Control
+ */
+ REMOTE_CONTROL,
+ ;
/**
* Convert String to AppHMIType
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ButtonName.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ButtonName.java index 1391a9d44..f478a78ee 100644 --- a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ButtonName.java +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ButtonName.java @@ -115,7 +115,28 @@ public enum ButtonName{ *
* @since SmartDeviceLink 1.0
*/
- PRESET_9, CUSTOM_BUTTON, SEARCH;
+ PRESET_9,
+ CUSTOM_BUTTON,
+ SEARCH,
+ AC_MAX,
+ AC,
+ RECIRCULATE,
+ FAN_UP,
+ FAN_DOWN,
+ TEMP_UP,
+ TEMP_DOWN,
+ DEFROST_MAX,
+ DEFROST,
+ DEFROST_REAR,
+ UPPER_VENT,
+ LOWER_VENT,
+ VOLUME_UP,
+ VOLUME_DOWN,
+ EJECT,
+ SOURCE,
+ SHUFFLE,
+ REPEAT,
+ ;
public static ButtonName valueForString(String value) {
try{
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DefrostZone.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DefrostZone.java new file mode 100644 index 000000000..4c6b15e85 --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DefrostZone.java @@ -0,0 +1,17 @@ +package com.smartdevicelink.proxy.rpc.enums; + +public enum DefrostZone { + FRONT, + REAR, + ALL, + NONE, + ; + + public static DefrostZone valueForString(String value) { + try{ + return valueOf(value); + }catch(Exception e){ + return null; + } + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ModuleType.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ModuleType.java new file mode 100644 index 000000000..faef92d36 --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ModuleType.java @@ -0,0 +1,15 @@ +package com.smartdevicelink.proxy.rpc.enums; + +public enum ModuleType { + CLIMATE, + RADIO, + ; + + public static ModuleType valueForString(String value) { + try{ + return valueOf(value); + }catch(Exception e){ + return null; + } + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/RadioBand.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/RadioBand.java new file mode 100644 index 000000000..2b2c862d8 --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/RadioBand.java @@ -0,0 +1,16 @@ +package com.smartdevicelink.proxy.rpc.enums; + +public enum RadioBand { + AM, + FM, + XM, + ; + + public static RadioBand valueForString(String value) { + try{ + return valueOf(value); + }catch(Exception e){ + return null; + } + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/RadioState.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/RadioState.java new file mode 100644 index 000000000..533c86dca --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/RadioState.java @@ -0,0 +1,20 @@ +package com.smartdevicelink.proxy.rpc.enums; + +/** + * List possible states of a remote control radio module. + */ +public enum RadioState { + ACQUIRING, + ACQUIRED, + MULTICAST, + NOT_FOUND, + ; + + public static RadioState valueForString(String value) { + try{ + return valueOf(value); + }catch(Exception e){ + return null; + } + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Result.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Result.java index 870e4115e..c0a15f235 100644 --- a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Result.java +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/Result.java @@ -168,7 +168,16 @@ public enum Result { /**
* The provided hash ID does not match the hash of the current set of registered data or the core could not resume the previous data.
*/
- RESUME_FAILED;
+ RESUME_FAILED,
+ /**
+ * The requested data is not available on this vehicle or is not published for the connected app.
+ */
+ DATA_NOT_AVAILABLE,
+ /**
+ * The requested data is read only thus cannot be change via remote control
+ */
+ READ_ONLY,
+ ;
/**
* Convert String to Result
* @param value String
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TemperatureUnit.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TemperatureUnit.java new file mode 100644 index 000000000..6c9b04875 --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/TemperatureUnit.java @@ -0,0 +1,14 @@ +package com.smartdevicelink.proxy.rpc.enums; + +public enum TemperatureUnit { + CELSIUS, + FAHRENHEIT; + + public static TemperatureUnit valueForString(String value) { + try{ + return valueOf(value); + }catch(Exception e){ + return null; + } + } +} diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VentilationMode.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VentilationMode.java new file mode 100644 index 000000000..b7a2ae9a2 --- /dev/null +++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VentilationMode.java @@ -0,0 +1,17 @@ +package com.smartdevicelink.proxy.rpc.enums; + +public enum VentilationMode { + UPPER, + LOWER, + BOTH, + NONE, + ; + + public static VentilationMode valueForString(String value) { + try{ + return valueOf(value); + }catch(Exception e){ + return null; + } + } +} |