summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Grover <joeygrover@gmail.com>2018-08-30 12:45:05 -0400
committerGitHub <noreply@github.com>2018-08-30 12:45:05 -0400
commit6aa0acbeb18adc3b8c7e17ef8dc5795673713d48 (patch)
tree6d816697f334a95cfac8f7ff8a6df3fcdb6bd111
parentf302357e79c1725513379c23fa345e97a718e237 (diff)
parent9031e8037f45f6f6acdc19901e804ccb3f17db32 (diff)
downloadsdl_android-6aa0acbeb18adc3b8c7e17ef8dc5795673713d48.tar.gz
Merge pull request #712 from mrapitis/feature/issue_624
Feature/issue 624,751,809,803 -Remote Control Modules (LIGHT, AUDIO, HMI_SETTINGS) and parameters (SIS Data)
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/Test.java86
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/Validator.java357
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/AudioControlCapabilitiesTests.java89
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/AudioControlDataTests.java98
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/ClimateControlCapabilitiesTests.java22
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/ClimateControlDataTests.java22
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/EqualizerSettingsTests.java78
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/HMISettingsControlCapabilitiesTests.java80
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/HMISettingsControlDataTests.java78
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/LightCapabilitiesTests.java81
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/LightControlCapabilitiesTests.java86
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/LightControlDataTests.java79
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/LightStateTests.java94
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/ModuleDataTests.java37
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/RadioControlCapabilitiesTests.java7
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/RadioControlDataTests.java16
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/RemoteControlCapabilitiesTests.java40
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/SisDataTests.java105
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/StationIDNumberTests.java73
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/DisplayModeTests.java74
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/DistanceUnitTests.java69
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/LightNameTests.java261
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/LightStatusTests.java86
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/ModuleTypeTests.java40
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/PrimaryAudioSourceTests.java68
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AudioControlCapabilities.java131
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AudioControlData.java113
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ClimateControlCapabilities.java84
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ClimateControlData.java77
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/EqualizerSettings.java97
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GPSData.java53
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HMISettingsControlCapabilities.java107
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HMISettingsControlData.java79
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LightCapabilities.java113
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LightControlCapabilities.java78
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LightControlData.java58
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LightState.java119
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ModuleData.java57
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlCapabilities.java21
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlData.java19
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RemoteControlCapabilities.java58
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SisData.java123
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/StationIDNumber.java54
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DisplayMode.java16
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DistanceUnit.java15
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/LightName.java134
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/LightStatus.java19
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/ModuleType.java3
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PrimaryAudioSource.java29
49 files changed, 3703 insertions, 80 deletions
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/Test.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/Test.java
index 36a2deef9..e15c99e6f 100644
--- a/sdl_android/src/androidTest/java/com/smartdevicelink/test/Test.java
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/Test.java
@@ -3,6 +3,8 @@ package com.smartdevicelink.test;
import android.util.Log;
import com.smartdevicelink.proxy.TTSChunkFactory;
+import com.smartdevicelink.proxy.rpc.AudioControlCapabilities;
+import com.smartdevicelink.proxy.rpc.AudioControlData;
import com.smartdevicelink.proxy.rpc.AudioPassThruCapabilities;
import com.smartdevicelink.proxy.rpc.ButtonCapabilities;
import com.smartdevicelink.proxy.rpc.Choice;
@@ -12,13 +14,20 @@ import com.smartdevicelink.proxy.rpc.Coordinate;
import com.smartdevicelink.proxy.rpc.DIDResult;
import com.smartdevicelink.proxy.rpc.DeviceInfo;
import com.smartdevicelink.proxy.rpc.DisplayCapabilities;
+import com.smartdevicelink.proxy.rpc.EqualizerSettings;
import com.smartdevicelink.proxy.rpc.HMICapabilities;
import com.smartdevicelink.proxy.rpc.HMIPermissions;
+import com.smartdevicelink.proxy.rpc.HMISettingsControlCapabilities;
+import com.smartdevicelink.proxy.rpc.HMISettingsControlData;
import com.smartdevicelink.proxy.rpc.HapticRect;
import com.smartdevicelink.proxy.rpc.Image;
import com.smartdevicelink.proxy.rpc.ImageField;
import com.smartdevicelink.proxy.rpc.ImageResolution;
import com.smartdevicelink.proxy.rpc.KeyboardProperties;
+import com.smartdevicelink.proxy.rpc.LightCapabilities;
+import com.smartdevicelink.proxy.rpc.LightControlCapabilities;
+import com.smartdevicelink.proxy.rpc.LightControlData;
+import com.smartdevicelink.proxy.rpc.LightState;
import com.smartdevicelink.proxy.rpc.LocationDetails;
import com.smartdevicelink.proxy.rpc.MassageCushionFirmness;
import com.smartdevicelink.proxy.rpc.MassageModeData;
@@ -43,9 +52,11 @@ import com.smartdevicelink.proxy.rpc.SeatControlCapabilities;
import com.smartdevicelink.proxy.rpc.SeatControlData;
import com.smartdevicelink.proxy.rpc.SeatMemoryAction;
import com.smartdevicelink.proxy.rpc.SingleTireStatus;
+import com.smartdevicelink.proxy.rpc.SisData;
import com.smartdevicelink.proxy.rpc.SoftButton;
import com.smartdevicelink.proxy.rpc.SoftButtonCapabilities;
import com.smartdevicelink.proxy.rpc.StartTime;
+import com.smartdevicelink.proxy.rpc.StationIDNumber;
import com.smartdevicelink.proxy.rpc.SystemCapability;
import com.smartdevicelink.proxy.rpc.TTSChunk;
import com.smartdevicelink.proxy.rpc.Temperature;
@@ -77,7 +88,9 @@ import com.smartdevicelink.proxy.rpc.enums.ComponentVolumeStatus;
import com.smartdevicelink.proxy.rpc.enums.DefrostZone;
import com.smartdevicelink.proxy.rpc.enums.DeviceLevelStatus;
import com.smartdevicelink.proxy.rpc.enums.Dimension;
+import com.smartdevicelink.proxy.rpc.enums.DisplayMode;
import com.smartdevicelink.proxy.rpc.enums.DisplayType;
+import com.smartdevicelink.proxy.rpc.enums.DistanceUnit;
import com.smartdevicelink.proxy.rpc.enums.DriverDistractionState;
import com.smartdevicelink.proxy.rpc.enums.ECallConfirmationStatus;
import com.smartdevicelink.proxy.rpc.enums.EmergencyEventType;
@@ -97,6 +110,8 @@ import com.smartdevicelink.proxy.rpc.enums.KeyboardLayout;
import com.smartdevicelink.proxy.rpc.enums.KeypressMode;
import com.smartdevicelink.proxy.rpc.enums.Language;
import com.smartdevicelink.proxy.rpc.enums.LayoutMode;
+import com.smartdevicelink.proxy.rpc.enums.LightName;
+import com.smartdevicelink.proxy.rpc.enums.LightStatus;
import com.smartdevicelink.proxy.rpc.enums.LockScreenStatus;
import com.smartdevicelink.proxy.rpc.enums.MassageCushion;
import com.smartdevicelink.proxy.rpc.enums.MassageMode;
@@ -288,16 +303,31 @@ public class Test {
public static final TemperatureUnit GENERAL_TEMPERATUREUNIT = TemperatureUnit.CELSIUS;
public static final DefrostZone GENERAL_DEFROSTZONE = DefrostZone.ALL;
public static final VentilationMode GENERAL_VENTILATIONMODE = VentilationMode.BOTH;
+ public static final LightName GENERAL_LIGHTNAME = LightName.AMBIENT_LIGHTS;
+ public static final DisplayMode GENERAL_DISPLAYMODE = DisplayMode.AUTO;
+ public static final DistanceUnit GENERAL_DISTANCEUNIT = DistanceUnit.KILOMETERS;
+ public static final LightStatus GENERAL_LIGHTSTATUS = LightStatus.OFF;
public static final RadioBand GENERAL_RADIOBAND = RadioBand.AM;
public static final ClimateControlData GENERAL_CLIMATECONTROLDATA = new ClimateControlData();
public static final SeatControlData GENERAL_SEATCONTROLDATA = new SeatControlData();
public static final RdsData GENERAL_RDSDATA = new RdsData();
+ public static final StationIDNumber GENERAL_STATIONIDNUMBER = new StationIDNumber();
+ public static final SisData GENERAL_SISDATA = new SisData();
public static final RadioState GENERAL_RADIOSTATE = RadioState.ACQUIRED;
public static final RadioControlData GENERAL_RADIOCONTROLDATA = new RadioControlData();
public static final ModuleData GENERAL_MODULEDATA = new ModuleData();
public static final ClimateControlCapabilities GENERAL_CLIMATECONTROLCAPABILITIES = new ClimateControlCapabilities();
public static final RadioControlCapabilities GENERAL_RADIOCONTROLCAPABILITIES = new RadioControlCapabilities();
public static final SeatControlCapabilities GENERAL_SEATCONTROLCAPABILITIES = new SeatControlCapabilities();
+ public static final EqualizerSettings GENERAL_EQUALIZERSETTINGS = new EqualizerSettings();
+ public static final LightCapabilities GENERAL_LIGHTCAPABILITIES = new LightCapabilities();
+ public static final LightState GENERAL_LIGHTSTATE = new LightState();
+ public static final AudioControlCapabilities GENERAL_AUDIOCONTROLCAPABILITIES = new AudioControlCapabilities();
+ public static final HMISettingsControlCapabilities GENERAL_HMISETTINGSCONTROLCAPABILITIES = new HMISettingsControlCapabilities();
+ public static final LightControlCapabilities GENERAL_LIGHTCONTROLCAPABILITIES = new LightControlCapabilities();
+ public static final AudioControlData GENERAL_AUDIOCONTROLDATA = new AudioControlData();
+ public static final LightControlData GENERAL_LIGHTCONTROLDATA = new LightControlData();
+ public static final HMISettingsControlData GENERAL_HMISETTINGSCONTROLDATA = new HMISettingsControlData();
public static final HMICapabilities GENERAL_HMICAPABILITIES = new HMICapabilities();
@@ -341,6 +371,10 @@ public class Test {
public static final List<ClimateControlCapabilities> GENERAL_CLIMATECONTROLCAPABILITIES_LIST = new ArrayList<ClimateControlCapabilities>(1);
public static final List<RadioControlCapabilities> GENERAL_RADIOCONTROLCAPABILITIES_LIST = new ArrayList<RadioControlCapabilities>(1);
public static final List<SeatControlCapabilities> GENERAL_SEATCONTROLCAPABILITIES_LIST = new ArrayList<SeatControlCapabilities>(1);
+ public static final List<EqualizerSettings> GENERAL_EQUALIZERSETTINGS_LIST = new ArrayList<EqualizerSettings>(1);
+ public static final List<LightCapabilities> GENERAL_LIGHTCAPABILITIES_LIST = new ArrayList<LightCapabilities>(1);
+ public static final List<LightState> GENERAL_LIGHTSTATE_LIST = new ArrayList<LightState>(1);
+ public static final List<AudioControlCapabilities> GENERAL_AUDIOCONTROLCAPABILITIES_LIST = new ArrayList<AudioControlCapabilities>(1);
public static final JSONArray JSON_TURNS = new JSONArray();
public static final JSONArray JSON_CHOICES = new JSONArray();
@@ -431,6 +465,27 @@ public class Test {
GENERAL_SEATCONTROLDATA.setCoolingEnabled(GENERAL_BOOLEAN);
GENERAL_SEATCONTROLDATA.setId(GENERAL_SUPPORTEDSEAT);
+ GENERAL_AUDIOCONTROLDATA.setSource(GENERAL_PRIMARYAUDIOSOURCE);
+ GENERAL_AUDIOCONTROLDATA.setVolume(GENERAL_INT);
+ GENERAL_AUDIOCONTROLDATA.setKeepContext(GENERAL_BOOLEAN);
+ GENERAL_AUDIOCONTROLDATA.setEqualizerSettings(GENERAL_EQUALIZERSETTINGS_LIST);
+
+ GENERAL_HMISETTINGSCONTROLDATA.setDistanceUnit(GENERAL_DISTANCEUNIT);
+ GENERAL_HMISETTINGSCONTROLDATA.setTemperatureUnit(GENERAL_TEMPERATUREUNIT);
+ GENERAL_HMISETTINGSCONTROLDATA.setDisplayMode(GENERAL_DISPLAYMODE);
+
+ GENERAL_LIGHTCONTROLDATA.setLightState(GENERAL_LIGHTSTATE_LIST);
+
+ GENERAL_STATIONIDNUMBER.setCountryCode(GENERAL_INT);
+ GENERAL_STATIONIDNUMBER.setFccFacilityId(GENERAL_INT);
+
+ GENERAL_SISDATA.setStationMessage(GENERAL_STRING);
+ GENERAL_SISDATA.setStationLocation(VehicleDataHelper.GPS);
+
+ GENERAL_SISDATA.setStationLongName(GENERAL_STRING);
+ GENERAL_SISDATA.setStationIDNumber(GENERAL_STATIONIDNUMBER);
+ GENERAL_SISDATA.setStationShortName(GENERAL_STRING);
+
GENERAL_RDSDATA.setProgramService(GENERAL_STRING);
GENERAL_RDSDATA.setRadioText(GENERAL_STRING);
GENERAL_RDSDATA.setClockText(GENERAL_STRING);
@@ -704,6 +759,37 @@ public class Test {
GENERAL_SEATCONTROLCAPABILITIES.setModuleName(GENERAL_STRING);
GENERAL_SEATCONTROLCAPABILITIES_LIST.add(GENERAL_SEATCONTROLCAPABILITIES);
+ GENERAL_AUDIOCONTROLCAPABILITIES.setEqualizerMaxChannelId(GENERAL_INT);
+ GENERAL_AUDIOCONTROLCAPABILITIES.setEqualizerAvailable(GENERAL_BOOLEAN);
+ GENERAL_AUDIOCONTROLCAPABILITIES.setVolumeAvailable(GENERAL_BOOLEAN);
+ GENERAL_AUDIOCONTROLCAPABILITIES.setSourceAvailable(GENERAL_BOOLEAN);
+ GENERAL_AUDIOCONTROLCAPABILITIES.setModuleName(GENERAL_STRING);
+ GENERAL_AUDIOCONTROLCAPABILITIES_LIST.add(GENERAL_AUDIOCONTROLCAPABILITIES);
+
+ GENERAL_HMISETTINGSCONTROLCAPABILITIES.setDisplayModeUnitAvailable(GENERAL_BOOLEAN);
+ GENERAL_HMISETTINGSCONTROLCAPABILITIES.setDistanceUnitAvailable(GENERAL_BOOLEAN);
+ GENERAL_HMISETTINGSCONTROLCAPABILITIES.setTemperatureUnitAvailable(GENERAL_BOOLEAN);
+ GENERAL_HMISETTINGSCONTROLCAPABILITIES.setModuleName(GENERAL_STRING);
+
+ GENERAL_LIGHTCONTROLCAPABILITIES.setSupportedLights(GENERAL_LIGHTCAPABILITIES_LIST);
+ GENERAL_LIGHTCONTROLCAPABILITIES.setModuleName(GENERAL_STRING);
+
+ GENERAL_EQUALIZERSETTINGS.setChannelSetting(GENERAL_INT);
+ GENERAL_EQUALIZERSETTINGS.setChannelName(GENERAL_STRING);
+ GENERAL_EQUALIZERSETTINGS.setChannelId(GENERAL_INT);
+ GENERAL_EQUALIZERSETTINGS_LIST.add(GENERAL_EQUALIZERSETTINGS);
+
+ GENERAL_LIGHTCAPABILITIES.setName(GENERAL_LIGHTNAME);
+ GENERAL_LIGHTCAPABILITIES.setDensityAvailable(GENERAL_BOOLEAN);
+ GENERAL_LIGHTCAPABILITIES.setRGBColorSpaceAvailable(GENERAL_BOOLEAN);
+ GENERAL_LIGHTCAPABILITIES_LIST.add(GENERAL_LIGHTCAPABILITIES);
+
+ GENERAL_LIGHTSTATE.setId(GENERAL_LIGHTNAME);
+ GENERAL_LIGHTSTATE.setDensity(GENERAL_FLOAT);
+ GENERAL_LIGHTSTATE.setStatus(GENERAL_LIGHTSTATUS);
+ GENERAL_LIGHTSTATE.setColor(GENERAL_RGBCOLOR);
+ GENERAL_LIGHTSTATE_LIST.add(GENERAL_LIGHTSTATE);
+
GENERAL_REMOTECONTROLCAPABILITIES.setButtonCapabilities(GENERAL_BUTTONCAPABILITIES_LIST);
GENERAL_REMOTECONTROLCAPABILITIES.setClimateControlCapabilities(GENERAL_CLIMATECONTROLCAPABILITIES_LIST);
GENERAL_REMOTECONTROLCAPABILITIES.setRadioControlCapabilities(GENERAL_RADIOCONTROLCAPABILITIES_LIST);
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/Validator.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/Validator.java
index 3786f0ca6..7c9c665ca 100644
--- a/sdl_android/src/androidTest/java/com/smartdevicelink/test/Validator.java
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/Validator.java
@@ -5,6 +5,8 @@ import com.smartdevicelink.protocol.enums.FrameDataControlFrameType;
import com.smartdevicelink.protocol.enums.FrameType;
import com.smartdevicelink.protocol.enums.SessionType;
import com.smartdevicelink.proxy.rpc.AirbagStatus;
+import com.smartdevicelink.proxy.rpc.AudioControlCapabilities;
+import com.smartdevicelink.proxy.rpc.AudioControlData;
import com.smartdevicelink.proxy.rpc.AudioPassThruCapabilities;
import com.smartdevicelink.proxy.rpc.BeltStatus;
import com.smartdevicelink.proxy.rpc.BodyInformation;
@@ -20,16 +22,23 @@ import com.smartdevicelink.proxy.rpc.DeviceStatus;
import com.smartdevicelink.proxy.rpc.DisplayCapabilities;
import com.smartdevicelink.proxy.rpc.ECallInfo;
import com.smartdevicelink.proxy.rpc.EmergencyEvent;
+import com.smartdevicelink.proxy.rpc.EqualizerSettings;
import com.smartdevicelink.proxy.rpc.FuelRange;
import com.smartdevicelink.proxy.rpc.GPSData;
import com.smartdevicelink.proxy.rpc.HMICapabilities;
import com.smartdevicelink.proxy.rpc.HMIPermissions;
+import com.smartdevicelink.proxy.rpc.HMISettingsControlCapabilities;
+import com.smartdevicelink.proxy.rpc.HMISettingsControlData;
import com.smartdevicelink.proxy.rpc.HeadLampStatus;
import com.smartdevicelink.proxy.rpc.Headers;
import com.smartdevicelink.proxy.rpc.Image;
import com.smartdevicelink.proxy.rpc.ImageField;
import com.smartdevicelink.proxy.rpc.ImageResolution;
import com.smartdevicelink.proxy.rpc.KeyboardProperties;
+import com.smartdevicelink.proxy.rpc.LightCapabilities;
+import com.smartdevicelink.proxy.rpc.LightControlCapabilities;
+import com.smartdevicelink.proxy.rpc.LightControlData;
+import com.smartdevicelink.proxy.rpc.LightState;
import com.smartdevicelink.proxy.rpc.MassageCushionFirmness;
import com.smartdevicelink.proxy.rpc.MassageModeData;
import com.smartdevicelink.proxy.rpc.MenuParams;
@@ -53,9 +62,11 @@ import com.smartdevicelink.proxy.rpc.SeatControlCapabilities;
import com.smartdevicelink.proxy.rpc.SeatControlData;
import com.smartdevicelink.proxy.rpc.SeatMemoryAction;
import com.smartdevicelink.proxy.rpc.SingleTireStatus;
+import com.smartdevicelink.proxy.rpc.SisData;
import com.smartdevicelink.proxy.rpc.SoftButton;
import com.smartdevicelink.proxy.rpc.SoftButtonCapabilities;
import com.smartdevicelink.proxy.rpc.StartTime;
+import com.smartdevicelink.proxy.rpc.StationIDNumber;
import com.smartdevicelink.proxy.rpc.TTSChunk;
import com.smartdevicelink.proxy.rpc.Temperature;
import com.smartdevicelink.proxy.rpc.TemplateColorScheme;
@@ -637,6 +648,52 @@ public class Validator{
return true;
}
+ public static boolean validateHMISettingsControlCapabilities(HMISettingsControlCapabilities hmiSettingsControlCapabilities1, HMISettingsControlCapabilities hmiSettingsControlCapabilities2){
+ if(hmiSettingsControlCapabilities1 == null){
+ return ( hmiSettingsControlCapabilities2 == null );
+ }
+ if(hmiSettingsControlCapabilities2 == null){
+ return ( hmiSettingsControlCapabilities1 == null );
+ }
+
+ if(hmiSettingsControlCapabilities1.getModuleName() != hmiSettingsControlCapabilities2.getModuleName()){
+ return false;
+ }
+
+ if(hmiSettingsControlCapabilities1.getDisplayModeUnitAvailable() != hmiSettingsControlCapabilities2.getDisplayModeUnitAvailable()){
+ return false;
+ }
+
+ if(hmiSettingsControlCapabilities1.getDistanceUnitAvailable() != hmiSettingsControlCapabilities2.getDistanceUnitAvailable()){
+ return false;
+ }
+
+ if(hmiSettingsControlCapabilities1.getTemperatureUnitAvailable() != hmiSettingsControlCapabilities2.getTemperatureUnitAvailable()){
+ return false;
+ }
+
+ return true;
+ }
+
+ public static boolean validateLightControlCapabilities(LightControlCapabilities lightControlCapabilities1, LightControlCapabilities lightControlCapabilities2){
+ if(lightControlCapabilities1 == null){
+ return ( lightControlCapabilities2 == null );
+ }
+ if(lightControlCapabilities2 == null){
+ return ( lightControlCapabilities1 == null );
+ }
+
+ if(lightControlCapabilities1.getModuleName() != lightControlCapabilities2.getModuleName()){
+ return false;
+ }
+
+ if(!( validateLightCapabilitiesList(lightControlCapabilities1.getSupportedLights(), lightControlCapabilities2.getSupportedLights()) )){
+ return false;
+ }
+
+ return true;
+ }
+
public static boolean validateClimateControlData(ClimateControlData climateControlData1, ClimateControlData climateControlData2){
if(climateControlData1 == null){
return ( climateControlData2 == null );
@@ -769,6 +826,72 @@ public class Validator{
return true;
}
+ public static boolean validateAudioControlData(AudioControlData audioControlData1, AudioControlData audioControlData2) {
+ if (audioControlData1 == null) {
+ return (audioControlData2 == null);
+ }
+ if (audioControlData2 == null) {
+ return (audioControlData1 == null);
+ }
+
+ if (audioControlData1.getKeepContext() != audioControlData2.getKeepContext()) {
+ return false;
+ }
+
+ if (audioControlData1.getSource() != audioControlData2.getSource()) {
+ return false;
+ }
+
+ if (audioControlData1.getVolume() != audioControlData2.getVolume()) {
+ return false;
+ }
+
+ if (!(validateEqualizerSettingsList(audioControlData1.getEqualizerSettings(), audioControlData2.getEqualizerSettings()))) {
+ return false;
+ }
+
+
+ return true;
+ }
+
+ public static boolean validateHMISettingsControlData(HMISettingsControlData hmiSettingsControlData1, HMISettingsControlData hmiSettingsControlData2) {
+ if (hmiSettingsControlData1 == null) {
+ return (hmiSettingsControlData2 == null);
+ }
+ if (hmiSettingsControlData2 == null) {
+ return (hmiSettingsControlData1 == null);
+ }
+
+ if (hmiSettingsControlData1.getDisplayMode() != hmiSettingsControlData2.getDisplayMode()) {
+ return false;
+ }
+
+ if (hmiSettingsControlData1.getDistanceUnit() != hmiSettingsControlData2.getDistanceUnit()) {
+ return false;
+ }
+
+ if (hmiSettingsControlData1.getTemperatureUnit() != hmiSettingsControlData2.getTemperatureUnit()) {
+ return false;
+ }
+
+ return true;
+ }
+
+ public static boolean validateLightControlData(LightControlData lightControlData1, LightControlData lightControlData2) {
+ if (lightControlData1 == null) {
+ return (lightControlData2 == null);
+ }
+ if (lightControlData2 == null) {
+ return (lightControlData1 == null);
+ }
+
+ if (!(validateLightStateList(lightControlData1.getLightState(), lightControlData2.getLightState()))) {
+ return false;
+ }
+
+ return true;
+ }
+
public static boolean validateModuleData(ModuleData moduleData1, ModuleData moduleData2){
if(moduleData1 == null){
return ( moduleData2 == null );
@@ -795,6 +918,56 @@ public class Validator{
return true;
}
+ public static boolean validateSisData(SisData sisData1, SisData sisData2) {
+ if (sisData1 == null) {
+ return (sisData2 == null);
+ }
+ if (sisData2 == null) {
+ return (sisData1 == null);
+ }
+
+ if (sisData1.getStationShortName() != sisData2.getStationShortName()) {
+ return false;
+ }
+
+ if (!(validateStationIDNumber(sisData1.getStationIDNumber(), sisData2.getStationIDNumber()))) {
+ return false;
+ }
+
+ if (sisData1.getStationLongName() != sisData2.getStationLongName()) {
+ return false;
+ }
+
+ if (!(validateGpsData(sisData1.getStationLocation(), sisData2.getStationLocation()))) {
+ return false;
+ }
+
+ if (sisData1.getStationMessage() != sisData2.getStationMessage()) {
+ return false;
+ }
+
+ return true;
+ }
+
+ public static boolean validateStationIDNumber(StationIDNumber stationIDNumber1, StationIDNumber stationIDNumber2){
+ if(stationIDNumber1 == null){
+ return ( stationIDNumber2 == null );
+ }
+ if(stationIDNumber2 == null){
+ return ( stationIDNumber1 == null );
+ }
+
+ if(stationIDNumber1.getCountryCode() != stationIDNumber2.getCountryCode()){
+ return false;
+ }
+
+ if(stationIDNumber1.getFccFacilityId() != stationIDNumber2.getFccFacilityId()){
+ return false;
+ }
+
+ return true;
+ }
+
public static boolean validateRemoteControlCapabilities(RemoteControlCapabilities remoteControlCapabilities1, RemoteControlCapabilities remoteControlCapabilities2){
if(remoteControlCapabilities1 == null){
return ( remoteControlCapabilities2 == null );
@@ -2145,6 +2318,190 @@ public class Validator{
return true;
}
+ public static boolean validateAudioControlCapabilities(AudioControlCapabilities item1, AudioControlCapabilities item2) {
+ if (item1 == null) {
+ return (item2 == null);
+ }
+ if (item2 == null) {
+ return (item1 == null);
+ }
+
+ if (item1.getModuleName() != item2.getModuleName()) {
+ return false;
+ }
+ if (item1.getSourceAvailable() != item2.getSourceAvailable()) {
+ return false;
+ }
+ if (item1.getVolumeAvailable() != item2.getVolumeAvailable()) {
+ return false;
+ }
+ if (item1.getEqualizerAvailable() != item2.getEqualizerAvailable()) {
+ return false;
+ }
+ if (item1.getEqualizerMaxChannelId() != item2.getEqualizerMaxChannelId()) {
+ return false;
+ }
+
+ return true;
+ }
+
+ public static boolean validateEqualizerSettingsList(List<EqualizerSettings> item1, List<EqualizerSettings> item2) {
+ if (item1 == null) {
+ return (item2 == null);
+ }
+ if (item2 == null) {
+ return (item1 == null);
+ }
+
+ if (item1.size() != item2.size()) {
+ return false;
+ }
+
+ for (int i = 0; i < item1.size(); i++) {
+ if (!validateEqualizerSettings(item1.get(i), item2.get(i))) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public static boolean validateEqualizerSettings(EqualizerSettings item1, EqualizerSettings item2) {
+ if (item1 == null) {
+ return (item2 == null);
+ }
+ if (item2 == null) {
+ return (item1 == null);
+ }
+
+ if (item1.getChannelId() != item2.getChannelId()) {
+ return false;
+ }
+
+ if (item1.getChannelName() != item2.getChannelName()) {
+ return false;
+ }
+
+ if (item1.getChannelSetting() != item2.getChannelSetting()) {
+ return false;
+ }
+
+ return true;
+ }
+
+ public static boolean validateLightStateList(List<LightState> item1, List<LightState> item2) {
+ if (item1 == null) {
+ return (item2 == null);
+ }
+ if (item2 == null) {
+ return (item1 == null);
+ }
+
+ if (item1.size() != item2.size()) {
+ return false;
+ }
+
+ for (int i = 0; i < item1.size(); i++) {
+ if (!validateLightState(item1.get(i), item2.get(i))) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public static boolean validateLightState(LightState item1, LightState item2) {
+ if (item1 == null) {
+ return (item2 == null);
+ }
+ if (item2 == null) {
+ return (item1 == null);
+ }
+
+ if (item1.getId() != item2.getId()) {
+ return false;
+ }
+
+ if (item1.getStatus() != item2.getStatus()) {
+ return false;
+ }
+
+ if (item1.getDensity() != item2.getDensity()) {
+ return false;
+ }
+
+ if (!(validateRGBColor(item1.getColor(), item2.getColor()))) {
+ return false;
+ }
+
+ return true;
+ }
+
+ public static boolean validateLightCapabilitiesList(List<LightCapabilities> item1, List<LightCapabilities> item2) {
+ if (item1 == null) {
+ return (item2 == null);
+ }
+ if (item2 == null) {
+ return (item1 == null);
+ }
+
+ if (item1.size() != item2.size()) {
+ return false;
+ }
+
+ for (int i = 0; i < item1.size(); i++) {
+ if (!validateLightCapabilities(item1.get(i), item2.get(i))) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public static boolean validateLightCapabilities(LightCapabilities item1, LightCapabilities item2) {
+ if (item1 == null) {
+ return (item2 == null);
+ }
+ if (item2 == null) {
+ return (item1 == null);
+ }
+
+ if (item1.getName() != item2.getName()) {
+ return false;
+ }
+
+ if (item1.getDensityAvailable() != item2.getDensityAvailable()) {
+ return false;
+ }
+
+ if (item1.getRGBColorSpaceAvailable() != item2.getRGBColorSpaceAvailable()) {
+ return false;
+ }
+
+ return true;
+ }
+
+ public static boolean validateAudioControlCapabilitiesList(List<AudioControlCapabilities> item1, List<AudioControlCapabilities> item2) {
+ if (item1 == null) {
+ return (item2 == null);
+ }
+ if (item2 == null) {
+ return (item1 == null);
+ }
+
+ if (item1.size() != item2.size()) {
+ return false;
+ }
+
+ for (int i = 0; i < item1.size(); i++) {
+ if (!validateAudioControlCapabilities(item1.get(i), item2.get(i))) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
public static boolean validateDefrostZones (List<DefrostZone> item1, List<DefrostZone> item2) {
if (item1 == null) {
return ( item2 == null );
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/AudioControlCapabilitiesTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/AudioControlCapabilitiesTests.java
new file mode 100644
index 000000000..866f43d3e
--- /dev/null
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/AudioControlCapabilitiesTests.java
@@ -0,0 +1,89 @@
+package com.smartdevicelink.test.rpc.datatypes;
+
+import com.smartdevicelink.proxy.rpc.AudioControlCapabilities;
+import com.smartdevicelink.test.JsonUtils;
+import com.smartdevicelink.test.Test;
+
+import junit.framework.TestCase;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.Iterator;
+
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.rpc.AudioControlCapabilities}
+ */
+public class AudioControlCapabilitiesTests extends TestCase {
+
+ private AudioControlCapabilities msg;
+
+ @Override
+ public void setUp() {
+ msg = new AudioControlCapabilities();
+
+ msg.setModuleName(Test.GENERAL_STRING);
+ msg.setSourceAvailable(Test.GENERAL_BOOLEAN);
+ msg.setVolumeAvailable(Test.GENERAL_BOOLEAN);
+ msg.setEqualizerAvailable(Test.GENERAL_BOOLEAN);
+ msg.setVolumeAvailable(Test.GENERAL_BOOLEAN);
+ msg.setEqualizerMaxChannelId(Test.GENERAL_INT);
+ }
+
+ /**
+ * Tests the expected values of the RPC message.
+ */
+ public void testRpcValues() {
+ // Test Values
+
+ String moduleName = msg.getModuleName();
+ Boolean sourceAvailable = msg.getSourceAvailable();
+ Boolean volumeAvailable = msg.getVolumeAvailable();
+ Boolean equalizerAvailable = msg.getEqualizerAvailable();
+ int equalizerMaxChannelId = msg.getEqualizerMaxChannelId();
+
+ // Valid Tests
+ assertEquals(Test.MATCH, Test.GENERAL_STRING, moduleName);
+ assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, (boolean) sourceAvailable);
+ assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, (boolean) volumeAvailable);
+ assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, (boolean) equalizerAvailable);
+ assertEquals(Test.MATCH, Test.GENERAL_INT, equalizerMaxChannelId);
+
+ // Invalid/Null Tests
+ AudioControlCapabilities msg = new AudioControlCapabilities();
+ assertNotNull(Test.NOT_NULL, msg);
+
+ assertNull(Test.NULL, msg.getModuleName());
+ assertNull(Test.NULL, msg.getSourceAvailable());
+ assertNull(Test.NULL, msg.getVolumeAvailable());
+ assertNull(Test.NULL, msg.getEqualizerAvailable());
+ assertNull(Test.NULL, msg.getEqualizerMaxChannelId());
+ }
+
+ public void testJson() {
+ JSONObject reference = new JSONObject();
+
+ try {
+
+ reference.put(AudioControlCapabilities.KEY_MODULE_NAME, Test.GENERAL_STRING);
+ reference.put(AudioControlCapabilities.KEY_SOURCE_AVAILABLE, Test.GENERAL_BOOLEAN);
+ reference.put(AudioControlCapabilities.KEY_VOLUME_AVAILABLE, Test.GENERAL_BOOLEAN);
+ reference.put(AudioControlCapabilities.KEY_EQUALIZER_AVAILABLE, Test.GENERAL_BOOLEAN);
+ reference.put(AudioControlCapabilities.KEY_EQUALIZER_MAX_CHANNEL_ID, Test.GENERAL_INT);
+
+ JSONObject underTest = msg.serializeJSON();
+ assertEquals(Test.MATCH, reference.length(), underTest.length());
+
+ Iterator<?> iterator = reference.keys();
+ while (iterator.hasNext()) {
+ String key = (String) iterator.next();
+
+ assertEquals(Test.MATCH, JsonUtils.readObjectFromJsonObject(reference, key), JsonUtils.readObjectFromJsonObject(underTest, key));
+
+ }
+ } catch (JSONException e) {
+ fail(Test.JSON_FAIL);
+ }
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/AudioControlDataTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/AudioControlDataTests.java
new file mode 100644
index 000000000..4dba080ac
--- /dev/null
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/AudioControlDataTests.java
@@ -0,0 +1,98 @@
+package com.smartdevicelink.test.rpc.datatypes;
+
+import com.smartdevicelink.marshal.JsonRPCMarshaller;
+import com.smartdevicelink.proxy.rpc.AudioControlData;
+import com.smartdevicelink.proxy.rpc.EqualizerSettings;
+import com.smartdevicelink.proxy.rpc.enums.PrimaryAudioSource;
+import com.smartdevicelink.test.JsonUtils;
+import com.smartdevicelink.test.Test;
+import com.smartdevicelink.test.Validator;
+
+import junit.framework.TestCase;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.rpc.AudioControlData}
+ */
+public class AudioControlDataTests extends TestCase {
+
+ private AudioControlData msg;
+
+ @Override
+ public void setUp() {
+ msg = new AudioControlData();
+
+ msg.setSource(Test.GENERAL_PRIMARYAUDIOSOURCE);
+ msg.setKeepContext(Test.GENERAL_BOOLEAN);
+ msg.setVolume(Test.GENERAL_INT);
+ msg.setEqualizerSettings(Test.GENERAL_EQUALIZERSETTINGS_LIST);
+ }
+
+ /**
+ * Tests the expected values of the RPC message.
+ */
+ public void testRpcValues() {
+ // Test Values
+ PrimaryAudioSource source = msg.getSource();
+ Boolean keepContext = msg.getKeepContext();
+ int volume = msg.getVolume();
+ List<EqualizerSettings> equalizerSettings = msg.getEqualizerSettings();
+
+ // Valid Tests
+ assertEquals(Test.MATCH, Test.GENERAL_PRIMARYAUDIOSOURCE, source);
+ assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, (boolean) keepContext);
+ assertEquals(Test.MATCH, Test.GENERAL_INT, volume);
+ assertEquals(Test.MATCH, Test.GENERAL_EQUALIZERSETTINGS_LIST.size(), equalizerSettings.size());
+
+ assertTrue(Test.TRUE, Validator.validateEqualizerSettingsList(Test.GENERAL_EQUALIZERSETTINGS_LIST, equalizerSettings));
+
+ // Invalid/Null Tests
+ AudioControlData msg = new AudioControlData();
+ assertNotNull(Test.NOT_NULL, msg);
+
+ assertNull(Test.NULL, msg.getSource());
+ assertNull(Test.NULL, msg.getVolume());
+ assertNull(Test.NULL, msg.getKeepContext());
+ assertNull(Test.NULL, msg.getEqualizerSettings());
+ }
+
+ public void testJson() {
+ JSONObject reference = new JSONObject();
+
+ try {
+ reference.put(AudioControlData.KEY_SOURCE, Test.GENERAL_PRIMARYAUDIOSOURCE);
+ reference.put(AudioControlData.KEY_KEEP_CONTEXT, Test.GENERAL_BOOLEAN);
+ reference.put(AudioControlData.KEY_VOLUME, Test.GENERAL_INT);
+ reference.put(AudioControlData.KEY_EQUALIZER_SETTINGS, Test.GENERAL_EQUALIZERSETTINGS_LIST);
+
+ JSONObject underTest = msg.serializeJSON();
+ assertEquals(Test.MATCH, reference.length(), underTest.length());
+
+ Iterator<?> iterator = reference.keys();
+ while (iterator.hasNext()) {
+ String key = (String) iterator.next();
+
+ if (key.equals(AudioControlData.KEY_EQUALIZER_SETTINGS)) {
+ List<EqualizerSettings> esReference = (List<EqualizerSettings>) JsonUtils.readObjectFromJsonObject(reference, key);
+ JSONArray esArray = JsonUtils.readJsonArrayFromJsonObject(underTest, key);
+ int i = 0;
+ for (EqualizerSettings es : esReference) {
+ assertTrue(Validator.validateEqualizerSettings(es, new EqualizerSettings(JsonRPCMarshaller.deserializeJSONObject(esArray.getJSONObject(i++)))));
+ }
+ } else {
+ assertEquals(Test.MATCH, JsonUtils.readObjectFromJsonObject(reference, key), JsonUtils.readObjectFromJsonObject(underTest, key));
+ }
+
+ }
+ } catch (JSONException e) {
+ fail(Test.JSON_FAIL);
+ }
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/ClimateControlCapabilitiesTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/ClimateControlCapabilitiesTests.java
index 33f9d2631..c391eb4eb 100644
--- a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/ClimateControlCapabilitiesTests.java
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/ClimateControlCapabilitiesTests.java
@@ -17,7 +17,7 @@ import java.util.Iterator;
import java.util.List;
/**
- * This is a unit test class for the SmartDeviceLink library project class :
+ * This is a unit test class for the SmartDeviceLink library project class :
* {@link com.smartdevicelink.rpc.ClimateControlCapabilities}
*/
public class ClimateControlCapabilitiesTests extends TestCase{
@@ -40,6 +40,10 @@ public class ClimateControlCapabilitiesTests extends TestCase{
msg.setDefrostZone(Test.GENERAL_DEFROSTZONE_LIST);
msg.setVentilationModeAvailable(Test.GENERAL_BOOLEAN);
msg.setVentilationMode(Test.GENERAL_VENTILATIONMODE_LIST);
+ msg.setHeatedSteeringWheelAvailable(Test.GENERAL_BOOLEAN);
+ msg.setHeatedWindshieldAvailable(Test.GENERAL_BOOLEAN);
+ msg.setHeatedRearWindowAvailable(Test.GENERAL_BOOLEAN);
+ msg.setHeatedMirrorsAvailable(Test.GENERAL_BOOLEAN);
}
/**
@@ -59,6 +63,10 @@ public class ClimateControlCapabilitiesTests extends TestCase{
List<DefrostZone> defrostZone = msg.getDefrostZone();
boolean ventilationModeAvailable = msg.getVentilationModeAvailable();
List<VentilationMode> ventilationMode = msg.getVentilationMode();
+ boolean heatedSteeringWheelAvailable = msg.getHeatedSteeringWheelAvailable();
+ boolean heatedWindshieldAvailable = msg.getHeatedWindshieldAvailable();
+ boolean heatedRearWindowAvailable = msg.getHeatedRearWindowAvailable();
+ boolean heatedMirrorsAvailable = msg.getHeatedMirrorsAvailable();
// Valid Tests
assertEquals(Test.MATCH, Test.GENERAL_STRING, moduleName);
@@ -82,6 +90,10 @@ public class ClimateControlCapabilitiesTests extends TestCase{
assertEquals(Test.MATCH, Test.GENERAL_VENTILATIONMODE_LIST.get(i), ventilationMode.get(i));
}
+ assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, heatedSteeringWheelAvailable);
+ assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, heatedWindshieldAvailable);
+ assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, heatedRearWindowAvailable);
+ assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, heatedMirrorsAvailable);
// Invalid/Null Tests
ClimateControlCapabilities msg = new ClimateControlCapabilities();
assertNotNull(Test.NOT_NULL, msg);
@@ -97,6 +109,10 @@ public class ClimateControlCapabilitiesTests extends TestCase{
assertNull(Test.NULL, msg.getDefrostZone());
assertNull(Test.NULL, msg.getVentilationModeAvailable());
assertNull(Test.NULL, msg.getVentilationMode());
+ assertNull(Test.NULL, msg.getHeatedSteeringWheelAvailable());
+ assertNull(Test.NULL, msg.getHeatedWindshieldAvailable());
+ assertNull(Test.NULL, msg.getHeatedRearWindowAvailable());
+ assertNull(Test.NULL, msg.getHeatedMirrorsAvailable());
}
public void testJson(){
@@ -115,6 +131,10 @@ public class ClimateControlCapabilitiesTests extends TestCase{
reference.put(ClimateControlCapabilities.KEY_VENTILATION_MODE_AVAILABLE, Test.GENERAL_BOOLEAN);
reference.put(ClimateControlCapabilities.KEY_DEFROST_ZONE, JsonUtils.createJsonArray(Test.GENERAL_DEFROSTZONE_LIST));
reference.put(ClimateControlCapabilities.KEY_VENTILATION_MODE, JsonUtils.createJsonArray(Test.GENERAL_VENTILATIONMODE_LIST));
+ reference.put(ClimateControlCapabilities.KEY_HEATED_STEERING_WHEEL_AVAILABLE, Test.GENERAL_BOOLEAN);
+ reference.put(ClimateControlCapabilities.KEY_HEATED_WIND_SHIELD_AVAILABLE, Test.GENERAL_BOOLEAN);
+ reference.put(ClimateControlCapabilities.KEY_HEATED_REAR_WINDOW_AVAILABLE, Test.GENERAL_BOOLEAN);
+ reference.put(ClimateControlCapabilities.KEY_HEATED_MIRRORS_AVAILABLE, Test.GENERAL_BOOLEAN);
JSONObject underTest = msg.serializeJSON();
assertEquals(Test.MATCH, reference.length(), underTest.length());
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/ClimateControlDataTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/ClimateControlDataTests.java
index 5b0eefa9f..99d5c3285 100644
--- a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/ClimateControlDataTests.java
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/ClimateControlDataTests.java
@@ -18,7 +18,7 @@ import java.util.Hashtable;
import java.util.Iterator;
/**
- * This is a unit test class for the SmartDeviceLink library project class :
+ * This is a unit test class for the SmartDeviceLink library project class :
* {@link com.smartdevicelink.rpc.ClimateControlData}
*/
public class ClimateControlDataTests extends TestCase{
@@ -39,6 +39,10 @@ public class ClimateControlDataTests extends TestCase{
msg.setDualModeEnable(Test.GENERAL_BOOLEAN);
msg.setAcMaxEnable(Test.GENERAL_BOOLEAN);
msg.setVentilationMode(Test.GENERAL_VENTILATIONMODE);
+ msg.setHeatedSteeringWheelEnable(Test.GENERAL_BOOLEAN);
+ msg.setHeatedWindshieldEnable(Test.GENERAL_BOOLEAN);
+ msg.setHeatedRearWindowEnable(Test.GENERAL_BOOLEAN);
+ msg.setHeatedMirrorsEnable(Test.GENERAL_BOOLEAN);
}
/**
@@ -56,6 +60,10 @@ public class ClimateControlDataTests extends TestCase{
boolean dualModeEnable = msg.getDualModeEnable();
boolean acMaxEnable = msg.getAcMaxEnable();
VentilationMode ventilationMode = msg.getVentilationMode();
+ boolean heatedSteeringWheelEnable = msg.getHeatedSteeringWheelEnable();
+ boolean heatedWindshieldEnable = msg.getHeatedWindshieldEnable();
+ boolean heatedRearWindowEnable = msg.getHeatedRearWindowEnable();
+ boolean heatedMirrorsEnable = msg.getHeatedMirrorsEnable();
// Valid Tests
assertEquals(Test.MATCH, Test.GENERAL_INT, fanSpeed);
@@ -68,6 +76,10 @@ public class ClimateControlDataTests extends TestCase{
assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, dualModeEnable);
assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, acMaxEnable);
assertEquals(Test.MATCH, Test.GENERAL_VENTILATIONMODE, ventilationMode);
+ assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, heatedSteeringWheelEnable);
+ assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, heatedWindshieldEnable);
+ assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, heatedRearWindowEnable);
+ assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, heatedMirrorsEnable);
// Invalid/Null Tests
ClimateControlData msg = new ClimateControlData();
@@ -83,6 +95,10 @@ public class ClimateControlDataTests extends TestCase{
assertNull(Test.NULL, msg.getDualModeEnable());
assertNull(Test.NULL, msg.getAcMaxEnable());
assertNull(Test.NULL, msg.getVentilationMode());
+ assertNull(Test.NULL, msg.getHeatedSteeringWheelEnable());
+ assertNull(Test.NULL, msg.getHeatedWindshieldEnable());
+ assertNull(Test.NULL, msg.getHeatedRearWindowEnable());
+ assertNull(Test.NULL, msg.getHeatedMirrorsEnable());
}
public void testJson(){
@@ -99,6 +115,10 @@ public class ClimateControlDataTests extends TestCase{
reference.put(ClimateControlData.KEY_AC_MAX_ENABLE, Test.GENERAL_BOOLEAN);
reference.put(ClimateControlData.KEY_DEFROST_ZONE, Test.GENERAL_DEFROSTZONE);
reference.put(ClimateControlData.KEY_VENTILATION_MODE, Test.GENERAL_VENTILATIONMODE);
+ reference.put(ClimateControlData.KEY_HEATED_STEERING_WHEEL_ENABLE, Test.GENERAL_BOOLEAN);
+ reference.put(ClimateControlData.KEY_HEATED_WIND_SHIELD_ENABLE, Test.GENERAL_BOOLEAN);
+ reference.put(ClimateControlData.KEY_HEATED_REAR_WINDOW_ENABLE, Test.GENERAL_BOOLEAN);
+ reference.put(ClimateControlData.KEY_HEATED_MIRRORS_ENABLE, Test.GENERAL_BOOLEAN);
JSONObject underTest = msg.serializeJSON();
assertEquals(Test.MATCH, reference.length(), underTest.length());
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/EqualizerSettingsTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/EqualizerSettingsTests.java
new file mode 100644
index 000000000..a803b1ded
--- /dev/null
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/EqualizerSettingsTests.java
@@ -0,0 +1,78 @@
+package com.smartdevicelink.test.rpc.datatypes;
+
+import com.smartdevicelink.proxy.rpc.EqualizerSettings;
+import com.smartdevicelink.test.JsonUtils;
+import com.smartdevicelink.test.Test;
+
+import junit.framework.TestCase;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.Iterator;
+
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.rpc.EqualizerSettings}
+ */
+public class EqualizerSettingsTests extends TestCase {
+
+ private EqualizerSettings msg;
+
+ @Override
+ public void setUp() {
+ msg = new EqualizerSettings();
+
+ msg.setChannelId(Test.GENERAL_INT);
+ msg.setChannelName(Test.GENERAL_STRING);
+ msg.setChannelSetting(Test.GENERAL_INT);
+ }
+
+ /**
+ * Tests the expected values of the RPC message.
+ */
+ public void testRpcValues() {
+ // Test Values
+
+ int channelId = msg.getChannelId();
+ String channelName = msg.getChannelName();
+ int channelSetting = msg.getChannelSetting();
+
+ // Valid Tests
+ assertEquals(Test.MATCH, Test.GENERAL_INT, channelId);
+ assertEquals(Test.MATCH, Test.GENERAL_STRING, channelName);
+ assertEquals(Test.MATCH, Test.GENERAL_INT, channelSetting);
+
+ // Invalid/Null Tests
+ EqualizerSettings msg = new EqualizerSettings();
+ assertNotNull(Test.NOT_NULL, msg);
+
+ assertNull(Test.NULL, msg.getChannelId());
+ assertNull(Test.NULL, msg.getChannelName());
+ assertNull(Test.NULL, msg.getChannelSetting());
+ }
+
+ public void testJson() {
+ JSONObject reference = new JSONObject();
+
+ try {
+
+ reference.put(EqualizerSettings.KEY_CHANNEL_ID, Test.GENERAL_INT);
+ reference.put(EqualizerSettings.KEY_CHANNEL_NAME, Test.GENERAL_STRING);
+ reference.put(EqualizerSettings.KEY_CHANNEL_SETTING, Test.GENERAL_INT);
+
+ JSONObject underTest = msg.serializeJSON();
+ assertEquals(Test.MATCH, reference.length(), underTest.length());
+
+ Iterator<?> iterator = reference.keys();
+ while (iterator.hasNext()) {
+ String key = (String) iterator.next();
+
+ assertEquals(Test.MATCH, JsonUtils.readObjectFromJsonObject(reference, key), JsonUtils.readObjectFromJsonObject(underTest, key));
+
+ }
+ } catch (JSONException e) {
+ fail(Test.JSON_FAIL);
+ }
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/HMISettingsControlCapabilitiesTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/HMISettingsControlCapabilitiesTests.java
new file mode 100644
index 000000000..620868b40
--- /dev/null
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/HMISettingsControlCapabilitiesTests.java
@@ -0,0 +1,80 @@
+package com.smartdevicelink.test.rpc.datatypes;
+
+import com.smartdevicelink.proxy.rpc.HMISettingsControlCapabilities;
+import com.smartdevicelink.test.JsonUtils;
+import com.smartdevicelink.test.Test;
+
+import junit.framework.TestCase;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.Iterator;
+
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.rpc.HMISettingsControlCapabilities}
+ */
+public class HMISettingsControlCapabilitiesTests extends TestCase {
+
+ private HMISettingsControlCapabilities msg;
+
+ @Override
+ public void setUp() {
+ msg = new HMISettingsControlCapabilities();
+
+ msg.setModuleName(Test.GENERAL_STRING);
+ msg.setDistanceUnitAvailable(Test.GENERAL_BOOLEAN);
+ msg.setTemperatureUnitAvailable(Test.GENERAL_BOOLEAN);
+ msg.setDisplayModeUnitAvailable(Test.GENERAL_BOOLEAN);
+ }
+
+ /**
+ * Tests the expected values of the RPC message.
+ */
+ public void testRpcValues() {
+ // Test Values
+ String moduleName = msg.getModuleName();
+ Boolean distanceUnitAvailable = msg.getDistanceUnitAvailable();
+ Boolean temperatureUnitAvailable = msg.getTemperatureUnitAvailable();
+ Boolean displayModeUnitAvailable = msg.getDisplayModeUnitAvailable();
+
+ // Valid Tests
+ assertEquals(Test.MATCH, Test.GENERAL_STRING, moduleName);
+ assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, (boolean) distanceUnitAvailable);
+ assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, (boolean) temperatureUnitAvailable);
+ assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, (boolean) displayModeUnitAvailable);
+
+ // Invalid/Null Tests
+ HMISettingsControlCapabilities msg = new HMISettingsControlCapabilities();
+ assertNotNull(Test.NOT_NULL, msg);
+
+ assertNull(Test.NULL, msg.getModuleName());
+ assertNull(Test.NULL, msg.getDistanceUnitAvailable());
+ assertNull(Test.NULL, msg.getTemperatureUnitAvailable());
+ assertNull(Test.NULL, msg.getDisplayModeUnitAvailable());
+ }
+
+ public void testJson() {
+ JSONObject reference = new JSONObject();
+
+ try {
+ reference.put(HMISettingsControlCapabilities.KEY_MODULE_NAME, Test.GENERAL_STRING);
+ reference.put(HMISettingsControlCapabilities.KEY_DISTANCE_UNIT_AVAILABLE, Test.GENERAL_BOOLEAN);
+ reference.put(HMISettingsControlCapabilities.KEY_TEMPERATURE_UNIT_AVAILABLE, Test.GENERAL_BOOLEAN);
+ reference.put(HMISettingsControlCapabilities.KEY_DISPLAY_MODE_UNIT_AVAILABLE, Test.GENERAL_BOOLEAN);
+
+ JSONObject underTest = msg.serializeJSON();
+ assertEquals(Test.MATCH, reference.length(), underTest.length());
+
+ Iterator<?> iterator = reference.keys();
+ while (iterator.hasNext()) {
+ String key = (String) iterator.next();
+
+ assertEquals(Test.MATCH, JsonUtils.readObjectFromJsonObject(reference, key), JsonUtils.readObjectFromJsonObject(underTest, key));
+ }
+ } catch (JSONException e) {
+ fail(Test.JSON_FAIL);
+ }
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/HMISettingsControlDataTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/HMISettingsControlDataTests.java
new file mode 100644
index 000000000..85205f617
--- /dev/null
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/HMISettingsControlDataTests.java
@@ -0,0 +1,78 @@
+package com.smartdevicelink.test.rpc.datatypes;
+
+import com.smartdevicelink.proxy.rpc.HMISettingsControlData;
+import com.smartdevicelink.proxy.rpc.enums.DisplayMode;
+import com.smartdevicelink.proxy.rpc.enums.DistanceUnit;
+import com.smartdevicelink.proxy.rpc.enums.TemperatureUnit;
+import com.smartdevicelink.test.JsonUtils;
+import com.smartdevicelink.test.Test;
+
+import junit.framework.TestCase;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.Iterator;
+
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.rpc.HMISettingsControlData}
+ */
+public class HMISettingsControlDataTests extends TestCase {
+
+ private HMISettingsControlData msg;
+
+ @Override
+ public void setUp() {
+ msg = new HMISettingsControlData();
+
+ msg.setDisplayMode(Test.GENERAL_DISPLAYMODE);
+ msg.setTemperatureUnit(Test.GENERAL_TEMPERATUREUNIT);
+ msg.setDistanceUnit(Test.GENERAL_DISTANCEUNIT);
+ }
+
+ /**
+ * Tests the expected values of the RPC message.
+ */
+ public void testRpcValues() {
+ // Test Values
+ DisplayMode displayMode = msg.getDisplayMode();
+ TemperatureUnit temperatureUnit = msg.getTemperatureUnit();
+ DistanceUnit distanceUnit = msg.getDistanceUnit();
+
+ // Valid Tests
+ assertEquals(Test.MATCH, Test.GENERAL_DISPLAYMODE, displayMode);
+ assertEquals(Test.MATCH, Test.GENERAL_TEMPERATUREUNIT, temperatureUnit);
+ assertEquals(Test.MATCH, Test.GENERAL_DISTANCEUNIT, distanceUnit);
+
+ // Invalid/Null Tests
+ HMISettingsControlData msg = new HMISettingsControlData();
+ assertNotNull(Test.NOT_NULL, msg);
+
+ assertNull(Test.NULL, msg.getDisplayMode());
+ assertNull(Test.NULL, msg.getTemperatureUnit());
+ assertNull(Test.NULL, msg.getDistanceUnit());
+ }
+
+ public void testJson() {
+ JSONObject reference = new JSONObject();
+
+ try {
+ reference.put(HMISettingsControlData.KEY_DISPLAY_MODE, Test.GENERAL_DISPLAYMODE);
+ reference.put(HMISettingsControlData.KEY_TEMPERATURE_UNIT, Test.GENERAL_TEMPERATUREUNIT);
+ reference.put(HMISettingsControlData.KEY_DISTANCE_UNIT, Test.GENERAL_DISTANCEUNIT);
+
+ JSONObject underTest = msg.serializeJSON();
+ assertEquals(Test.MATCH, reference.length(), underTest.length());
+
+ Iterator<?> iterator = reference.keys();
+ while (iterator.hasNext()) {
+ String key = (String) iterator.next();
+
+ assertEquals(Test.MATCH, JsonUtils.readObjectFromJsonObject(reference, key), JsonUtils.readObjectFromJsonObject(underTest, key));
+ }
+ } catch (JSONException e) {
+ fail(Test.JSON_FAIL);
+ }
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/LightCapabilitiesTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/LightCapabilitiesTests.java
new file mode 100644
index 000000000..6122f4305
--- /dev/null
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/LightCapabilitiesTests.java
@@ -0,0 +1,81 @@
+package com.smartdevicelink.test.rpc.datatypes;
+
+import com.smartdevicelink.proxy.rpc.LightCapabilities;
+import com.smartdevicelink.proxy.rpc.enums.LightName;
+import com.smartdevicelink.test.JsonUtils;
+import com.smartdevicelink.test.Test;
+
+import junit.framework.TestCase;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.Iterator;
+
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.rpc.LightCapabilities}
+ */
+public class LightCapabilitiesTests extends TestCase {
+
+ private LightCapabilities msg;
+
+ @Override
+ public void setUp() {
+ msg = new LightCapabilities();
+
+ msg.setName(Test.GENERAL_LIGHTNAME);
+ msg.setDensityAvailable(Test.GENERAL_BOOLEAN);
+ msg.setRGBColorSpaceAvailable(Test.GENERAL_BOOLEAN);
+ msg.setStatusAvailable(Test.GENERAL_BOOLEAN);
+ }
+
+ /**
+ * Tests the expected values of the RPC message.
+ */
+ public void testRpcValues() {
+ // Test Values
+ LightName name = msg.getName();
+ Boolean densityAvailable = msg.getDensityAvailable();
+ Boolean rgbColorSpaceAvailable = msg.getRGBColorSpaceAvailable();
+ Boolean statusAvailable = msg.getStatusAvailable();
+
+ // Valid Tests
+ assertEquals(Test.MATCH, Test.GENERAL_LIGHTNAME, name);
+ assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, (boolean) densityAvailable);
+ assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, (boolean) rgbColorSpaceAvailable);
+ assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, (boolean) statusAvailable);
+
+ // Invalid/Null Tests
+ LightCapabilities msg = new LightCapabilities();
+ assertNotNull(Test.NOT_NULL, msg);
+
+ assertNull(Test.NULL, msg.getName());
+ assertNull(Test.NULL, msg.getDensityAvailable());
+ assertNull(Test.NULL, msg.getRGBColorSpaceAvailable());
+ assertNull(Test.NULL, msg.getStatusAvailable());
+ }
+
+ public void testJson() {
+ JSONObject reference = new JSONObject();
+
+ try {
+ reference.put(LightCapabilities.KEY_NAME, Test.GENERAL_LIGHTNAME);
+ reference.put(LightCapabilities.KEY_DENSITY_AVAILABLE, Test.GENERAL_BOOLEAN);
+ reference.put(LightCapabilities.KEY_RGB_COLOR_SPACE_AVAILABLE, Test.GENERAL_BOOLEAN);
+ reference.put(LightCapabilities.KEY_STATUS_AVAILABLE, Test.GENERAL_BOOLEAN);
+
+ JSONObject underTest = msg.serializeJSON();
+ assertEquals(Test.MATCH, reference.length(), underTest.length());
+
+ Iterator<?> iterator = reference.keys();
+ while (iterator.hasNext()) {
+ String key = (String) iterator.next();
+
+ assertEquals(Test.MATCH, JsonUtils.readObjectFromJsonObject(reference, key), JsonUtils.readObjectFromJsonObject(underTest, key));
+ }
+ } catch (JSONException e) {
+ fail(Test.JSON_FAIL);
+ }
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/LightControlCapabilitiesTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/LightControlCapabilitiesTests.java
new file mode 100644
index 000000000..4ebd7f467
--- /dev/null
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/LightControlCapabilitiesTests.java
@@ -0,0 +1,86 @@
+package com.smartdevicelink.test.rpc.datatypes;
+
+import com.smartdevicelink.marshal.JsonRPCMarshaller;
+import com.smartdevicelink.proxy.rpc.LightCapabilities;
+import com.smartdevicelink.proxy.rpc.LightControlCapabilities;
+import com.smartdevicelink.test.JsonUtils;
+import com.smartdevicelink.test.Test;
+import com.smartdevicelink.test.Validator;
+
+import junit.framework.TestCase;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.rpc.LightControlCapabilities}
+ */
+public class LightControlCapabilitiesTests extends TestCase {
+
+ private LightControlCapabilities msg;
+
+ @Override
+ public void setUp() {
+ msg = new LightControlCapabilities();
+
+ msg.setModuleName(Test.GENERAL_STRING);
+ msg.setSupportedLights(Test.GENERAL_LIGHTCAPABILITIES_LIST);
+ }
+
+ /**
+ * Tests the expected values of the RPC message.
+ */
+ public void testRpcValues() {
+ // Test Values
+ String moduleName = msg.getModuleName();
+ List<LightCapabilities> supportedLights = msg.getSupportedLights();
+
+ // Valid Tests
+ assertEquals(Test.MATCH, Test.GENERAL_STRING, moduleName);
+ assertEquals(Test.MATCH, Test.GENERAL_LIGHTCAPABILITIES_LIST.size(), supportedLights.size());
+
+ assertTrue(Test.TRUE, Validator.validateLightCapabilitiesList(Test.GENERAL_LIGHTCAPABILITIES_LIST, supportedLights));
+
+ // Invalid/Null Tests
+ LightControlCapabilities msg = new LightControlCapabilities();
+ assertNotNull(Test.NOT_NULL, msg);
+
+ assertNull(Test.NULL, msg.getModuleName());
+ assertNull(Test.NULL, msg.getSupportedLights());
+ }
+
+ public void testJson() {
+ JSONObject reference = new JSONObject();
+
+ try {
+ reference.put(LightControlCapabilities.KEY_MODULE_NAME, Test.GENERAL_STRING);
+ reference.put(LightControlCapabilities.KEY_SUPPORTED_LIGHTS, Test.GENERAL_LIGHTCAPABILITIES_LIST);
+
+ JSONObject underTest = msg.serializeJSON();
+ assertEquals(Test.MATCH, reference.length(), underTest.length());
+
+ Iterator<?> iterator = reference.keys();
+ while (iterator.hasNext()) {
+ String key = (String) iterator.next();
+
+ if (key.equals(LightControlCapabilities.KEY_SUPPORTED_LIGHTS)) {
+ List<LightCapabilities> lcReference = (List<LightCapabilities>) JsonUtils.readObjectFromJsonObject(reference, key);
+ JSONArray lsArray = JsonUtils.readJsonArrayFromJsonObject(underTest, key);
+ int i = 0;
+ for (LightCapabilities lc : lcReference) {
+ assertTrue(Validator.validateLightCapabilities(lc, new LightCapabilities(JsonRPCMarshaller.deserializeJSONObject(lsArray.getJSONObject(i++)))));
+ }
+ } else {
+ assertEquals(Test.MATCH, JsonUtils.readObjectFromJsonObject(reference, key), JsonUtils.readObjectFromJsonObject(underTest, key));
+ }
+ }
+ } catch (JSONException e) {
+ fail(Test.JSON_FAIL);
+ }
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/LightControlDataTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/LightControlDataTests.java
new file mode 100644
index 000000000..c891e0769
--- /dev/null
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/LightControlDataTests.java
@@ -0,0 +1,79 @@
+package com.smartdevicelink.test.rpc.datatypes;
+
+import com.smartdevicelink.marshal.JsonRPCMarshaller;
+import com.smartdevicelink.proxy.rpc.LightControlData;
+import com.smartdevicelink.proxy.rpc.LightState;
+import com.smartdevicelink.test.JsonUtils;
+import com.smartdevicelink.test.Test;
+import com.smartdevicelink.test.Validator;
+
+import junit.framework.TestCase;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.rpc.LightControlData}
+ */
+public class LightControlDataTests extends TestCase {
+
+ private LightControlData msg;
+
+ @Override
+ public void setUp() {
+ msg = new LightControlData();
+
+ msg.setLightState(Test.GENERAL_LIGHTSTATE_LIST);
+ }
+
+ /**
+ * Tests the expected values of the RPC message.
+ */
+ public void testRpcValues() {
+ // Test Values
+ List<LightState> lightState = msg.getLightState();
+
+ // Valid Tests
+ assertEquals(Test.MATCH, Test.GENERAL_LIGHTSTATE_LIST.size(), lightState.size());
+
+ assertTrue(Test.TRUE, Validator.validateLightStateList(Test.GENERAL_LIGHTSTATE_LIST, lightState));
+
+ // Invalid/Null Tests
+ LightControlData msg = new LightControlData();
+ assertNotNull(Test.NOT_NULL, msg);
+
+ assertNull(Test.NULL, msg.getLightState());
+ }
+
+ public void testJson() {
+ JSONObject reference = new JSONObject();
+
+ try {
+ reference.put(LightControlData.KEY_LIGHT_STATE, Test.GENERAL_LIGHTSTATE_LIST);
+
+ JSONObject underTest = msg.serializeJSON();
+ assertEquals(Test.MATCH, reference.length(), underTest.length());
+
+ Iterator<?> iterator = reference.keys();
+ while (iterator.hasNext()) {
+ String key = (String) iterator.next();
+
+ if (key.equals(LightControlData.KEY_LIGHT_STATE)) {
+ List<LightState> lsReference = (List<LightState>) JsonUtils.readObjectFromJsonObject(reference, key);
+ JSONArray lsArray = JsonUtils.readJsonArrayFromJsonObject(underTest, key);
+ int i = 0;
+ for (LightState ls : lsReference) {
+ assertTrue(Validator.validateLightState(ls, new LightState(JsonRPCMarshaller.deserializeJSONObject(lsArray.getJSONObject(i++)))));
+ }
+ }
+ }
+ } catch (JSONException e) {
+ fail(Test.JSON_FAIL);
+ }
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/LightStateTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/LightStateTests.java
new file mode 100644
index 000000000..196769e00
--- /dev/null
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/LightStateTests.java
@@ -0,0 +1,94 @@
+package com.smartdevicelink.test.rpc.datatypes;
+
+import com.smartdevicelink.marshal.JsonRPCMarshaller;
+import com.smartdevicelink.proxy.rpc.LightState;
+import com.smartdevicelink.proxy.rpc.RGBColor;
+import com.smartdevicelink.proxy.rpc.enums.LightName;
+import com.smartdevicelink.proxy.rpc.enums.LightStatus;
+import com.smartdevicelink.test.JsonUtils;
+import com.smartdevicelink.test.Test;
+import com.smartdevicelink.test.Validator;
+
+import junit.framework.TestCase;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.Hashtable;
+import java.util.Iterator;
+
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.rpc.LightState}
+ */
+public class LightStateTests extends TestCase {
+
+ private LightState msg;
+
+ @Override
+ public void setUp() {
+ msg = new LightState();
+
+ msg.setId(Test.GENERAL_LIGHTNAME);
+ msg.setStatus(Test.GENERAL_LIGHTSTATUS);
+ msg.setDensity(Test.GENERAL_FLOAT);
+ msg.setColor(Test.GENERAL_RGBCOLOR);
+ }
+
+ /**
+ * Tests the expected values of the RPC message.
+ */
+ public void testRpcValues() {
+ // Test Values
+ LightName id = msg.getId();
+ LightStatus status = msg.getStatus();
+ Float density = msg.getDensity();
+ RGBColor color = msg.getColor();
+
+ // Valid Tests
+ assertEquals(Test.MATCH, Test.GENERAL_LIGHTNAME, id);
+ assertEquals(Test.MATCH, Test.GENERAL_LIGHTSTATUS, status);
+ assertEquals(Test.MATCH, Test.GENERAL_FLOAT, (float) density);
+ assertEquals(Test.MATCH, Test.GENERAL_RGBCOLOR, color);
+
+ // Invalid/Null Tests
+ LightState msg = new LightState();
+ assertNotNull(Test.NOT_NULL, msg);
+
+ assertNull(Test.NULL, msg.getId());
+ assertNull(Test.NULL, msg.getStatus());
+ assertNull(Test.NULL, msg.getDensity());
+ assertNull(Test.NULL, msg.getColor());
+ }
+
+ public void testJson() {
+ JSONObject reference = new JSONObject();
+
+ try {
+ reference.put(LightState.KEY_ID, Test.GENERAL_LIGHTNAME);
+ reference.put(LightState.KEY_STATUS, Test.GENERAL_LIGHTSTATUS);
+ reference.put(LightState.KEY_DENSITY, Test.GENERAL_FLOAT);
+ reference.put(LightState.KEY_COLOR, JsonRPCMarshaller.serializeHashtable(Test.GENERAL_RGBCOLOR.getStore()));
+
+ JSONObject underTest = msg.serializeJSON();
+ assertEquals(Test.MATCH, reference.length(), underTest.length());
+
+ Iterator<?> iterator = reference.keys();
+ while (iterator.hasNext()) {
+ String key = (String) iterator.next();
+
+ if (key.equals(LightState.KEY_COLOR)) {
+ JSONObject objectEquals = (JSONObject) JsonUtils.readObjectFromJsonObject(reference, key);
+ JSONObject testEquals = (JSONObject) JsonUtils.readObjectFromJsonObject(underTest, key);
+ Hashtable<String, Object> hashReference = JsonRPCMarshaller.deserializeJSONObject(objectEquals);
+ Hashtable<String, Object> hashTest = JsonRPCMarshaller.deserializeJSONObject(testEquals);
+ assertTrue(Test.TRUE, Validator.validateRGBColor(new RGBColor(hashReference), new RGBColor(hashTest)));
+ } else {
+ assertEquals(Test.MATCH, JsonUtils.readObjectFromJsonObject(reference, key), JsonUtils.readObjectFromJsonObject(underTest, key));
+ }
+ }
+ } catch (JSONException e) {
+ fail(Test.JSON_FAIL);
+ }
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/ModuleDataTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/ModuleDataTests.java
index 067216169..b553587ad 100644
--- a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/ModuleDataTests.java
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/ModuleDataTests.java
@@ -1,7 +1,10 @@
package com.smartdevicelink.test.rpc.datatypes;
import com.smartdevicelink.marshal.JsonRPCMarshaller;
+import com.smartdevicelink.proxy.rpc.AudioControlData;
import com.smartdevicelink.proxy.rpc.ClimateControlData;
+import com.smartdevicelink.proxy.rpc.HMISettingsControlData;
+import com.smartdevicelink.proxy.rpc.LightControlData;
import com.smartdevicelink.proxy.rpc.ModuleData;
import com.smartdevicelink.proxy.rpc.RadioControlData;
import com.smartdevicelink.proxy.rpc.SeatControlData;
@@ -29,11 +32,13 @@ public class ModuleDataTests extends TestCase {
@Override
public void setUp() {
msg = new ModuleData();
-
msg.setModuleType(Test.GENERAL_MODULETYPE);
msg.setRadioControlData(Test.GENERAL_RADIOCONTROLDATA);
msg.setClimateControlData(Test.GENERAL_CLIMATECONTROLDATA);
msg.setSeatControlData(Test.GENERAL_SEATCONTROLDATA);
+ msg.setAudioControlData(Test.GENERAL_AUDIOCONTROLDATA);
+ msg.setHmiSettingsControlData(Test.GENERAL_HMISETTINGSCONTROLDATA);
+ msg.setLightControlData(Test.GENERAL_LIGHTCONTROLDATA);
}
/**
@@ -45,12 +50,18 @@ public class ModuleDataTests extends TestCase {
RadioControlData radioControlData = msg.getRadioControlData();
ClimateControlData climateControlData = msg.getClimateControlData();
SeatControlData seatControlData = msg.getSeatControlData();
+ AudioControlData audioControlData = msg.getAudioControlData();
+ HMISettingsControlData hmiSettingsControlData = msg.getHmiSettingsControlData();
+ LightControlData lightControlData = msg.getLightControlData();
// Valid Tests
assertEquals(Test.MATCH, Test.GENERAL_MODULETYPE, moduleType);
assertTrue(Test.TRUE, Validator.validateRadioControlData(Test.GENERAL_RADIOCONTROLDATA, radioControlData));
assertTrue(Test.TRUE, Validator.validateClimateControlData(Test.GENERAL_CLIMATECONTROLDATA, climateControlData));
assertTrue(Test.TRUE, Validator.validateSeatControlData(Test.GENERAL_SEATCONTROLDATA, seatControlData));
+ assertTrue(Test.TRUE, Validator.validateAudioControlData(Test.GENERAL_AUDIOCONTROLDATA, audioControlData));
+ assertTrue(Test.TRUE, Validator.validateHMISettingsControlData(Test.GENERAL_HMISETTINGSCONTROLDATA, hmiSettingsControlData));
+ assertTrue(Test.TRUE, Validator.validateLightControlData(Test.GENERAL_LIGHTCONTROLDATA, lightControlData));
// Invalid/Null Tests
ModuleData msg = new ModuleData();
@@ -60,6 +71,9 @@ public class ModuleDataTests extends TestCase {
assertNull(Test.NULL, msg.getRadioControlData());
assertNull(Test.NULL, msg.getClimateControlData());
assertNull(Test.NULL, msg.getSeatControlData());
+ assertNull(Test.NULL, msg.getAudioControlData());
+ assertNull(Test.NULL, msg.getHmiSettingsControlData());
+ assertNull(Test.NULL, msg.getLightControlData());
}
public void testJson() {
@@ -70,6 +84,9 @@ public class ModuleDataTests extends TestCase {
reference.put(ModuleData.KEY_RADIO_CONTROL_DATA, JsonRPCMarshaller.serializeHashtable(Test.GENERAL_RADIOCONTROLDATA.getStore()));
reference.put(ModuleData.KEY_CLIMATE_CONTROL_DATA, JsonRPCMarshaller.serializeHashtable(Test.GENERAL_CLIMATECONTROLDATA.getStore()));
reference.put(ModuleData.KEY_SEAT_CONTROL_DATA, JsonRPCMarshaller.serializeHashtable(Test.GENERAL_SEATCONTROLDATA.getStore()));
+ reference.put(ModuleData.KEY_AUDIO_CONTROL_DATA, JsonRPCMarshaller.serializeHashtable(Test.GENERAL_AUDIOCONTROLDATA.getStore()));
+ reference.put(ModuleData.KEY_HMI_SETTINGS_CONTROL_DATA, JsonRPCMarshaller.serializeHashtable(Test.GENERAL_HMISETTINGSCONTROLDATA.getStore()));
+ reference.put(ModuleData.KEY_LIGHT_CONTROL_DATA, JsonRPCMarshaller.serializeHashtable(Test.GENERAL_LIGHTCONTROLDATA.getStore()));
JSONObject underTest = msg.serializeJSON();
assertEquals(Test.MATCH, reference.length(), underTest.length());
@@ -96,6 +113,24 @@ public class ModuleDataTests extends TestCase {
Hashtable<String, Object> hashReference = JsonRPCMarshaller.deserializeJSONObject(objectEquals);
Hashtable<String, Object> hashTest = JsonRPCMarshaller.deserializeJSONObject(testEquals);
assertTrue(Test.TRUE, Validator.validateSeatControlData(new SeatControlData(hashReference), new SeatControlData(hashTest)));
+ } else if (key.equals(ModuleData.KEY_AUDIO_CONTROL_DATA)) {
+ JSONObject objectEquals = (JSONObject) JsonUtils.readObjectFromJsonObject(reference, key);
+ JSONObject testEquals = (JSONObject) JsonUtils.readObjectFromJsonObject(underTest, key);
+ Hashtable<String, Object> hashReference = JsonRPCMarshaller.deserializeJSONObject(objectEquals);
+ Hashtable<String, Object> hashTest = JsonRPCMarshaller.deserializeJSONObject(testEquals);
+ assertTrue(Test.TRUE, Validator.validateAudioControlData(new AudioControlData(hashReference), new AudioControlData(hashTest)));
+ } else if (key.equals(ModuleData.KEY_HMI_SETTINGS_CONTROL_DATA)) {
+ JSONObject objectEquals = (JSONObject) JsonUtils.readObjectFromJsonObject(reference, key);
+ JSONObject testEquals = (JSONObject) JsonUtils.readObjectFromJsonObject(underTest, key);
+ Hashtable<String, Object> hashReference = JsonRPCMarshaller.deserializeJSONObject(objectEquals);
+ Hashtable<String, Object> hashTest = JsonRPCMarshaller.deserializeJSONObject(testEquals);
+ assertTrue(Test.TRUE, Validator.validateHMISettingsControlData(new HMISettingsControlData(hashReference), new HMISettingsControlData(hashTest)));
+ } else if (key.equals(ModuleData.KEY_LIGHT_CONTROL_DATA)) {
+ JSONObject objectEquals = (JSONObject) JsonUtils.readObjectFromJsonObject(reference, key);
+ JSONObject testEquals = (JSONObject) JsonUtils.readObjectFromJsonObject(underTest, key);
+ Hashtable<String, Object> hashReference = JsonRPCMarshaller.deserializeJSONObject(objectEquals);
+ Hashtable<String, Object> hashTest = JsonRPCMarshaller.deserializeJSONObject(testEquals);
+ assertTrue(Test.TRUE, Validator.validateLightControlData(new LightControlData(hashReference), new LightControlData(hashTest)));
} else {
assertEquals(Test.MATCH, JsonUtils.readObjectFromJsonObject(reference, key), JsonUtils.readObjectFromJsonObject(underTest, key));
}
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/RadioControlCapabilitiesTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/RadioControlCapabilitiesTests.java
index 28c1d2c5b..08e1364bc 100644
--- a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/RadioControlCapabilitiesTests.java
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/RadioControlCapabilitiesTests.java
@@ -12,7 +12,7 @@ import org.json.JSONObject;
import java.util.Iterator;
/**
- * This is a unit test class for the SmartDeviceLink library project class :
+ * This is a unit test class for the SmartDeviceLink library project class :
* {@link com.smartdevicelink.rpc.RadioControlCapabilities}
*/
public class RadioControlCapabilitiesTests extends TestCase{
@@ -33,6 +33,7 @@ public class RadioControlCapabilitiesTests extends TestCase{
msg.setStateAvailable(Test.GENERAL_BOOLEAN);
msg.setSignalStrengthAvailable(Test.GENERAL_BOOLEAN);
msg.setSignalChangeThresholdAvailable(Test.GENERAL_BOOLEAN);
+ msg.setSisDataAvailable(Test.GENERAL_BOOLEAN);
}
/**
@@ -50,6 +51,7 @@ public class RadioControlCapabilitiesTests extends TestCase{
boolean stateAvailable = msg.getStateAvailable();
boolean signalStrengthAvailable = msg.getSignalStrengthAvailable();
boolean signalChangeThresholdAvailable = msg.getSignalChangeThresholdAvailable();
+ boolean sisDataAvailable = msg.getSisDataAvailable();
// Valid Tests
@@ -63,6 +65,7 @@ public class RadioControlCapabilitiesTests extends TestCase{
assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, stateAvailable);
assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, signalStrengthAvailable);
assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, signalChangeThresholdAvailable);
+ assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, sisDataAvailable);
// Invalid/Null Tests
RadioControlCapabilities msg = new RadioControlCapabilities();
@@ -78,6 +81,7 @@ public class RadioControlCapabilitiesTests extends TestCase{
assertNull(Test.NULL, msg.getStateAvailable());
assertNull(Test.NULL, msg.getSignalStrengthAvailable());
assertNull(Test.NULL, msg.getSignalChangeThresholdAvailable());
+ assertNull(Test.NULL, msg.getSisDataAvailable());
}
public void testJson(){
@@ -94,6 +98,7 @@ public class RadioControlCapabilitiesTests extends TestCase{
reference.put(RadioControlCapabilities.KEY_STATE_AVAILABLE, Test.GENERAL_BOOLEAN);
reference.put(RadioControlCapabilities.KEY_SIGNAL_STRENGTH_AVAILABLE, Test.GENERAL_BOOLEAN);
reference.put(RadioControlCapabilities.KEY_SIGNAL_CHANGE_THRESHOLD_AVAILABLE, Test.GENERAL_BOOLEAN);
+ reference.put(RadioControlCapabilities.KEY_SIS_DATA_AVAILABLE, Test.GENERAL_BOOLEAN);
JSONObject underTest = msg.serializeJSON();
assertEquals(Test.MATCH, reference.length(), underTest.length());
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/RadioControlDataTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/RadioControlDataTests.java
index b42145e8f..41f2829d0 100644
--- a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/RadioControlDataTests.java
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/RadioControlDataTests.java
@@ -3,6 +3,7 @@ package com.smartdevicelink.test.rpc.datatypes;
import com.smartdevicelink.marshal.JsonRPCMarshaller;
import com.smartdevicelink.proxy.rpc.RadioControlData;
import com.smartdevicelink.proxy.rpc.RdsData;
+import com.smartdevicelink.proxy.rpc.SisData;
import com.smartdevicelink.proxy.rpc.enums.RadioBand;
import com.smartdevicelink.proxy.rpc.enums.RadioState;
import com.smartdevicelink.test.JsonUtils;
@@ -18,7 +19,7 @@ import java.util.Hashtable;
import java.util.Iterator;
/**
- * This is a unit test class for the SmartDeviceLink library project class :
+ * This is a unit test class for the SmartDeviceLink library project class :
* {@link com.smartdevicelink.rpc.RadioControlData}
*/
public class RadioControlDataTests extends TestCase{
@@ -39,6 +40,7 @@ public class RadioControlDataTests extends TestCase{
msg.setSignalChangeThreshold(Test.GENERAL_INT);
msg.setRadioEnable(Test.GENERAL_BOOLEAN);
msg.setState(Test.GENERAL_RADIOSTATE);
+ msg.setSisData(Test.GENERAL_SISDATA);
}
/**
@@ -56,6 +58,7 @@ public class RadioControlDataTests extends TestCase{
int signalChangeThreshold = msg.getSignalChangeThreshold();
boolean radioEnable = msg.getRadioEnable();
RadioState state = msg.getState();
+ SisData sisData = msg.getSisData();
// Valid Tests
assertEquals(Test.MATCH, Test.GENERAL_INT, frequencyInteger);
@@ -68,6 +71,7 @@ public class RadioControlDataTests extends TestCase{
assertEquals(Test.MATCH, Test.GENERAL_INT, signalChangeThreshold);
assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, radioEnable);
assertEquals(Test.MATCH, Test.GENERAL_RADIOSTATE, state);
+ assertTrue(Test.TRUE, Validator.validateSisData(Test.GENERAL_SISDATA, sisData));
// Invalid/Null Tests
RadioControlData msg = new RadioControlData();
@@ -83,6 +87,7 @@ public class RadioControlDataTests extends TestCase{
assertNull(Test.NULL, msg.getSignalChangeThreshold());
assertNull(Test.NULL, msg.getRadioEnable());
assertNull(Test.NULL, msg.getState());
+ assertNull(Test.NULL, msg.getSisData());
}
public void testJson(){
@@ -99,6 +104,7 @@ public class RadioControlDataTests extends TestCase{
reference.put(RadioControlData.KEY_SIGNAL_CHANGE_THRESHOLD, Test.GENERAL_INT);
reference.put(RadioControlData.KEY_RADIO_ENABLE, Test.GENERAL_BOOLEAN);
reference.put(RadioControlData.KEY_STATE, Test.GENERAL_RADIOSTATE);
+ reference.put(RadioControlData.KEY_SIS_DATA, JsonRPCMarshaller.serializeHashtable(Test.GENERAL_SISDATA.getStore()));
JSONObject underTest = msg.serializeJSON();
assertEquals(Test.MATCH, reference.length(), underTest.length());
@@ -112,7 +118,13 @@ public class RadioControlDataTests extends TestCase{
JSONObject testEquals = (JSONObject) JsonUtils.readObjectFromJsonObject(underTest, key);
Hashtable<String, Object> hashReference = JsonRPCMarshaller.deserializeJSONObject(objectEquals);
Hashtable<String, Object> hashTest = JsonRPCMarshaller.deserializeJSONObject(testEquals);
- assertTrue(Test.TRUE, Validator.validateRadioControlData( new RadioControlData(hashReference), new RadioControlData(hashTest)));
+ assertTrue(Test.TRUE, Validator.validateRdsData(new RdsData(hashReference), new RdsData(hashTest)));
+ } else if (key.equals(RadioControlData.KEY_SIS_DATA)) {
+ JSONObject objectEquals = (JSONObject) JsonUtils.readObjectFromJsonObject(reference, key);
+ JSONObject testEquals = (JSONObject) JsonUtils.readObjectFromJsonObject(underTest, key);
+ Hashtable<String, Object> hashReference = JsonRPCMarshaller.deserializeJSONObject(objectEquals);
+ Hashtable<String, Object> hashTest = JsonRPCMarshaller.deserializeJSONObject(testEquals);
+ assertTrue(Test.TRUE, Validator.validateSisData(new SisData(hashReference), new SisData(hashTest)));
} else{
assertEquals(Test.MATCH, JsonUtils.readObjectFromJsonObject(reference, key), JsonUtils.readObjectFromJsonObject(underTest, key));
}
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/RemoteControlCapabilitiesTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/RemoteControlCapabilitiesTests.java
index 6e29f01a3..e6a2d2b9a 100644
--- a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/RemoteControlCapabilitiesTests.java
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/RemoteControlCapabilitiesTests.java
@@ -1,8 +1,11 @@
package com.smartdevicelink.test.rpc.datatypes;
import com.smartdevicelink.marshal.JsonRPCMarshaller;
+import com.smartdevicelink.proxy.rpc.AudioControlCapabilities;
import com.smartdevicelink.proxy.rpc.ButtonCapabilities;
import com.smartdevicelink.proxy.rpc.ClimateControlCapabilities;
+import com.smartdevicelink.proxy.rpc.HMISettingsControlCapabilities;
+import com.smartdevicelink.proxy.rpc.LightControlCapabilities;
import com.smartdevicelink.proxy.rpc.RadioControlCapabilities;
import com.smartdevicelink.proxy.rpc.RemoteControlCapabilities;
import com.smartdevicelink.proxy.rpc.SeatControlCapabilities;
@@ -32,11 +35,13 @@ public class RemoteControlCapabilitiesTests extends TestCase {
@Override
public void setUp() {
msg = new RemoteControlCapabilities();
-
msg.setButtonCapabilities(Test.GENERAL_BUTTONCAPABILITIES_LIST);
msg.setRadioControlCapabilities(Test.GENERAL_RADIOCONTROLCAPABILITIES_LIST);
msg.setClimateControlCapabilities(Test.GENERAL_CLIMATECONTROLCAPABILITIES_LIST);
msg.setSeatControlCapabilities(Test.GENERAL_SEATCONTROLCAPABILITIES_LIST);
+ msg.setAudioControlCapabilities(Test.GENERAL_AUDIOCONTROLCAPABILITIES_LIST);
+ msg.setHmiSettingsControlCapabilities(Test.GENERAL_HMISETTINGSCONTROLCAPABILITIES);
+ msg.setLightControlCapabilities(Test.GENERAL_LIGHTCONTROLCAPABILITIES);
}
/**
@@ -48,6 +53,9 @@ public class RemoteControlCapabilitiesTests extends TestCase {
List<RadioControlCapabilities> radioControlCapabilities = msg.getRadioControlCapabilities();
List<ClimateControlCapabilities> climateControlCapabilities = msg.getClimateControlCapabilities();
List<SeatControlCapabilities> seatControlCapabilities = msg.getSeatControlCapabilities();
+ List<AudioControlCapabilities> audioControlCapabilities = msg.getAudioControlCapabilities();
+ HMISettingsControlCapabilities hmiSettingsControlCapabilities = msg.getHmiSettingsControlCapabilities();
+ LightControlCapabilities lightControlCapabilities = msg.getLightControlCapabilities();
// Valid Tests
assertEquals(Test.MATCH, Test.GENERAL_BUTTONCAPABILITIES_LIST.size(), buttonCapabilities.size());
@@ -58,8 +66,10 @@ public class RemoteControlCapabilitiesTests extends TestCase {
assertTrue(Test.TRUE, Validator.validateButtonCapabilities(Test.GENERAL_BUTTONCAPABILITIES_LIST, buttonCapabilities));
assertTrue(Test.TRUE, Validator.validateRadioControlCapabilities(Test.GENERAL_RADIOCONTROLCAPABILITIES_LIST, radioControlCapabilities));
assertTrue(Test.TRUE, Validator.validateClimateControlCapabilities(Test.GENERAL_CLIMATECONTROLCAPABILITIES_LIST, climateControlCapabilities));
-
assertTrue(Test.TRUE, Validator.validateSeatControlCapabilitiesList(Test.GENERAL_SEATCONTROLCAPABILITIES_LIST, seatControlCapabilities));
+ assertTrue(Test.TRUE, Validator.validateAudioControlCapabilitiesList(Test.GENERAL_AUDIOCONTROLCAPABILITIES_LIST, audioControlCapabilities));
+ assertTrue(Test.TRUE, Validator.validateHMISettingsControlCapabilities(Test.GENERAL_HMISETTINGSCONTROLCAPABILITIES, hmiSettingsControlCapabilities));
+ assertTrue(Test.TRUE, Validator.validateLightControlCapabilities(Test.GENERAL_LIGHTCONTROLCAPABILITIES, lightControlCapabilities));
// Invalid/Null Tests
RemoteControlCapabilities msg = new RemoteControlCapabilities();
@@ -69,7 +79,9 @@ public class RemoteControlCapabilitiesTests extends TestCase {
assertNull(Test.NULL, msg.getRadioControlCapabilities());
assertNull(Test.NULL, msg.getClimateControlCapabilities());
assertNull(Test.NULL, msg.getSeatControlCapabilities());
-
+ assertNull(Test.NULL, msg.getAudioControlCapabilities());
+ assertNull(Test.NULL, msg.getHmiSettingsControlCapabilities());
+ assertNull(Test.NULL, msg.getLightControlCapabilities());
}
public void testJson() {
@@ -80,6 +92,9 @@ public class RemoteControlCapabilitiesTests extends TestCase {
reference.put(RemoteControlCapabilities.KEY_RADIO_CONTROL_CAPABILITIES, Test.JSON_RADIOCONTROLCAPABILITIES);
reference.put(RemoteControlCapabilities.KEY_CLIMATE_CONTROL_CAPABILITIES, Test.JSON_CLIMATECONTROLCAPABILITIES);
reference.put(RemoteControlCapabilities.KEY_SEAT_CONTROL_CAPABILITIES, Test.GENERAL_SEATCONTROLCAPABILITIES_LIST);
+ reference.put(RemoteControlCapabilities.KEY_AUDIO_CONTROL_CAPABILITIES, Test.GENERAL_AUDIOCONTROLCAPABILITIES_LIST);
+ reference.put(RemoteControlCapabilities.KEY_HMI_SETTINGS_CONTROL_CAPABILITIES, JsonRPCMarshaller.serializeHashtable(Test.GENERAL_HMISETTINGSCONTROLCAPABILITIES.getStore()));
+ reference.put(RemoteControlCapabilities.KEY_LIGHT_CONTROL_CAPABILITIES, JsonRPCMarshaller.serializeHashtable(Test.GENERAL_LIGHTCONTROLCAPABILITIES.getStore()));
JSONObject underTest = msg.serializeJSON();
assertEquals(Test.MATCH, reference.length(), underTest.length());
@@ -137,6 +152,25 @@ public class RemoteControlCapabilitiesTests extends TestCase {
for (SeatControlCapabilities scc : sccReference) {
assertTrue(Validator.validateSeatControlCapabilities(scc, new SeatControlCapabilities(JsonRPCMarshaller.deserializeJSONObject(sccArray.getJSONObject(i++)))));
}
+ } else if (key.equals(RemoteControlCapabilities.KEY_AUDIO_CONTROL_CAPABILITIES)) {
+ List<AudioControlCapabilities> accReference = (List<AudioControlCapabilities>) JsonUtils.readObjectFromJsonObject(reference, key);
+ JSONArray accArray = JsonUtils.readJsonArrayFromJsonObject(underTest, key);
+ int i = 0;
+ for (AudioControlCapabilities acc : accReference) {
+ assertTrue(Validator.validateAudioControlCapabilities(acc, new AudioControlCapabilities(JsonRPCMarshaller.deserializeJSONObject(accArray.getJSONObject(i++)))));
+ }
+ } else if (key.equals(RemoteControlCapabilities.KEY_HMI_SETTINGS_CONTROL_CAPABILITIES)) {
+ JSONObject objectEquals = (JSONObject) JsonUtils.readObjectFromJsonObject(reference, key);
+ JSONObject testEquals = (JSONObject) JsonUtils.readObjectFromJsonObject(underTest, key);
+ Hashtable<String, Object> hashReference = JsonRPCMarshaller.deserializeJSONObject(objectEquals);
+ Hashtable<String, Object> hashTest = JsonRPCMarshaller.deserializeJSONObject(testEquals);
+ assertTrue(Test.TRUE, Validator.validateHMISettingsControlCapabilities(new HMISettingsControlCapabilities(hashReference), new HMISettingsControlCapabilities(hashTest)));
+ } else if (key.equals(RemoteControlCapabilities.KEY_LIGHT_CONTROL_CAPABILITIES)) {
+ JSONObject objectEquals = (JSONObject) JsonUtils.readObjectFromJsonObject(reference, key);
+ JSONObject testEquals = (JSONObject) JsonUtils.readObjectFromJsonObject(underTest, key);
+ Hashtable<String, Object> hashReference = JsonRPCMarshaller.deserializeJSONObject(objectEquals);
+ Hashtable<String, Object> hashTest = JsonRPCMarshaller.deserializeJSONObject(testEquals);
+ assertTrue(Test.TRUE, Validator.validateLightControlCapabilities(new LightControlCapabilities(hashReference), new LightControlCapabilities(hashTest)));
}
}
} catch (JSONException e) {
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/SisDataTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/SisDataTests.java
new file mode 100644
index 000000000..51e38f8d1
--- /dev/null
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/SisDataTests.java
@@ -0,0 +1,105 @@
+package com.smartdevicelink.test.rpc.datatypes;
+
+import com.smartdevicelink.marshal.JsonRPCMarshaller;
+import com.smartdevicelink.proxy.rpc.GPSData;
+import com.smartdevicelink.proxy.rpc.SisData;
+import com.smartdevicelink.proxy.rpc.StationIDNumber;
+import com.smartdevicelink.test.JsonUtils;
+import com.smartdevicelink.test.Test;
+import com.smartdevicelink.test.Validator;
+import com.smartdevicelink.test.VehicleDataHelper;
+
+import junit.framework.TestCase;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.Hashtable;
+import java.util.Iterator;
+
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.rpc.SisData}
+ */
+public class SisDataTests extends TestCase {
+
+ private SisData msg;
+
+ @Override
+ public void setUp() {
+ msg = new SisData();
+
+ msg.setStationShortName(Test.GENERAL_STRING);
+ msg.setStationIDNumber(Test.GENERAL_STATIONIDNUMBER);
+ msg.setStationLongName(Test.GENERAL_STRING);
+ msg.setStationLocation(VehicleDataHelper.GPS);
+ msg.setStationMessage(Test.GENERAL_STRING);
+ }
+
+ /**
+ * Tests the expected values of the RPC message.
+ */
+ public void testRpcValues() {
+ // Test Values
+ String stationShortName = msg.getStationShortName();
+ StationIDNumber stationIDNumber = msg.getStationIDNumber();
+ String stationLongName = msg.getStationLongName();
+ GPSData stationLocation = msg.getStationLocation();
+ String stationMessage = msg.getStationMessage();
+
+ // Valid Tests
+ assertEquals(Test.MATCH, Test.GENERAL_STRING, stationShortName);
+ assertEquals(Test.MATCH, Test.GENERAL_STATIONIDNUMBER, stationIDNumber);
+ assertEquals(Test.MATCH, Test.GENERAL_STRING, stationLongName);
+ assertEquals(Test.MATCH, VehicleDataHelper.GPS, stationLocation);
+ assertEquals(Test.MATCH, Test.GENERAL_STRING, stationMessage);
+
+ // Invalid/Null Tests
+ SisData msg = new SisData();
+ assertNotNull(Test.NOT_NULL, msg);
+
+ assertNull(Test.NULL, msg.getStationShortName());
+ assertNull(Test.NULL, msg.getStationIDNumber());
+ assertNull(Test.NULL, msg.getStationLongName());
+ assertNull(Test.NULL, msg.getStationLocation());
+ assertNull(Test.NULL, msg.getStationMessage());
+ }
+
+ public void testJson() {
+ JSONObject reference = new JSONObject();
+
+ try {
+ reference.put(SisData.KEY_STATION_SHORT_NAME, Test.GENERAL_STRING);
+ reference.put(SisData.KEY_STATION_ID_NUMBER, JsonRPCMarshaller.serializeHashtable(Test.GENERAL_STATIONIDNUMBER.getStore()));
+ reference.put(SisData.KEY_STATION_LONG_NAME, Test.GENERAL_STRING);
+ reference.put(SisData.KEY_STATION_LOCATION, JsonRPCMarshaller.serializeHashtable(VehicleDataHelper.GPS.getStore()));
+ reference.put(SisData.KEY_STATION_MESSAGE, Test.GENERAL_STRING);
+
+ JSONObject underTest = msg.serializeJSON();
+ assertEquals(Test.MATCH, reference.length(), underTest.length());
+
+ Iterator<?> iterator = reference.keys();
+ while (iterator.hasNext()) {
+ String key = (String) iterator.next();
+
+ if (key.equals(SisData.KEY_STATION_ID_NUMBER)) {
+ JSONObject objectEquals = (JSONObject) JsonUtils.readObjectFromJsonObject(reference, key);
+ JSONObject testEquals = (JSONObject) JsonUtils.readObjectFromJsonObject(underTest, key);
+ Hashtable<String, Object> hashReference = JsonRPCMarshaller.deserializeJSONObject(objectEquals);
+ Hashtable<String, Object> hashTest = JsonRPCMarshaller.deserializeJSONObject(testEquals);
+ assertTrue(Test.TRUE, Validator.validateStationIDNumber(new StationIDNumber(hashReference), new StationIDNumber(hashTest)));
+ } else if (key.equals(SisData.KEY_STATION_LOCATION)) {
+ JSONObject objectEquals = (JSONObject) JsonUtils.readObjectFromJsonObject(reference, key);
+ JSONObject testEquals = (JSONObject) JsonUtils.readObjectFromJsonObject(underTest, key);
+ Hashtable<String, Object> hashReference = JsonRPCMarshaller.deserializeJSONObject(objectEquals);
+ Hashtable<String, Object> hashTest = JsonRPCMarshaller.deserializeJSONObject(testEquals);
+ assertTrue(Test.TRUE, Validator.validateGpsData(new GPSData(hashReference), new GPSData(hashTest)));
+ } else {
+ assertEquals(Test.MATCH, JsonUtils.readObjectFromJsonObject(reference, key), JsonUtils.readObjectFromJsonObject(underTest, key));
+ }
+ }
+ } catch (JSONException e) {
+ fail(Test.JSON_FAIL);
+ }
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/StationIDNumberTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/StationIDNumberTests.java
new file mode 100644
index 000000000..e7e61f8fd
--- /dev/null
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/StationIDNumberTests.java
@@ -0,0 +1,73 @@
+package com.smartdevicelink.test.rpc.datatypes;
+
+import com.smartdevicelink.proxy.rpc.StationIDNumber;
+import com.smartdevicelink.test.JsonUtils;
+import com.smartdevicelink.test.Test;
+
+import junit.framework.TestCase;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.Iterator;
+
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.rpc.StationIDNumber}
+ */
+public class StationIDNumberTests extends TestCase {
+
+ private StationIDNumber msg;
+
+ @Override
+ public void setUp() {
+ msg = new StationIDNumber();
+
+ msg.setCountryCode(Test.GENERAL_INT);
+ msg.setFccFacilityId(Test.GENERAL_INT);
+ }
+
+ /**
+ * Tests the expected values of the RPC message.
+ */
+ public void testRpcValues() {
+ // Test Values
+
+ int countryCode = msg.getCountryCode();
+ int fccFacilityId = msg.getFccFacilityId();
+
+ // Valid Tests
+ assertEquals(Test.MATCH, Test.GENERAL_INT, countryCode);
+ assertEquals(Test.MATCH, Test.GENERAL_INT, fccFacilityId);
+
+ // Invalid/Null Tests
+ StationIDNumber msg = new StationIDNumber();
+ assertNotNull(Test.NOT_NULL, msg);
+
+ assertNull(Test.NULL, msg.getCountryCode());
+ assertNull(Test.NULL, msg.getFccFacilityId());
+ }
+
+ public void testJson() {
+ JSONObject reference = new JSONObject();
+
+ try {
+
+ reference.put(StationIDNumber.KEY_COUNTRY_CODE, Test.GENERAL_INT);
+ reference.put(StationIDNumber.KEY_FCC_FACILITY_ID, Test.GENERAL_INT);
+
+ JSONObject underTest = msg.serializeJSON();
+ assertEquals(Test.MATCH, reference.length(), underTest.length());
+
+ Iterator<?> iterator = reference.keys();
+ while (iterator.hasNext()) {
+ String key = (String) iterator.next();
+
+ assertEquals(Test.MATCH, JsonUtils.readObjectFromJsonObject(reference, key), JsonUtils.readObjectFromJsonObject(underTest, key));
+
+ }
+ } catch (JSONException e) {
+ fail(Test.JSON_FAIL);
+ }
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/DisplayModeTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/DisplayModeTests.java
new file mode 100644
index 000000000..94387ef9a
--- /dev/null
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/DisplayModeTests.java
@@ -0,0 +1,74 @@
+package com.smartdevicelink.test.rpc.enums;
+
+import com.smartdevicelink.proxy.rpc.enums.DisplayMode;
+
+import junit.framework.TestCase;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.rpc.enums.DisplayMode}
+ */
+public class DisplayModeTests extends TestCase {
+
+ /**
+ * Verifies that the enum values are not null upon valid assignment.
+ */
+ public void testValidEnums() {
+ String example = "DAY";
+ DisplayMode enumDay = DisplayMode.valueForString(example);
+ example = "NIGHT";
+ DisplayMode enumNight = DisplayMode.valueForString(example);
+ example = "AUTO";
+ DisplayMode enumAuto = DisplayMode.valueForString(example);
+
+ assertNotNull("DAY returned null", enumDay);
+ assertNotNull("NIGHT returned null", enumNight);
+ assertNotNull("AUTO returned null", enumAuto);
+ }
+
+ /**
+ * Verifies that an invalid assignment is null.
+ */
+ public void testInvalidEnum() {
+ String example = "dAY";
+ try {
+ DisplayMode temp = DisplayMode.valueForString(example);
+ assertNull("Result of valueForString should be null.", temp);
+ } catch (IllegalArgumentException exception) {
+ fail("Invalid enum throws IllegalArgumentException.");
+ }
+ }
+
+ /**
+ * Verifies that a null assignment is invalid.
+ */
+ public void testNullEnum() {
+ String example = null;
+ try {
+ DisplayMode temp = DisplayMode.valueForString(example);
+ assertNull("Result of valueForString should be null.", temp);
+ } catch (NullPointerException exception) {
+ fail("Null string throws NullPointerException.");
+ }
+ }
+
+ /**
+ * Verifies the possible enum values of DisplayMode.
+ */
+ public void testListEnum() {
+ List<DisplayMode> enumValueList = Arrays.asList(DisplayMode.values());
+
+ List<DisplayMode> enumTestList = new ArrayList<DisplayMode>();
+ enumTestList.add(DisplayMode.DAY);
+ enumTestList.add(DisplayMode.NIGHT);
+ enumTestList.add(DisplayMode.AUTO);
+
+ assertTrue("Enum value list does not match enum class list",
+ enumValueList.containsAll(enumTestList) && enumTestList.containsAll(enumValueList));
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/DistanceUnitTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/DistanceUnitTests.java
new file mode 100644
index 000000000..c421d6029
--- /dev/null
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/DistanceUnitTests.java
@@ -0,0 +1,69 @@
+package com.smartdevicelink.test.rpc.enums;
+
+import com.smartdevicelink.proxy.rpc.enums.DistanceUnit;
+
+import junit.framework.TestCase;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.rpc.enums.DistanceUnit}
+ */
+public class DistanceUnitTests extends TestCase {
+
+ /**
+ * Verifies that the enum values are not null upon valid assignment.
+ */
+ public void testValidEnums() {
+ String example = "MILES";
+ DistanceUnit enumMiles = DistanceUnit.valueForString(example);
+ example = "KILOMETERS";
+ DistanceUnit enumKilometers = DistanceUnit.valueForString(example);
+
+ assertNotNull("MILES returned null", enumMiles);
+ assertNotNull("KILOMETERS returned null", enumKilometers);
+ }
+
+ /**
+ * Verifies that an invalid assignment is null.
+ */
+ public void testInvalidEnum() {
+ String example = "mILES";
+ try {
+ DistanceUnit temp = DistanceUnit.valueForString(example);
+ assertNull("Result of valueForString should be null.", temp);
+ } catch (IllegalArgumentException exception) {
+ fail("Invalid enum throws IllegalArgumentException.");
+ }
+ }
+
+ /**
+ * Verifies that a null assignment is invalid.
+ */
+ public void testNullEnum() {
+ String example = null;
+ try {
+ DistanceUnit temp = DistanceUnit.valueForString(example);
+ assertNull("Result of valueForString should be null.", temp);
+ } catch (NullPointerException exception) {
+ fail("Null string throws NullPointerException.");
+ }
+ }
+
+ /**
+ * Verifies the possible enum values of DistanceUnit.
+ */
+ public void testListEnum() {
+ List<DistanceUnit> enumValueList = Arrays.asList(DistanceUnit.values());
+ List<DistanceUnit> enumTestList = new ArrayList<DistanceUnit>();
+ enumTestList.add(DistanceUnit.MILES);
+ enumTestList.add(DistanceUnit.KILOMETERS);
+
+ assertTrue("Enum value list does not match enum class list",
+ enumValueList.containsAll(enumTestList) && enumTestList.containsAll(enumValueList));
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/LightNameTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/LightNameTests.java
new file mode 100644
index 000000000..10df1e762
--- /dev/null
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/LightNameTests.java
@@ -0,0 +1,261 @@
+package com.smartdevicelink.test.rpc.enums;
+
+import com.smartdevicelink.proxy.rpc.enums.LightName;
+
+import junit.framework.TestCase;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.rpc.enums.LightName}
+ */
+public class LightNameTests extends TestCase {
+
+ /**
+ * Verifies that the enum values are not null upon valid assignment.
+ */
+ public void testValidEnums() {
+ String example = "FRONT_LEFT_HIGH_BEAM";
+ LightName enumFrontLeftHighBeam = LightName.valueForString(example);
+ example = "FRONT_RIGHT_HIGH_BEAM";
+ LightName enumFrontRightHighBeam = LightName.valueForString(example);
+ example = "FRONT_LEFT_LOW_BEAM";
+ LightName enumFrontLeftLowBeam = LightName.valueForString(example);
+ example = "FRONT_RIGHT_LOW_BEAM";
+ LightName enumFrontRightLowBeam = LightName.valueForString(example);
+ example = "FRONT_LEFT_PARKING_LIGHT";
+ LightName enumFrontLeftParkingLight = LightName.valueForString(example);
+ example = "FRONT_RIGHT_PARKING_LIGHT";
+ LightName enumFrontRightParkingLight = LightName.valueForString(example);
+ example = "FRONT_LEFT_FOG_LIGHT";
+ LightName enumFrontLeftFogLight = LightName.valueForString(example);
+ example = "FRONT_RIGHT_FOG_LIGHT";
+ LightName enumFrontRightFogLight = LightName.valueForString(example);
+ example = "FRONT_LEFT_DAYTIME_RUNNING_LIGHT";
+ LightName enumFrontLeftDaytimeRunningLight = LightName.valueForString(example);
+ example = "FRONT_RIGHT_DAYTIME_RUNNING_LIGHT";
+ LightName enumFrontRightDaytimeRunningLight = LightName.valueForString(example);
+ example = "FRONT_LEFT_TURN_LIGHT";
+ LightName enumFrontLeftTurnLight = LightName.valueForString(example);
+ example = "FRONT_RIGHT_TURN_LIGHT";
+ LightName enumFrontRightTurnLight = LightName.valueForString(example);
+ example = "REAR_LEFT_FOG_LIGHT";
+ LightName enumRearLeftFogLight = LightName.valueForString(example);
+ example = "REAR_RIGHT_FOG_LIGHT";
+ LightName enumRearRightFogLight = LightName.valueForString(example);
+ example = "REAR_LEFT_TAIL_LIGHT";
+ LightName enumRearLeftTailLight = LightName.valueForString(example);
+ example = "REAR_RIGHT_TAIL_LIGHT";
+ LightName enumRearRightTailLight = LightName.valueForString(example);
+ example = "REAR_LEFT_BRAKE_LIGHT";
+ LightName enumRearLeftBrakeLight = LightName.valueForString(example);
+ example = "REAR_RIGHT_BRAKE_LIGHT";
+ LightName enumRearRightBrakeLight = LightName.valueForString(example);
+ example = "REAR_LEFT_TURN_LIGHT";
+ LightName enumRearLeftTurnLight = LightName.valueForString(example);
+ example = "REAR_RIGHT_TURN_LIGHT";
+ LightName enumRearRightTurnLight = LightName.valueForString(example);
+ example = "REAR_REGISTRATION_PLATE_LIGHT";
+ LightName enumRearRegistrationPlateLight = LightName.valueForString(example);
+ example = "HIGH_BEAMS";
+ LightName enumHighBeams = LightName.valueForString(example);
+ example = "LOW_BEAMS";
+ LightName enumLowBeams = LightName.valueForString(example);
+ example = "FOG_LIGHTS";
+ LightName enumFogLights = LightName.valueForString(example);
+ example = "RUNNING_LIGHTS";
+ LightName enumRunningLights = LightName.valueForString(example);
+ example = "PARKING_LIGHTS";
+ LightName enumParkingLights = LightName.valueForString(example);
+ example = "BRAKE_LIGHTS";
+ LightName enumBrakeLights = LightName.valueForString(example);
+ example = "REAR_REVERSING_LIGHTS";
+ LightName enumRearReversingLights = LightName.valueForString(example);
+ example = "SIDE_MARKER_LIGHTS";
+ LightName enumSideMarkerLights = LightName.valueForString(example);
+ example = "LEFT_TURN_LIGHTS";
+ LightName enumLeftTurnLights = LightName.valueForString(example);
+ example = "RIGHT_TURN_LIGHTS";
+ LightName enumRightTurnLights = LightName.valueForString(example);
+ example = "HAZARD_LIGHTS";
+ LightName enumHazardLights = LightName.valueForString(example);
+
+ example = "REAR_CARGO_LIGHTS";
+ LightName enumRearCargoLights = LightName.valueForString(example);
+ example = "REAR_TRUCK_BED_LIGHTS";
+ LightName enumRearTruckBedLights = LightName.valueForString(example);
+ example = "REAR_TRAILER_LIGHTS";
+ LightName enumRearTrailerLights = LightName.valueForString(example);
+ example = "LEFT_SPOT_LIGHTS";
+ LightName enumLeftSpotLights = LightName.valueForString(example);
+ example = "RIGHT_SPOT_LIGHTS";
+ LightName enumRightSpotLights = LightName.valueForString(example);
+ example = "LEFT_PUDDLE_LIGHTS";
+ LightName enumLeftPuddleLights = LightName.valueForString(example);
+ example = "RIGHT_PUDDLE_LIGHTS";
+ LightName enumRightPuddleLights = LightName.valueForString(example);
+ example = "AMBIENT_LIGHTS";
+ LightName enumAmbientLights = LightName.valueForString(example);
+ example = "OVERHEAD_LIGHTS";
+ LightName enumOverheadLights = LightName.valueForString(example);
+ example = "READING_LIGHTS";
+ LightName enumReadingLights = LightName.valueForString(example);
+ example = "TRUNK_LIGHTS";
+ LightName enumTrunkLights = LightName.valueForString(example);
+ example = "EXTERIOR_FRONT_LIGHTS";
+ LightName enumExteriorFrontLights = LightName.valueForString(example);
+ example = "EXTERIOR_REAR_LIGHTS";
+ LightName enumExteriorRearLights = LightName.valueForString(example);
+ example = "EXTERIOR_LEFT_LIGHTS";
+ LightName enumExteriorLeftLights = LightName.valueForString(example);
+ example = "EXTERIOR_RIGHT_LIGHTS";
+ LightName enumExteriorRightLights = LightName.valueForString(example);
+ example = "EXTERIOR_ALL_LIGHTS";
+ LightName enumExteriorAllLights = LightName.valueForString(example);
+
+ assertNotNull("FRONT_LEFT_HIGH_BEAM returned null", enumFrontLeftHighBeam);
+ assertNotNull("FRONT_RIGHT_HIGH_BEAM returned null", enumFrontRightHighBeam);
+ assertNotNull("FRONT_LEFT_LOW_BEAM returned null", enumFrontLeftLowBeam);
+ assertNotNull("FRONT_RIGHT_LOW_BEAM returned null", enumFrontRightLowBeam);
+ assertNotNull("FRONT_LEFT_PARKING_LIGHT returned null", enumFrontLeftParkingLight);
+ assertNotNull("FRONT_RIGHT_PARKING_LIGHT returned null", enumFrontRightParkingLight);
+ assertNotNull("FRONT_LEFT_FOG_LIGHT returned null", enumFrontLeftFogLight);
+ assertNotNull("FRONT_RIGHT_FOG_LIGHT returned null", enumFrontRightFogLight);
+ assertNotNull("FRONT_LEFT_DAYTIME_RUNNING_LIGHT returned null", enumFrontLeftDaytimeRunningLight);
+ assertNotNull("FRONT_RIGHT_DAYTIME_RUNNING_LIGHT returned null", enumFrontRightDaytimeRunningLight);
+
+ assertNotNull("FRONT_LEFT_TURN_LIGHT returned null", enumFrontLeftTurnLight);
+ assertNotNull("FRONT_RIGHT_TURN_LIGHT returned null", enumFrontRightTurnLight);
+ assertNotNull("REAR_LEFT_FOG_LIGHT returned null", enumRearLeftFogLight);
+ assertNotNull("REAR_RIGHT_FOG_LIGHT returned null", enumRearRightFogLight);
+ assertNotNull("REAR_LEFT_TAIL_LIGHT returned null", enumRearLeftTailLight);
+ assertNotNull("REAR_RIGHT_TAIL_LIGHT returned null", enumRearRightTailLight);
+ assertNotNull("REAR_LEFT_BRAKE_LIGHT returned null", enumRearLeftBrakeLight);
+ assertNotNull("REAR_RIGHT_BRAKE_LIGHT returned null", enumRearRightBrakeLight);
+ assertNotNull("REAR_LEFT_TURN_LIGHT returned null", enumRearLeftTurnLight);
+ assertNotNull("REAR_RIGHT_TURN_LIGHT returned null", enumRearRightTurnLight);
+ assertNotNull("REAR_REGISTRATION_PLATE_LIGHT returned null", enumRearRegistrationPlateLight);
+
+ assertNotNull("HIGH_BEAMS returned null", enumHighBeams);
+ assertNotNull("LOW_BEAMS returned null", enumLowBeams);
+ assertNotNull("FOG_LIGHTS returned null", enumFogLights);
+ assertNotNull("RUNNING_LIGHTS returned null", enumRunningLights);
+ assertNotNull("PARKING_LIGHTS returned null", enumParkingLights);
+ assertNotNull("BRAKE_LIGHTS returned null", enumBrakeLights);
+
+ assertNotNull("REAR_REVERSING_LIGHTS returned null", enumRearReversingLights);
+ assertNotNull("SIDE_MARKER_LIGHTS returned null", enumSideMarkerLights);
+ assertNotNull("LEFT_TURN_LIGHTS returned null", enumLeftTurnLights);
+ assertNotNull("RIGHT_TURN_LIGHTS returned null", enumRightTurnLights);
+ assertNotNull("HAZARD_LIGHTS returned null", enumHazardLights);
+ assertNotNull("REAR_CARGO_LIGHTS returned null", enumRearCargoLights);
+ assertNotNull("REAR_TRUCK_BED_LIGHTS returned null", enumRearTruckBedLights);
+ assertNotNull("REAR_TRAILER_LIGHTS returned null", enumRearTrailerLights);
+ assertNotNull("LEFT_SPOT_LIGHTS returned null", enumLeftSpotLights);
+ assertNotNull("RIGHT_SPOT_LIGHTS returned null", enumRightSpotLights);
+ assertNotNull("LEFT_PUDDLE_LIGHTS returned null", enumLeftPuddleLights);
+ assertNotNull("RIGHT_PUDDLE_LIGHTS returned null", enumRightPuddleLights);
+
+ assertNotNull("AMBIENT_LIGHTS returned null", enumAmbientLights);
+ assertNotNull("OVERHEAD_LIGHTS returned null", enumOverheadLights);
+ assertNotNull("READING_LIGHTS returned null", enumReadingLights);
+ assertNotNull("TRUNK_LIGHTS returned null", enumTrunkLights);
+
+ assertNotNull("EXTERIOR_FRONT_LIGHTS returned null", enumExteriorFrontLights);
+ assertNotNull("EXTERIOR_REAR_LIGHTS returned null", enumExteriorRearLights);
+ assertNotNull("EXTERIOR_LEFT_LIGHTS returned null", enumExteriorLeftLights);
+ assertNotNull("EXTERIOR_RIGHT_LIGHTS returned null", enumExteriorRightLights);
+
+ assertNotNull("EXTERIOR_ALL_LIGHTS returned null", enumExteriorAllLights);
+ }
+
+ /**
+ * Verifies that an invalid assignment is null.
+ */
+ public void testInvalidEnum() {
+ String example = "fRONT_LEFT_HIGH_BEAM";
+ try {
+ LightName temp = LightName.valueForString(example);
+ assertNull("Result of valueForString should be null.", temp);
+ } catch (IllegalArgumentException exception) {
+ fail("Invalid enum throws IllegalArgumentException.");
+ }
+ }
+
+ /**
+ * Verifies that a null assignment is invalid.
+ */
+ public void testNullEnum() {
+ String example = null;
+ try {
+ LightName temp = LightName.valueForString(example);
+ assertNull("Result of valueForString should be null.", temp);
+ } catch (NullPointerException exception) {
+ fail("Null string throws NullPointerException.");
+ }
+ }
+
+ /**
+ * Verifies the possible enum values of LightName.
+ */
+ public void testListEnum() {
+ List<LightName> enumValueList = Arrays.asList(LightName.values());
+
+ List<LightName> enumTestList = new ArrayList<LightName>();
+ enumTestList.add(LightName.FRONT_LEFT_HIGH_BEAM);
+ enumTestList.add(LightName.FRONT_RIGHT_HIGH_BEAM);
+ enumTestList.add(LightName.FRONT_LEFT_LOW_BEAM);
+ enumTestList.add(LightName.FRONT_RIGHT_LOW_BEAM);
+ enumTestList.add(LightName.FRONT_LEFT_PARKING_LIGHT);
+ enumTestList.add(LightName.FRONT_RIGHT_PARKING_LIGHT);
+ enumTestList.add(LightName.FRONT_LEFT_FOG_LIGHT);
+ enumTestList.add(LightName.FRONT_RIGHT_FOG_LIGHT);
+ enumTestList.add(LightName.FRONT_LEFT_DAYTIME_RUNNING_LIGHT);
+ enumTestList.add(LightName.FRONT_RIGHT_DAYTIME_RUNNING_LIGHT);
+ enumTestList.add(LightName.FRONT_LEFT_TURN_LIGHT);
+ enumTestList.add(LightName.FRONT_RIGHT_TURN_LIGHT);
+ enumTestList.add(LightName.REAR_LEFT_FOG_LIGHT);
+ enumTestList.add(LightName.REAR_RIGHT_FOG_LIGHT);
+ enumTestList.add(LightName.REAR_LEFT_TAIL_LIGHT);
+ enumTestList.add(LightName.REAR_RIGHT_TAIL_LIGHT);
+ enumTestList.add(LightName.REAR_LEFT_BRAKE_LIGHT);
+ enumTestList.add(LightName.REAR_RIGHT_BRAKE_LIGHT);
+ enumTestList.add(LightName.REAR_LEFT_TURN_LIGHT);
+ enumTestList.add(LightName.REAR_RIGHT_TURN_LIGHT);
+ enumTestList.add(LightName.REAR_REGISTRATION_PLATE_LIGHT);
+ enumTestList.add(LightName.HIGH_BEAMS);
+ enumTestList.add(LightName.LOW_BEAMS);
+ enumTestList.add(LightName.FOG_LIGHTS);
+ enumTestList.add(LightName.RUNNING_LIGHTS);
+ enumTestList.add(LightName.PARKING_LIGHTS);
+ enumTestList.add(LightName.BRAKE_LIGHTS);
+ enumTestList.add(LightName.REAR_REVERSING_LIGHTS);
+ enumTestList.add(LightName.SIDE_MARKER_LIGHTS);
+ enumTestList.add(LightName.LEFT_TURN_LIGHTS);
+ enumTestList.add(LightName.RIGHT_TURN_LIGHTS);
+ enumTestList.add(LightName.HAZARD_LIGHTS);
+ enumTestList.add(LightName.REAR_CARGO_LIGHTS);
+ enumTestList.add(LightName.REAR_TRUCK_BED_LIGHTS);
+ enumTestList.add(LightName.REAR_TRAILER_LIGHTS);
+ enumTestList.add(LightName.LEFT_SPOT_LIGHTS);
+ enumTestList.add(LightName.RIGHT_SPOT_LIGHTS);
+ enumTestList.add(LightName.LEFT_PUDDLE_LIGHTS);
+ enumTestList.add(LightName.RIGHT_PUDDLE_LIGHTS);
+ enumTestList.add(LightName.AMBIENT_LIGHTS);
+ enumTestList.add(LightName.OVERHEAD_LIGHTS);
+ enumTestList.add(LightName.READING_LIGHTS);
+ enumTestList.add(LightName.TRUNK_LIGHTS);
+ enumTestList.add(LightName.EXTERIOR_FRONT_LIGHTS);
+ enumTestList.add(LightName.EXTERIOR_REAR_LIGHTS);
+ enumTestList.add(LightName.EXTERIOR_LEFT_LIGHTS);
+ enumTestList.add(LightName.EXTERIOR_RIGHT_LIGHTS);
+ enumTestList.add(LightName.EXTERIOR_ALL_LIGHTS);
+
+ assertTrue("Enum value list does not match enum class list",
+ enumValueList.containsAll(enumTestList) && enumTestList.containsAll(enumValueList));
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/LightStatusTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/LightStatusTests.java
new file mode 100644
index 000000000..a97cd6eba
--- /dev/null
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/LightStatusTests.java
@@ -0,0 +1,86 @@
+package com.smartdevicelink.test.rpc.enums;
+
+import com.smartdevicelink.proxy.rpc.enums.LightStatus;
+
+import junit.framework.TestCase;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.rpc.enums.LightStatus}
+ */
+public class LightStatusTests extends TestCase {
+
+ /**
+ * Verifies that the enum values are not null upon valid assignment.
+ */
+ public void testValidEnums() {
+ String example = "ON";
+ LightStatus enumOn = LightStatus.valueForString(example);
+ example = "OFF";
+ LightStatus enumOff = LightStatus.valueForString(example);
+ example = "RAMP_UP";
+ LightStatus enumRampUp = LightStatus.valueForString(example);
+ example = "RAMP_DOWN";
+ LightStatus enumRampDown = LightStatus.valueForString(example);
+ example = "UNKNOWN";
+ LightStatus enumUnknown = LightStatus.valueForString(example);
+ example = "INVALID";
+ LightStatus enumInvalid = LightStatus.valueForString(example);
+
+ assertNotNull("ON returned null", enumOn);
+ assertNotNull("OFF returned null", enumOff);
+ assertNotNull("RAMP_UP returned null", enumRampUp);
+ assertNotNull("RAMP_DOWN returned null", enumRampDown);
+ assertNotNull("UNKNOWN returned null", enumUnknown);
+ assertNotNull("INVALID returned null", enumInvalid);
+ }
+
+ /**
+ * Verifies that an invalid assignment is null.
+ */
+ public void testInvalidEnum() {
+ String example = "oN";
+ try {
+ LightStatus temp = LightStatus.valueForString(example);
+ assertNull("Result of valueForString should be null.", temp);
+ } catch (IllegalArgumentException exception) {
+ fail("Invalid enum throws IllegalArgumentException.");
+ }
+ }
+
+ /**
+ * Verifies that a null assignment is invalid.
+ */
+ public void testNullEnum() {
+ String example = null;
+ try {
+ LightStatus temp = LightStatus.valueForString(example);
+ assertNull("Result of valueForString should be null.", temp);
+ } catch (NullPointerException exception) {
+ fail("Null string throws NullPointerException.");
+ }
+ }
+
+ /**
+ * Verifies the possible enum values of LightStatus.
+ */
+ public void testListEnum() {
+ List<LightStatus> enumValueList = Arrays.asList(LightStatus.values());
+
+ List<LightStatus> enumTestList = new ArrayList<LightStatus>();
+ enumTestList.add(LightStatus.ON);
+ enumTestList.add(LightStatus.OFF);
+ enumTestList.add(LightStatus.RAMP_UP);
+ enumTestList.add(LightStatus.RAMP_DOWN);
+ enumTestList.add(LightStatus.UNKNOWN);
+ enumTestList.add(LightStatus.INVALID);
+
+ assertTrue("Enum value list does not match enum class list",
+ enumValueList.containsAll(enumTestList) && enumTestList.containsAll(enumValueList));
+ }
+} \ No newline at end of file
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/ModuleTypeTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/ModuleTypeTests.java
index 9af8b4867..65432873e 100644
--- a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/ModuleTypeTests.java
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/ModuleTypeTests.java
@@ -9,7 +9,7 @@ import java.util.Arrays;
import java.util.List;
/**
- * This is a unit test class for the SmartDeviceLink library project class :
+ * This is a unit test class for the SmartDeviceLink library project class :
* {@link com.smartdevicelink.rpc.enums.ModuleType}
*/
public class ModuleTypeTests extends TestCase {
@@ -17,44 +17,51 @@ public class ModuleTypeTests extends TestCase {
/**
* Verifies that the enum values are not null upon valid assignment.
*/
- public void testValidEnums () {
+ public void testValidEnums() {
String example = "CLIMATE";
ModuleType enumClimate = ModuleType.valueForString(example);
example = "RADIO";
ModuleType enumRadio = ModuleType.valueForString(example);
example = "SEAT";
ModuleType enumSeat = ModuleType.valueForString(example);
+ example = "AUDIO";
+ ModuleType enumAudio = ModuleType.valueForString(example);
+ example = "LIGHT";
+ ModuleType enumLight = ModuleType.valueForString(example);
+ example = "HMI_SETTINGS";
+ ModuleType enumHmiSettings = ModuleType.valueForString(example);
assertNotNull("CLIMATE returned null", enumClimate);
assertNotNull("RADIO returned null", enumRadio);
assertNotNull("SEAT returned null", enumSeat);
+ assertNotNull("AUDIO returned null", enumAudio);
+ assertNotNull("LIGHT returned null", enumLight);
+ assertNotNull("HMI_SETTINGS returned null", enumHmiSettings);
}
/**
* Verifies that an invalid assignment is null.
*/
- public void testInvalidEnum () {
+ public void testInvalidEnum() {
String example = "cLIMATE";
try {
ModuleType temp = ModuleType.valueForString(example);
- assertNull("Result of valueForString should be null.", temp);
- }
- catch (IllegalArgumentException exception) {
- fail("Invalid enum throws IllegalArgumentException.");
+ assertNull("Result of valueForString should be null.", temp);
+ } catch (IllegalArgumentException exception) {
+ fail("Invalid enum throws IllegalArgumentException.");
}
}
/**
* Verifies that a null assignment is invalid.
*/
- public void testNullEnum () {
+ public void testNullEnum() {
String example = null;
try {
ModuleType temp = ModuleType.valueForString(example);
- assertNull("Result of valueForString should be null.", temp);
- }
- catch (NullPointerException exception) {
- fail("Null string throws NullPointerException.");
+ assertNull("Result of valueForString should be null.", temp);
+ } catch (NullPointerException exception) {
+ fail("Null string throws NullPointerException.");
}
}
@@ -62,14 +69,17 @@ public class ModuleTypeTests extends TestCase {
* Verifies the possible enum values of ModuleType.
*/
public void testListEnum() {
- List<ModuleType> enumValueList = Arrays.asList(ModuleType.values());
+ List<ModuleType> enumValueList = Arrays.asList(ModuleType.values());
List<ModuleType> enumTestList = new ArrayList<ModuleType>();
enumTestList.add(ModuleType.CLIMATE);
enumTestList.add(ModuleType.RADIO);
enumTestList.add(ModuleType.SEAT);
+ enumTestList.add(ModuleType.AUDIO);
+ enumTestList.add(ModuleType.LIGHT);
+ enumTestList.add(ModuleType.HMI_SETTINGS);
- assertTrue("Enum value list does not match enum class list",
+ assertTrue("Enum value list does not match enum class list",
enumValueList.containsAll(enumTestList) && enumTestList.containsAll(enumValueList));
- }
+ }
} \ No newline at end of file
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/PrimaryAudioSourceTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/PrimaryAudioSourceTests.java
index 94c2e2b39..b3432985d 100644
--- a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/PrimaryAudioSourceTests.java
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/PrimaryAudioSourceTests.java
@@ -1,16 +1,16 @@
package com.smartdevicelink.test.rpc.enums;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
+import com.smartdevicelink.proxy.rpc.enums.PrimaryAudioSource;
import junit.framework.TestCase;
-import com.smartdevicelink.proxy.rpc.enums.PrimaryAudioSource;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
/**
- * This is a unit test class for the SmartDeviceLink library project class :
+ * This is a unit test class for the SmartDeviceLink library project class :
* {@link com.smartdevicelink.rpc.enums.PrimaryAudioSource}
*/
public class PrimaryAudioSourceTests extends TestCase {
@@ -18,7 +18,7 @@ public class PrimaryAudioSourceTests extends TestCase {
/**
* Verifies that the enum values are not null upon valid assignment.
*/
- public void testValidEnums () {
+ public void testValidEnums() {
String example = "NO_SOURCE_SELECTED";
PrimaryAudioSource enumNoSourceSelected = PrimaryAudioSource.valueForString(example);
example = "USB";
@@ -33,7 +33,17 @@ public class PrimaryAudioSourceTests extends TestCase {
PrimaryAudioSource enumIpod = PrimaryAudioSource.valueForString(example);
example = "MOBILE_APP";
PrimaryAudioSource enumMobileApp = PrimaryAudioSource.valueForString(example);
-
+ example = "CD";
+ PrimaryAudioSource enumCd = PrimaryAudioSource.valueForString(example);
+ example = "AM";
+ PrimaryAudioSource enumAm = PrimaryAudioSource.valueForString(example);
+ example = "FM";
+ PrimaryAudioSource enumFm = PrimaryAudioSource.valueForString(example);
+ example = "XM";
+ PrimaryAudioSource enumXm = PrimaryAudioSource.valueForString(example);
+ example = "DAB";
+ PrimaryAudioSource enumDab = PrimaryAudioSource.valueForString(example);
+
assertNotNull("NO_SOURCE_SELECTED returned null", enumNoSourceSelected);
assertNotNull("USB returned null", enumUsb);
assertNotNull("USB2 returned null", enumUsb2);
@@ -41,42 +51,45 @@ public class PrimaryAudioSourceTests extends TestCase {
assertNotNull("LINE_IN returned null", enumLineIn);
assertNotNull("IPOD returned null", enumIpod);
assertNotNull("MOBILE_APP returned null", enumMobileApp);
+ assertNotNull("CD returned null", enumCd);
+ assertNotNull("AM returned null", enumAm);
+ assertNotNull("FM returned null", enumFm);
+ assertNotNull("XM returned null", enumXm);
+ assertNotNull("DAB returned null", enumDab);
}
/**
* Verifies that an invalid assignment is null.
*/
- public void testInvalidEnum () {
+ public void testInvalidEnum() {
String example = "no_SouRCe_SelEcteD";
try {
- PrimaryAudioSource temp = PrimaryAudioSource.valueForString(example);
- assertNull("Result of valueForString should be null.", temp);
- }
- catch (IllegalArgumentException exception) {
- fail("Invalid enum throws IllegalArgumentException.");
+ PrimaryAudioSource temp = PrimaryAudioSource.valueForString(example);
+ assertNull("Result of valueForString should be null.", temp);
+ } catch (IllegalArgumentException exception) {
+ fail("Invalid enum throws IllegalArgumentException.");
}
}
/**
* Verifies that a null assignment is invalid.
*/
- public void testNullEnum () {
+ public void testNullEnum() {
String example = null;
try {
- PrimaryAudioSource temp = PrimaryAudioSource.valueForString(example);
- assertNull("Result of valueForString should be null.", temp);
- }
- catch (NullPointerException exception) {
- fail("Null string throws NullPointerException.");
+ PrimaryAudioSource temp = PrimaryAudioSource.valueForString(example);
+ assertNull("Result of valueForString should be null.", temp);
+ } catch (NullPointerException exception) {
+ fail("Null string throws NullPointerException.");
}
- }
-
+ }
+
/**
* Verifies the possible enum values of PrimaryAudioSource.
*/
public void testListEnum() {
- List<PrimaryAudioSource> enumValueList = Arrays.asList(PrimaryAudioSource.values());
+ List<PrimaryAudioSource> enumValueList = Arrays.asList(PrimaryAudioSource.values());
List<PrimaryAudioSource> enumTestList = new ArrayList<PrimaryAudioSource>();
enumTestList.add(PrimaryAudioSource.NO_SOURCE_SELECTED);
@@ -84,10 +97,15 @@ public class PrimaryAudioSourceTests extends TestCase {
enumTestList.add(PrimaryAudioSource.USB2);
enumTestList.add(PrimaryAudioSource.BLUETOOTH_STEREO_BTST);
enumTestList.add(PrimaryAudioSource.LINE_IN);
- enumTestList.add(PrimaryAudioSource.IPOD);
+ enumTestList.add(PrimaryAudioSource.IPOD);
enumTestList.add(PrimaryAudioSource.MOBILE_APP);
+ enumTestList.add(PrimaryAudioSource.CD);
+ enumTestList.add(PrimaryAudioSource.AM);
+ enumTestList.add(PrimaryAudioSource.FM);
+ enumTestList.add(PrimaryAudioSource.XM);
+ enumTestList.add(PrimaryAudioSource.DAB);
- assertTrue("Enum value list does not match enum class list",
+ assertTrue("Enum value list does not match enum class list",
enumValueList.containsAll(enumTestList) && enumTestList.containsAll(enumValueList));
- }
+ }
} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AudioControlCapabilities.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AudioControlCapabilities.java
new file mode 100644
index 000000000..ab1738739
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AudioControlCapabilities.java
@@ -0,0 +1,131 @@
+package com.smartdevicelink.proxy.rpc;
+
+import android.support.annotation.NonNull;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+import java.util.Hashtable;
+
+public class AudioControlCapabilities extends RPCStruct {
+ public static final String KEY_MODULE_NAME = "moduleName";
+ public static final String KEY_SOURCE_AVAILABLE = "sourceAvailable";
+ public static final String KEY_VOLUME_AVAILABLE = "volumeAvailable";
+ public static final String KEY_EQUALIZER_AVAILABLE = "equalizerAvailable";
+ public static final String KEY_EQUALIZER_MAX_CHANNEL_ID = "equalizerMaxChannelId";
+
+ /**
+ * Constructs a newly allocated AudioControlCapabilities object
+ */
+ public AudioControlCapabilities() {
+ }
+
+ /**
+ * Constructs a newly allocated AudioControlCapabilities object indicated by the Hashtable parameter
+ *
+ * @param hash The Hashtable to use
+ */
+ public AudioControlCapabilities(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Constructs a newly allocated AudioControlCapabilities object
+ *
+ * @param moduleName short friendly name of the light control module.
+ */
+ public AudioControlCapabilities(@NonNull String moduleName) {
+ this();
+ setModuleName(moduleName);
+ }
+
+ /**
+ * Sets the moduleName portion of the AudioControlCapabilities class
+ *
+ * @param moduleName The short friendly name of the light control module. It should not be used to identify a module by mobile application.
+ */
+ public void setModuleName(@NonNull String moduleName) {
+ setValue(KEY_MODULE_NAME, moduleName);
+ }
+
+ /**
+ * Gets the moduleName portion of the AudioControlCapabilities class
+ *
+ * @return String - The short friendly name of the light control module. It should not be used to identify a module by mobile application.
+ */
+ public String getModuleName() {
+ return getString(KEY_MODULE_NAME);
+ }
+
+ /**
+ * Sets the sourceAvailable portion of the AudioControlCapabilities class
+ *
+ * @param sourceAvailable Availability of the control of audio source.
+ */
+ public void setSourceAvailable(Boolean sourceAvailable) {
+ setValue(KEY_SOURCE_AVAILABLE, sourceAvailable);
+ }
+
+ /**
+ * Gets the sourceAvailable portion of the AudioControlCapabilities class
+ *
+ * @return Boolean - Availability of the control of audio source.
+ */
+ public Boolean getSourceAvailable() {
+ return getBoolean(KEY_SOURCE_AVAILABLE);
+ }
+
+ /**
+ * Sets the volumeAvailable portion of the AudioControlCapabilities class
+ *
+ * @param volumeAvailable Availability of the control of audio volume.
+ */
+ public void setVolumeAvailable(Boolean volumeAvailable) {
+ setValue(KEY_VOLUME_AVAILABLE, volumeAvailable);
+ }
+
+ /**
+ * Gets the volumeAvailable portion of the AudioControlCapabilities class
+ *
+ * @return Boolean - Availability of the control of audio volume.
+ */
+ public Boolean getVolumeAvailable() {
+ return getBoolean(KEY_VOLUME_AVAILABLE);
+ }
+
+ /**
+ * Sets the equalizerAvailable portion of the AudioControlCapabilities class
+ *
+ * @param equalizerAvailable Availability of the control of Equalizer Settings.
+ */
+ public void setEqualizerAvailable(Boolean equalizerAvailable) {
+ setValue(KEY_EQUALIZER_AVAILABLE, equalizerAvailable);
+ }
+
+ /**
+ * Gets the equalizerAvailable portion of the AudioControlCapabilities class
+ *
+ * @return Boolean - Availability of the control of Equalizer Settings.
+ */
+ public Boolean getEqualizerAvailable() {
+ return getBoolean(KEY_EQUALIZER_AVAILABLE);
+ }
+
+ /**
+ * Sets the equalizerMaxChannelId portion of the AudioControlCapabilities class
+ *
+ * @param equalizerMaxChannelId Must be included if equalizerAvailable=true, and assume all IDs starting from 1 to this value are valid.
+ */
+ public void setEqualizerMaxChannelId(Integer equalizerMaxChannelId) {
+ setValue(KEY_EQUALIZER_MAX_CHANNEL_ID, equalizerMaxChannelId);
+ }
+
+ /**
+ * Gets the equalizerMaxChannelId portion of the AudioControlCapabilities class
+ *
+ * @return Integer - Must be included if equalizerAvailable=true, and assume all IDs starting from 1 to this value are valid.
+ */
+ public Integer getEqualizerMaxChannelId() {
+ return getInteger(KEY_EQUALIZER_MAX_CHANNEL_ID);
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AudioControlData.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AudioControlData.java
new file mode 100644
index 000000000..9403fa9ab
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/AudioControlData.java
@@ -0,0 +1,113 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.PrimaryAudioSource;
+
+import java.util.Hashtable;
+import java.util.List;
+
+public class AudioControlData extends RPCStruct {
+ public static final String KEY_SOURCE = "source";
+ public static final String KEY_KEEP_CONTEXT = "keepContext";
+ public static final String KEY_VOLUME = "volume";
+ public static final String KEY_EQUALIZER_SETTINGS = "equalizerSettings";
+
+ /**
+ * Constructs a newly allocated AudioControlData object
+ */
+ public AudioControlData() {
+ }
+
+ /**
+ * Constructs a newly allocated AudioControlData object indicated by the Hashtable parameter
+ *
+ * @param hash The Hashtable to use
+ */
+ public AudioControlData(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets the source portion of the AudioControlData class
+ *
+ * @param source In a getter response or a notification, it is the current primary audio source of the system.
+ * In a setter request, it is the target audio source that the system shall switch to.
+ * If the value is MOBILE_APP, the system shall switch to the mobile media app that issues the setter RPC.
+ */
+ public void setSource(PrimaryAudioSource source) {
+ setValue(KEY_SOURCE, source);
+ }
+
+ /**
+ * Gets the source portion of the AudioControlData class
+ *
+ * @return PrimaryAudioSource - In a getter response or a notification, it is the current primary audio source of the system.
+ * In a setter request, it is the target audio source that the system shall switch to.
+ * If the value is MOBILE_APP, the system shall switch to the mobile media app that issues the setter RPC.
+ */
+ public PrimaryAudioSource getSource() {
+ return (PrimaryAudioSource) getObject(PrimaryAudioSource.class, KEY_SOURCE);
+ }
+
+ /**
+ * Sets the keepContext portion of the AudioControlData class
+ *
+ * @param keepContext This parameter shall not be present in any getter responses or notifications.
+ * This parameter is optional in a setter request. The default value is false.
+ * If it is true, the system not only changes the audio source but also brings the default infotainment system UI associated with the audio source to foreground and set the application to background.
+ * If it is false, the system changes the audio source, but keeps the current application's context.
+ */
+ public void setKeepContext(Boolean keepContext) {
+ setValue(KEY_KEEP_CONTEXT, keepContext);
+ }
+
+ /**
+ * Gets the keepContext portion of the AudioControlData class
+ *
+ * @return Boolean - This parameter shall not be present in any getter responses or notifications.
+ * This parameter is optional in a setter request. The default value is false.
+ * If it is true, the system not only changes the audio source but also brings the default infotainment system UI associated with the audio source to foreground and set the application to background.
+ * If it is false, the system changes the audio source, but keeps the current application's context.
+ */
+ public Boolean getKeepContext() {
+ return getBoolean(KEY_KEEP_CONTEXT);
+ }
+
+ /**
+ * Sets the volume portion of the AudioControlData class
+ *
+ * @param volume Reflects the volume of audio, from 0%-100%.
+ */
+ public void setVolume(Integer volume) {
+ setValue(KEY_VOLUME, volume);
+ }
+
+ /**
+ * Gets the volume portion of the AudioControlData class
+ *
+ * @return Integer - Reflects the volume of audio, from 0%-100%.
+ */
+ public Integer getVolume() {
+ return getInteger(KEY_VOLUME);
+ }
+
+ /**
+ * Gets the equalizerSettings portion of the AudioControlData class
+ *
+ * @return List<EqualizerSettings> - Defines the list of supported channels (band) and their current/desired settings on HMI.
+ */
+ @SuppressWarnings("unchecked")
+ public List<EqualizerSettings> getEqualizerSettings() {
+ return (List<EqualizerSettings>) getObject(EqualizerSettings.class, KEY_EQUALIZER_SETTINGS);
+ }
+
+ /**
+ * Sets the equalizerSettings portion of the AudioControlData class
+ *
+ * @param equalizerSettings Defines the list of supported channels (band) and their current/desired settings on HMI.
+ */
+ public void setEqualizerSettings(List<EqualizerSettings> equalizerSettings) {
+ setValue(KEY_EQUALIZER_SETTINGS, equalizerSettings);
+ }
+
+}
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
index 61a967585..335fffa48 100644
--- a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ClimateControlCapabilities.java
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ClimateControlCapabilities.java
@@ -25,6 +25,10 @@ public class ClimateControlCapabilities extends RPCStruct{
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 static final String KEY_HEATED_STEERING_WHEEL_AVAILABLE = "heatedSteeringWheelAvailable";
+ public static final String KEY_HEATED_WIND_SHIELD_AVAILABLE = "heatedWindshieldAvailable";
+ public static final String KEY_HEATED_REAR_WINDOW_AVAILABLE = "heatedRearWindowAvailable";
+ public static final String KEY_HEATED_MIRRORS_AVAILABLE = "heatedMirrorsAvailable";
public ClimateControlCapabilities() {
}
@@ -287,4 +291,84 @@ public class ClimateControlCapabilities extends RPCStruct{
public void setVentilationMode(List<VentilationMode> ventilationMode) {
setValue(KEY_VENTILATION_MODE, ventilationMode);
}
+
+ /**
+ * Sets the heatedSteeringWheelAvailable portion of the ClimateControlCapabilities class
+ *
+ * @param heatedSteeringWheelAvailable Availability of the control (enable/disable) of heated Steering Wheel.
+ * True: Available, False: Not Available, Not present: Not Available.
+ */
+ public void setHeatedSteeringWheelAvailable(Boolean heatedSteeringWheelAvailable) {
+ setValue(KEY_HEATED_STEERING_WHEEL_AVAILABLE, heatedSteeringWheelAvailable);
+ }
+
+ /**
+ * Gets the heatedSteeringWheelAvailable portion of the ClimateControlCapabilities class
+ *
+ * @return Boolean - Availability of the control (enable/disable) of heated Steering Wheel.
+ * True: Available, False: Not Available, Not present: Not Available.
+ */
+ public Boolean getHeatedSteeringWheelAvailable() {
+ return getBoolean(KEY_HEATED_STEERING_WHEEL_AVAILABLE);
+ }
+
+ /**
+ * Sets the heatedWindshieldAvailable portion of the ClimateControlCapabilities class
+ *
+ * @param heatedWindshieldAvailable Availability of the control (enable/disable) of heated Windshield.
+ * True: Available, False: Not Available, Not present: Not Available.
+ */
+ public void setHeatedWindshieldAvailable(Boolean heatedWindshieldAvailable) {
+ setValue(KEY_HEATED_WIND_SHIELD_AVAILABLE, heatedWindshieldAvailable);
+ }
+
+ /**
+ * Gets the heatedWindshieldAvailable portion of the ClimateControlCapabilities class
+ *
+ * @return Boolean - Availability of the control (enable/disable) of heated Windshield.
+ * True: Available, False: Not Available, Not present: Not Available.
+ */
+ public Boolean getHeatedWindshieldAvailable() {
+ return getBoolean(KEY_HEATED_WIND_SHIELD_AVAILABLE);
+ }
+
+ /**
+ * Sets the heatedRearWindowAvailable portion of the ClimateControlCapabilities class
+ *
+ * @param heatedRearWindowAvailable Availability of the control (enable/disable) of heated Rear Window.
+ * True: Available, False: Not Available, Not present: Not Available.
+ */
+ public void setHeatedRearWindowAvailable(Boolean heatedRearWindowAvailable) {
+ setValue(KEY_HEATED_REAR_WINDOW_AVAILABLE, heatedRearWindowAvailable);
+ }
+
+ /**
+ * Gets the heatedRearWindowAvailable portion of the ClimateControlCapabilities class
+ *
+ * @return Boolean - Availability of the control (enable/disable) of heated Rear Window.
+ * True: Available, False: Not Available, Not present: Not Available.
+ */
+ public Boolean getHeatedRearWindowAvailable() {
+ return getBoolean(KEY_HEATED_REAR_WINDOW_AVAILABLE);
+ }
+
+ /**
+ * Sets the heatedMirrorsAvailable portion of the ClimateControlCapabilities class
+ *
+ * @param heatedMirrorsAvailable Availability of the control (enable/disable) of heated Mirrors.
+ * True: Available, False: Not Available, Not present: Not Available.
+ */
+ public void setHeatedMirrorsAvailable(Boolean heatedMirrorsAvailable) {
+ setValue(KEY_HEATED_MIRRORS_AVAILABLE, heatedMirrorsAvailable);
+ }
+
+ /**
+ * Gets the heatedMirrorsAvailable portion of the ClimateControlCapabilities class
+ *
+ * @return Boolean - Availability of the control (enable/disable) of heated Mirrors.
+ * True: Available, False: Not Available, Not present: Not Available.
+ */
+ public Boolean getHeatedMirrorsAvailable() {
+ return getBoolean(KEY_HEATED_MIRRORS_AVAILABLE);
+ }
}
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
index 0da8060f3..1229e4668 100644
--- a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ClimateControlData.java
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ClimateControlData.java
@@ -3,6 +3,7 @@ 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{
@@ -16,6 +17,10 @@ public class ClimateControlData extends RPCStruct{
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 static final String KEY_HEATED_STEERING_WHEEL_ENABLE = "heatedSteeringWheelEnable";
+ public static final String KEY_HEATED_WIND_SHIELD_ENABLE = "heatedWindshieldEnable";
+ public static final String KEY_HEATED_REAR_WINDOW_ENABLE = "heatedRearWindowEnable";
+ public static final String KEY_HEATED_MIRRORS_ENABLE = "heatedMirrorsEnable";
public ClimateControlData() {
}
@@ -103,4 +108,76 @@ public class ClimateControlData extends RPCStruct{
public VentilationMode getVentilationMode() {
return (VentilationMode) getObject(VentilationMode.class, KEY_VENTILATION_MODE);
}
+
+ /**
+ * Sets the heatedSteeringWheelEnable portion of the ClimateControlCapabilities class
+ *
+ * @param heatedSteeringWheelEnable Value false means disabled/turn off, value true means enabled/turn on.
+ */
+ public void setHeatedSteeringWheelEnable(Boolean heatedSteeringWheelEnable) {
+ setValue(KEY_HEATED_STEERING_WHEEL_ENABLE, heatedSteeringWheelEnable);
+ }
+
+ /**
+ * Gets the heatedSteeringWheelEnable portion of the ClimateControlCapabilities class
+ *
+ * @return Boolean - Value false means disabled/turn off, value true means enabled/turn on.
+ */
+ public Boolean getHeatedSteeringWheelEnable() {
+ return getBoolean(KEY_HEATED_STEERING_WHEEL_ENABLE);
+ }
+
+ /**
+ * Sets the heatedWindshieldEnable portion of the ClimateControlCapabilities class
+ *
+ * @param heatedWindshieldEnable Value false means disabled, value true means enabled.
+ */
+ public void setHeatedWindshieldEnable(Boolean heatedWindshieldEnable) {
+ setValue(KEY_HEATED_WIND_SHIELD_ENABLE, heatedWindshieldEnable);
+ }
+
+ /**
+ * Gets the heatedWindshieldEnable portion of the ClimateControlCapabilities class
+ *
+ * @return Boolean - Value false means disabled, value true means enabled.
+ */
+ public Boolean getHeatedWindshieldEnable() {
+ return getBoolean(KEY_HEATED_WIND_SHIELD_ENABLE);
+ }
+
+ /**
+ * Sets the heatedRearWindowEnable portion of the ClimateControlCapabilities class
+ *
+ * @param heatedRearWindowEnable Value false means disabled, value true means enabled.
+ */
+ public void setHeatedRearWindowEnable(Boolean heatedRearWindowEnable) {
+ setValue(KEY_HEATED_REAR_WINDOW_ENABLE, heatedRearWindowEnable);
+ }
+
+ /**
+ * Gets the heatedRearWindowEnable portion of the ClimateControlCapabilities class
+ *
+ * @return Boolean - Value false means disabled, value true means enabled.
+ */
+ public Boolean getHeatedRearWindowEnable() {
+ return getBoolean(KEY_HEATED_REAR_WINDOW_ENABLE);
+ }
+
+ /**
+ * Sets the heatedMirrorsEnable portion of the ClimateControlCapabilities class
+ *
+ * @param heatedMirrorsEnable Value false means disabled, value true means enabled.
+ */
+ public void setHeatedMirrorsEnable(Boolean heatedMirrorsEnable) {
+ setValue(KEY_HEATED_MIRRORS_ENABLE, heatedMirrorsEnable);
+ }
+
+ /**
+ * Gets the heatedMirrorsEnable portion of the ClimateControlCapabilities class
+ *
+ * @return Boolean - Value false means disabled, value true means enabled.
+ */
+ public Boolean getHeatedMirrorsEnable() {
+ return getBoolean(KEY_HEATED_MIRRORS_ENABLE);
+ }
}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/EqualizerSettings.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/EqualizerSettings.java
new file mode 100644
index 000000000..78e76c808
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/EqualizerSettings.java
@@ -0,0 +1,97 @@
+package com.smartdevicelink.proxy.rpc;
+
+import android.support.annotation.NonNull;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+import java.util.Hashtable;
+
+/**
+ * Defines the each Equalizer channel settings.
+ */
+public class EqualizerSettings extends RPCStruct {
+ public static final String KEY_CHANNEL_ID = "channelId";
+ public static final String KEY_CHANNEL_NAME = "channelName";
+ public static final String KEY_CHANNEL_SETTING = "channelSetting";
+
+ /**
+ * Constructs a newly allocated EqualizerSettings object
+ */
+ public EqualizerSettings() {
+ }
+
+ /**
+ * Constructs a newly allocated EqualizerSettings object indicated by the Hashtable parameter
+ *
+ * @param hash The Hashtable to use
+ */
+ public EqualizerSettings(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Constructs a newly allocated EqualizerSettings object
+ *
+ * @param channelId Min: 0 Max: 100
+ * @param channelSetting Min: 0 Max: 100
+ */
+ public EqualizerSettings(@NonNull Integer channelId, @NonNull Integer channelSetting) {
+ this();
+ setChannelId(channelId);
+ setChannelSetting(channelSetting);
+ }
+
+ /**
+ * Sets the channelId portion of the EqualizerSettings class
+ *
+ * @param channelId
+ */
+ public void setChannelId(@NonNull Integer channelId) {
+ setValue(KEY_CHANNEL_ID, channelId);
+ }
+
+ /**
+ * Gets the channelId portion of the EqualizerSettings class
+ *
+ * @return Integer
+ */
+ public Integer getChannelId() {
+ return getInteger(KEY_CHANNEL_ID);
+ }
+
+ /**
+ * Sets the channelName portion of the EqualizerSettings class
+ *
+ * @param channelName Read-only channel / frequency name (e.i. "Treble, Midrange, Bass" or "125 Hz").
+ */
+ public void setChannelName(String channelName) {
+ setValue(KEY_CHANNEL_NAME, channelName);
+ }
+
+ /**
+ * Gets the channelName portion of the EqualizerSettings class
+ *
+ * @return String - Read-only channel / frequency name (e.i. "Treble, Midrange, Bass" or "125 Hz").
+ */
+ public String getChannelName() {
+ return getString(KEY_CHANNEL_NAME);
+ }
+
+ /**
+ * Sets the channelSetting portion of the EqualizerSettings class
+ *
+ * @param channelSetting Reflects the setting, from 0%-100%.
+ */
+ public void setChannelSetting(@NonNull Integer channelSetting) {
+ setValue(KEY_CHANNEL_SETTING, channelSetting);
+ }
+
+ /**
+ * Gets the channelSetting portion of the EqualizerSettings class
+ *
+ * @return Integer - Reflects the setting, from 0%-100%.
+ */
+ public Integer getChannelSetting() {
+ return getInteger(KEY_CHANNEL_SETTING);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GPSData.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GPSData.java
index 274e5c1be..ca264556f 100644
--- a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GPSData.java
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GPSData.java
@@ -79,21 +79,21 @@ import java.util.Hashtable;
* <tr>
* <td>pdop</td>
* <td>Integer</td>
- * <td>Positional Dilution of Precision<b>Minvalue: 0<b>Maxvalue: 31
+ * <td>Positional Dilution of Precision. If undefined or unavailable, then value shall be set to 0.<b>Minvalue: 0<b>Maxvalue: 1000
* </td>
* <td>SmartDeviceLink 2.0</td>
* </tr>
* <tr>
* <td>hdop</td>
* <td>Integer</td>
- * <td>Horizontal Dilution of Precision<b>Minvalue: 0<b>Maxvalue: 31
+ * <td>Horizontal Dilution of Precision. If value is unknown, value shall be set to 0.<b>Minvalue: 0<b>Maxvalue: 1000
* </td>
* <td>SmartDeviceLink 2.0</td>
* </tr>
* <tr>
* <td>vdop</td>
* <td>Integer</td>
- * <td>Vertical Dilution of Precision<b>Minvalue: 0<b>Maxvalue: 31
+ * <td>Vertical Dilution of Precision. If value is unknown, value shall be set to 0.<b>Minvalue: 0<b>Maxvalue: 1000
* </td>
* <td>SmartDeviceLink 2.0</td>
* </tr>
@@ -138,7 +138,7 @@ import java.util.Hashtable;
* <td>Integer</td>
* <td>The speed in KPH
* <b>Minvalue: 0
- * <b>Maxvalue: 400
+ * <b>Maxvalue: 500
* </td>
* <td>SmartDeviceLink 2.0</td>
* </tr>
@@ -169,7 +169,7 @@ public class GPSData extends RPCStruct {
* Constructs a newly allocated GPSData object
*/
public GPSData() { }
-
+
/**
* Constructs a newly allocated GPSData object indicated by the Hashtable parameter
* @param hash The Hashtable to use
@@ -180,7 +180,9 @@ public class GPSData extends RPCStruct {
/**
* Constructs a newly allocated GPSData object
+ * @deprecated Use {@link #GPSData(@NonNull Double, @NonNull Double)()} instead
*/
+ @Deprecated
public GPSData(@NonNull Double longitudeDegrees, @NonNull Double latitudeDegrees, @NonNull Integer utcYear,
@NonNull Integer utcMonth, @NonNull Integer utcDay, @NonNull Integer utcHours,
@NonNull Integer utcMinutes, @NonNull Integer utcSeconds, @NonNull CompassDirection compassDirection,
@@ -206,6 +208,15 @@ public class GPSData extends RPCStruct {
setHeading(heading);
setSpeed(speed);
}
+
+ /**
+ * Constructs a newly allocated GPSData object
+ */
+ public GPSData(@NonNull Double longitudeDegrees, @NonNull Double latitudeDegrees) {
+ this();
+ setLongitudeDegrees(longitudeDegrees);
+ setLatitudeDegrees(latitudeDegrees);
+ }
/**
* set longitude degrees
* @param longitudeDegrees
@@ -244,7 +255,7 @@ public class GPSData extends RPCStruct {
* set utc year
* @param utcYear utc year
*/
- public void setUtcYear(@NonNull Integer utcYear) {
+ public void setUtcYear(Integer utcYear) {
setValue(KEY_UTC_YEAR, utcYear);
}
@@ -260,7 +271,7 @@ public class GPSData extends RPCStruct {
* set utc month
* @param utcMonth utc month
*/
- public void setUtcMonth(@NonNull Integer utcMonth) {
+ public void setUtcMonth(Integer utcMonth) {
setValue(KEY_UTC_MONTH, utcMonth);
}
@@ -276,7 +287,7 @@ public class GPSData extends RPCStruct {
* set utc day
* @param utcDay utc day
*/
- public void setUtcDay(@NonNull Integer utcDay) {
+ public void setUtcDay(Integer utcDay) {
setValue(KEY_UTC_DAY, utcDay);
}
@@ -292,7 +303,7 @@ public class GPSData extends RPCStruct {
* set utc hours
* @param utcHours utc hours
*/
- public void setUtcHours(@NonNull Integer utcHours) {
+ public void setUtcHours(Integer utcHours) {
setValue(KEY_UTC_HOURS, utcHours);
}
@@ -308,7 +319,7 @@ public class GPSData extends RPCStruct {
* set utc minutes
* @param utcMinutes utc minutes
*/
- public void setUtcMinutes(@NonNull Integer utcMinutes) {
+ public void setUtcMinutes(Integer utcMinutes) {
setValue(KEY_UTC_MINUTES, utcMinutes);
}
@@ -324,7 +335,7 @@ public class GPSData extends RPCStruct {
* set utc seconds
* @param utcSeconds utc seconds
*/
- public void setUtcSeconds(@NonNull Integer utcSeconds) {
+ public void setUtcSeconds(Integer utcSeconds) {
setValue(KEY_UTC_SECONDS, utcSeconds);
}
@@ -335,7 +346,7 @@ public class GPSData extends RPCStruct {
public Integer getUtcSeconds() {
return getInteger(KEY_UTC_SECONDS);
}
- public void setCompassDirection(@NonNull CompassDirection compassDirection) {
+ public void setCompassDirection(CompassDirection compassDirection) {
setValue(KEY_COMPASS_DIRECTION, compassDirection);
}
public CompassDirection getCompassDirection() {
@@ -346,7 +357,7 @@ public class GPSData extends RPCStruct {
* set the positional dilution of precision
* @param pdop the positional dilution of precision
*/
- public void setPdop(@NonNull Double pdop) {
+ public void setPdop(Double pdop) {
setValue(KEY_PDOP, pdop);
}
@@ -362,7 +373,7 @@ public class GPSData extends RPCStruct {
* set the horizontal dilution of precision
* @param hdop the horizontal dilution of precision
*/
- public void setHdop(@NonNull Double hdop) {
+ public void setHdop(Double hdop) {
setValue(KEY_HDOP, hdop);
}
@@ -379,7 +390,7 @@ public class GPSData extends RPCStruct {
* set the vertical dilution of precision
* @param vdop the vertical dilution of precision
*/
- public void setVdop(@NonNull Double vdop) {
+ public void setVdop(Double vdop) {
setValue(KEY_VDOP, vdop);
}
@@ -396,7 +407,7 @@ public class GPSData extends RPCStruct {
* set what coordinates based on
* @param actual True, if coordinates are based on satellites.False, if based on dead reckoning
*/
- public void setActual(@NonNull Boolean actual) {
+ public void setActual(Boolean actual) {
setValue(KEY_ACTUAL, actual);
}
@@ -412,7 +423,7 @@ public class GPSData extends RPCStruct {
* set the number of satellites in view
* @param satellites the number of satellites in view
*/
- public void setSatellites(@NonNull Integer satellites) {
+ public void setSatellites(Integer satellites) {
setValue(KEY_SATELLITES, satellites);
}
@@ -423,7 +434,7 @@ public class GPSData extends RPCStruct {
public Integer getSatellites() {
return getInteger(KEY_SATELLITES);
}
- public void setDimension(@NonNull Dimension dimension) {
+ public void setDimension(Dimension dimension) {
setValue(KEY_DIMENSION, dimension);
}
public Dimension getDimension() {
@@ -434,7 +445,7 @@ public class GPSData extends RPCStruct {
* set altitude in meters
* @param altitude altitude in meters
*/
- public void setAltitude(@NonNull Double altitude) {
+ public void setAltitude(Double altitude) {
setValue(KEY_ALTITUDE, altitude);
}
@@ -451,7 +462,7 @@ public class GPSData extends RPCStruct {
* set the heading.North is 0, East is 90, etc.
* @param heading the heading.
*/
- public void setHeading(@NonNull Double heading) {
+ public void setHeading(Double heading) {
setValue(KEY_HEADING, heading);
}
@@ -467,7 +478,7 @@ public class GPSData extends RPCStruct {
* set speed in KPH
* @param speed the speed
*/
- public void setSpeed(@NonNull Double speed) {
+ public void setSpeed(Double speed) {
setValue(KEY_SPEED, speed);
}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HMISettingsControlCapabilities.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HMISettingsControlCapabilities.java
new file mode 100644
index 000000000..f5377b1b0
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HMISettingsControlCapabilities.java
@@ -0,0 +1,107 @@
+package com.smartdevicelink.proxy.rpc;
+
+import android.support.annotation.NonNull;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+import java.util.Hashtable;
+
+public class HMISettingsControlCapabilities extends RPCStruct {
+ public static final String KEY_MODULE_NAME = "moduleName";
+ public static final String KEY_DISTANCE_UNIT_AVAILABLE = "distanceUnitAvailable";
+ public static final String KEY_TEMPERATURE_UNIT_AVAILABLE = "temperatureUnitAvailable";
+ public static final String KEY_DISPLAY_MODE_UNIT_AVAILABLE = "displayModeUnitAvailable";
+
+ /**
+ * Constructs a new HMISettingsControlCapabilities object
+ */
+ public HMISettingsControlCapabilities() {
+ }
+
+ /**
+ * <p>Constructs a new HMISettingsControlCapabilities object indicated by the Hashtable parameter
+ * </p>
+ *
+ * @param hash The Hashtable to use
+ */
+ public HMISettingsControlCapabilities(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public HMISettingsControlCapabilities(@NonNull String moduleName) {
+ this();
+ setModuleName(moduleName);
+ }
+
+ /**
+ * Sets the moduleName portion of the HMISettingsControlCapabilities class
+ *
+ * @param moduleName The short friendly name of the hmi setting module. It should not be used to identify a module by mobile application.
+ */
+ public void setModuleName(@NonNull String moduleName) {
+ setValue(KEY_MODULE_NAME, moduleName);
+ }
+
+ /**
+ * Gets the moduleName portion of the HMISettingsControlCapabilities class
+ *
+ * @return String - The short friendly name of the hmi setting module. It should not be used to identify a module by mobile application.
+ */
+ public String getModuleName() {
+ return getString(KEY_MODULE_NAME);
+ }
+
+ /**
+ * Sets the distanceUnitAvailable portion of the HMISettingsControlCapabilities class
+ *
+ * @param distanceUnitAvailable Availability of the control of distance unit.
+ */
+ public void setDistanceUnitAvailable(Boolean distanceUnitAvailable) {
+ setValue(KEY_DISTANCE_UNIT_AVAILABLE, distanceUnitAvailable);
+ }
+
+ /**
+ * Gets the distanceUnitAvailable portion of the HMISettingsControlCapabilities class
+ *
+ * @return Boolean - Availability of the control of distance unit.
+ */
+ public Boolean getDistanceUnitAvailable() {
+ return getBoolean(KEY_DISTANCE_UNIT_AVAILABLE);
+ }
+
+ /**
+ * Sets the temperatureUnitAvailable portion of the HMISettingsControlCapabilities class
+ *
+ * @param temperatureUnitAvailable Availability of the control of temperature unit.
+ */
+ public void setTemperatureUnitAvailable(Boolean temperatureUnitAvailable) {
+ setValue(KEY_TEMPERATURE_UNIT_AVAILABLE, temperatureUnitAvailable);
+ }
+
+ /**
+ * Gets the temperatureUnitAvailable portion of the HMISettingsControlCapabilities class
+ *
+ * @return Boolean - Availability of the control of temperature unit.
+ */
+ public Boolean getTemperatureUnitAvailable() {
+ return getBoolean(KEY_TEMPERATURE_UNIT_AVAILABLE);
+ }
+
+ /**
+ * Sets the displayModeUnitAvailable portion of the HMISettingsControlCapabilities class
+ *
+ * @param displayModeUnitAvailable Availability of the control of HMI display mode.
+ */
+ public void setDisplayModeUnitAvailable(Boolean displayModeUnitAvailable) {
+ setValue(KEY_DISPLAY_MODE_UNIT_AVAILABLE, displayModeUnitAvailable);
+ }
+
+ /**
+ * Gets the displayModeUnitAvailable portion of the HMISettingsControlCapabilities class
+ *
+ * @return Boolean - Availability of the control of HMI display mode.
+ */
+ public Boolean getDisplayModeUnitAvailable() {
+ return getBoolean(KEY_DISPLAY_MODE_UNIT_AVAILABLE);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HMISettingsControlData.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HMISettingsControlData.java
new file mode 100644
index 000000000..e6dc4d301
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/HMISettingsControlData.java
@@ -0,0 +1,79 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.DisplayMode;
+import com.smartdevicelink.proxy.rpc.enums.DistanceUnit;
+import com.smartdevicelink.proxy.rpc.enums.TemperatureUnit;
+
+import java.util.Hashtable;
+
+/**
+ * Corresponds to "HMI_SETTINGS" ModuleType
+ */
+
+public class HMISettingsControlData extends RPCStruct {
+ public static final String KEY_DISPLAY_MODE = "displayMode";
+ public static final String KEY_TEMPERATURE_UNIT = "temperatureUnit";
+ public static final String KEY_DISTANCE_UNIT = "distanceUnit";
+
+ public HMISettingsControlData() {
+ }
+
+ public HMISettingsControlData(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets the displayMode portion of the HMISettingsControlData class
+ *
+ * @param displayMode
+ */
+ public void setDisplayMode(DisplayMode displayMode) {
+ setValue(KEY_DISPLAY_MODE, displayMode);
+ }
+
+ /**
+ * Gets the displayMode portion of the HMISettingsControlData class
+ *
+ * @return DisplayMode
+ */
+ public DisplayMode getDisplayMode() {
+ return (DisplayMode) getObject(DisplayMode.class, KEY_DISPLAY_MODE);
+ }
+
+ /**
+ * Sets the temperatureUnit portion of the HMISettingsControlData class
+ *
+ * @param temperatureUnit
+ */
+ public void setTemperatureUnit(TemperatureUnit temperatureUnit) {
+ setValue(KEY_TEMPERATURE_UNIT, temperatureUnit);
+ }
+
+ /**
+ * Gets the temperatureUnit portion of the HMISettingsControlData class
+ *
+ * @return TemperatureUnit
+ */
+ public TemperatureUnit getTemperatureUnit() {
+ return (TemperatureUnit) getObject(TemperatureUnit.class, KEY_TEMPERATURE_UNIT);
+ }
+
+ /**
+ * Sets the distanceUnit portion of the HMISettingsControlData class
+ *
+ * @param distanceUnit
+ */
+ public void setDistanceUnit(DistanceUnit distanceUnit) {
+ setValue(KEY_DISTANCE_UNIT, distanceUnit);
+ }
+
+ /**
+ * Gets the distanceUnit portion of the HMISettingsControlData class
+ *
+ * @return DistanceUnit
+ */
+ public DistanceUnit getDistanceUnit() {
+ return (DistanceUnit) getObject(DistanceUnit.class, KEY_DISTANCE_UNIT);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LightCapabilities.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LightCapabilities.java
new file mode 100644
index 000000000..b23c8356c
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LightCapabilities.java
@@ -0,0 +1,113 @@
+package com.smartdevicelink.proxy.rpc;
+
+import android.support.annotation.NonNull;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.LightName;
+
+import java.util.Hashtable;
+
+public class LightCapabilities extends RPCStruct {
+
+ public static final String KEY_NAME = "name";
+ public static final String KEY_DENSITY_AVAILABLE = "densityAvailable";
+ public static final String KEY_RGB_COLOR_SPACE_AVAILABLE = "rgbColorSpaceAvailable";
+ public static final String KEY_STATUS_AVAILABLE = "statusAvailable";
+
+ /**
+ * Constructs a newly allocated LightCapabilities object
+ */
+ public LightCapabilities() {
+ }
+
+ /**
+ * Constructs a newly allocated LightCapabilities object indicated by the Hashtable parameter
+ *
+ * @param hash The Hashtable to use
+ */
+ public LightCapabilities(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Constructs a newly allocated LightCapabilities object
+ *
+ * @param name name of Light
+ */
+ public LightCapabilities(@NonNull LightName name) {
+ this();
+ setName(name);
+ }
+
+ /**
+ * Sets the name portion of the LightCapabilities class
+ *
+ * @param name
+ */
+ public void setName(@NonNull LightName name) {
+ setValue(KEY_NAME, name);
+ }
+
+ /**
+ * Gets the name portion of the LightCapabilities class
+ *
+ * @return LightName
+ */
+ public LightName getName() {
+ return (LightName) getObject(LightName.class, KEY_NAME);
+ }
+
+ /**
+ * Sets the densityAvailable portion of the LightCapabilities class
+ *
+ * @param densityAvailable Indicates if the light's density can be set remotely (similar to a dimmer).
+ */
+ public void setDensityAvailable(Boolean densityAvailable) {
+ setValue(KEY_DENSITY_AVAILABLE, densityAvailable);
+ }
+
+ /**
+ * Gets the densityAvailable portion of the LightCapabilities class
+ *
+ * @return Boolean - Indicates if the light's density can be set remotely (similar to a dimmer).
+ */
+ public Boolean getDensityAvailable() {
+ return getBoolean(KEY_DENSITY_AVAILABLE);
+ }
+
+ /**
+ * Sets the RGBColorSpaceAvailable portion of the LightCapabilities class
+ *
+ * @param RGBColorSpaceAvailable Indicates if the light's color can be set remotely by using the RGB color space.
+ */
+ public void setRGBColorSpaceAvailable(Boolean RGBColorSpaceAvailable) {
+ setValue(KEY_RGB_COLOR_SPACE_AVAILABLE, RGBColorSpaceAvailable);
+ }
+
+ /**
+ * Gets the RGBColorSpaceAvailable portion of the LightCapabilities class
+ *
+ * @return Boolean - Indicates if the light's color can be set remotely by using the RGB color space.
+ */
+ public Boolean getRGBColorSpaceAvailable() {
+ return getBoolean(KEY_RGB_COLOR_SPACE_AVAILABLE);
+ }
+
+ /**
+ * Sets the statusAvailable portion of the LightCapabilities class
+ *
+ * @param statusAvailable Indicates if the status (ON/OFF) can be set remotely. App shall not use read-only values (RAMP_UP/RAMP_DOWN/UNKNOWN/INVALID) in a setInteriorVehicleData request.
+ */
+ public void setStatusAvailable(Boolean statusAvailable) {
+ setValue(KEY_STATUS_AVAILABLE, statusAvailable);
+ }
+
+ /**
+ * Gets the statusAvailable portion of the LightCapabilities class
+ *
+ * @return Boolean - Indicates if the status (ON/OFF) can be set remotely. App shall not use read-only values (RAMP_UP/RAMP_DOWN/UNKNOWN/INVALID) in a setInteriorVehicleData request.
+ */
+ public Boolean getStatusAvailable() {
+ return getBoolean(KEY_STATUS_AVAILABLE);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LightControlCapabilities.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LightControlCapabilities.java
new file mode 100644
index 000000000..ab84da275
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LightControlCapabilities.java
@@ -0,0 +1,78 @@
+package com.smartdevicelink.proxy.rpc;
+
+import android.support.annotation.NonNull;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+import java.util.Hashtable;
+import java.util.List;
+
+public class LightControlCapabilities extends RPCStruct {
+ public static final String KEY_MODULE_NAME = "moduleName";
+ public static final String KEY_SUPPORTED_LIGHTS = "supportedLights";
+
+ /**
+ * Constructs a new LightControlCapabilities object
+ */
+ public LightControlCapabilities() {
+ }
+
+ /**
+ * <p>Constructs a new LightControlCapabilities object indicated by the Hashtable parameter
+ * </p>
+ *
+ * @param hash The Hashtable to use
+ */
+ public LightControlCapabilities(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Constructs a newly allocated LightControlCapabilities object
+ *
+ * @param moduleName short friendly name of the light control module.
+ * @param supportedLights An array of available LightCapabilities that are controllable.
+ */
+ public LightControlCapabilities(@NonNull String moduleName, @NonNull List<LightCapabilities> supportedLights) {
+ this();
+ setModuleName(moduleName);
+ setSupportedLights(supportedLights);
+ }
+
+ /**
+ * Sets the moduleName portion of the LightControlCapabilities class
+ *
+ * @param moduleName The short friendly name of the light control module. It should not be used to identify a module by mobile application.
+ */
+ public void setModuleName(@NonNull String moduleName) {
+ setValue(KEY_MODULE_NAME, moduleName);
+ }
+
+ /**
+ * Gets the moduleName portion of the LightControlCapabilities class
+ *
+ * @return String - The short friendly name of the light control module. It should not be used to identify a module by mobile application.
+ */
+ public String getModuleName() {
+ return getString(KEY_MODULE_NAME);
+ }
+
+ /**
+ * Gets the supportedLights portion of the LightControlCapabilities class
+ *
+ * @return List<LightCapabilities> - An array of available LightCapabilities that are controllable.
+ */
+ @SuppressWarnings("unchecked")
+ public List<LightCapabilities> getSupportedLights() {
+ return (List<LightCapabilities>) getObject(LightCapabilities.class, KEY_SUPPORTED_LIGHTS);
+ }
+
+ /**
+ * Sets the supportedLights portion of the LightControlCapabilities class
+ *
+ * @param supportedLights An array of available LightCapabilities that are controllable.
+ */
+ public void setSupportedLights(@NonNull List<LightCapabilities> supportedLights) {
+ setValue(KEY_SUPPORTED_LIGHTS, supportedLights);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LightControlData.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LightControlData.java
new file mode 100644
index 000000000..a78b979c5
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LightControlData.java
@@ -0,0 +1,58 @@
+package com.smartdevicelink.proxy.rpc;
+
+import android.support.annotation.NonNull;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+import java.util.Hashtable;
+import java.util.List;
+
+public class LightControlData extends RPCStruct {
+ public static final String KEY_LIGHT_STATE = "lightState";
+
+ /**
+ * Constructs a new LightControlData object
+ */
+ public LightControlData() {
+ }
+
+ /**
+ * <p>Constructs a new LightControlData object indicated by the Hashtable parameter
+ * </p>
+ *
+ * @param hash The Hashtable to use
+ */
+ public LightControlData(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Constructs a newly allocated LightControlData object
+ *
+ * @param lightState An array of LightNames and their current or desired status.
+ * Status of the LightNames that are not listed in the array shall remain unchanged.
+ */
+ public LightControlData(@NonNull List<LightState> lightState) {
+ this();
+ setLightState(lightState);
+ }
+
+ /**
+ * Gets the lightState portion of the LightControlData class
+ *
+ * @return List<LightState> - An array of LightNames and their current or desired status. Status of the LightNames that are not listed in the array shall remain unchanged.
+ */
+ @SuppressWarnings("unchecked")
+ public List<LightState> getLightState() {
+ return (List<LightState>) getObject(LightState.class, KEY_LIGHT_STATE);
+ }
+
+ /**
+ * Sets the lightState portion of the LightControlData class
+ *
+ * @param lightState An array of LightNames and their current or desired status. Status of the LightNames that are not listed in the array shall remain unchanged.
+ */
+ public void setLightState(@NonNull List<LightState> lightState) {
+ setValue(KEY_LIGHT_STATE, lightState);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LightState.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LightState.java
new file mode 100644
index 000000000..90315f785
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/LightState.java
@@ -0,0 +1,119 @@
+package com.smartdevicelink.proxy.rpc;
+
+import android.support.annotation.NonNull;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.LightName;
+import com.smartdevicelink.proxy.rpc.enums.LightStatus;
+import com.smartdevicelink.util.SdlDataTypeConverter;
+
+import java.util.Hashtable;
+
+public class LightState extends RPCStruct {
+ public static final String KEY_ID = "id";
+ public static final String KEY_STATUS = "status";
+ public static final String KEY_DENSITY = "density";
+ public static final String KEY_COLOR = "color";
+
+ /**
+ * Constructs a new LightState object
+ */
+ public LightState() {
+ }
+
+ /**
+ * <p>Constructs a new LightState object indicated by the Hashtable parameter
+ * </p>
+ *
+ * @param hash The Hashtable to use
+ */
+ public LightState(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Constructs a newly allocated LightState object
+ *
+ * @param id The name of a light or a group of lights.
+ * @param status Status of Light.
+ */
+ public LightState(@NonNull LightName id, @NonNull LightStatus status) {
+ this();
+ setId(id);
+ setStatus(status);
+ }
+
+ /**
+ * Sets the id portion of the LightState class
+ *
+ * @param id The name of a light or a group of lights.
+ */
+ public void setId(@NonNull LightName id) {
+ setValue(KEY_ID, id);
+ }
+
+ /**
+ * Gets the id portion of the LightState class
+ *
+ * @return LightName - The name of a light or a group of lights.
+ */
+ public LightName getId() {
+ return (LightName) getObject(LightName.class, KEY_ID);
+ }
+
+ /**
+ * Sets the status portion of the LightState class
+ *
+ * @param status
+ */
+ public void setStatus(@NonNull LightStatus status) {
+ setValue(KEY_STATUS, status);
+ }
+
+ /**
+ * Gets the status portion of the LightState class
+ *
+ * @return LightStatus
+ */
+ public LightStatus getStatus() {
+ return (LightStatus) getObject(LightStatus.class, KEY_STATUS);
+ }
+
+ /**
+ * Gets the density portion of the LightState class
+ *
+ * @return Float
+ */
+ public Float getDensity() {
+ Object value = getValue(KEY_DENSITY);
+ return SdlDataTypeConverter.objectToFloat(value);
+ }
+
+ /**
+ * Sets the density portion of the LightState class
+ *
+ * @param density
+ */
+ public void setDensity(Float density) {
+ setValue(KEY_DENSITY, density);
+ }
+
+ /**
+ * Gets the color portion of the LightState class
+ *
+ * @return RGBColor
+ */
+ @SuppressWarnings("unchecked")
+ public RGBColor getColor() {
+ return (RGBColor) getObject(RGBColor.class, KEY_COLOR);
+ }
+
+ /**
+ * Sets the color portion of the LightState class
+ *
+ * @param color
+ */
+ public void setColor(RGBColor color) {
+ setValue(KEY_COLOR, color);
+ }
+}
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
index b21c60be2..85a24c064 100644
--- a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ModuleData.java
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/ModuleData.java
@@ -12,6 +12,9 @@ public class ModuleData extends RPCStruct {
public static final String KEY_RADIO_CONTROL_DATA = "radioControlData";
public static final String KEY_CLIMATE_CONTROL_DATA = "climateControlData";
public static final String KEY_SEAT_CONTROL_DATA = "seatControlData";
+ public static final String KEY_AUDIO_CONTROL_DATA = "audioControlData";
+ public static final String KEY_LIGHT_CONTROL_DATA = "lightControlData";
+ public static final String KEY_HMI_SETTINGS_CONTROL_DATA = "hmiSettingsControlData";
public ModuleData() {
}
@@ -98,4 +101,58 @@ public class ModuleData extends RPCStruct {
public SeatControlData getSeatControlData() {
return (SeatControlData) getObject(SeatControlData.class, KEY_SEAT_CONTROL_DATA);
}
+
+ /**
+ * Sets the audioControlData portion of the ModuleData class
+ *
+ * @param audioControlData
+ */
+ public void setAudioControlData(AudioControlData audioControlData) {
+ setValue(KEY_AUDIO_CONTROL_DATA, audioControlData);
+ }
+
+ /**
+ * Gets the audioControlData portion of the ModuleData class
+ *
+ * @return AudioControlData
+ */
+ public AudioControlData getAudioControlData() {
+ return (AudioControlData) getObject(AudioControlData.class, KEY_AUDIO_CONTROL_DATA);
+ }
+
+ /**
+ * Sets the lightControlData portion of the ModuleData class
+ *
+ * @param lightControlData
+ */
+ public void setLightControlData(LightControlData lightControlData) {
+ setValue(KEY_LIGHT_CONTROL_DATA, lightControlData);
+ }
+
+ /**
+ * Gets the lightControlData portion of the ModuleData class
+ *
+ * @return LightControlData
+ */
+ public LightControlData getLightControlData() {
+ return (LightControlData) getObject(LightControlData.class, KEY_LIGHT_CONTROL_DATA);
+ }
+
+ /**
+ * Sets the hmiSettingsControlData portion of the ModuleData class
+ *
+ * @param hmiSettingsControlData
+ */
+ public void setHmiSettingsControlData(HMISettingsControlData hmiSettingsControlData) {
+ setValue(KEY_HMI_SETTINGS_CONTROL_DATA, hmiSettingsControlData);
+ }
+
+ /**
+ * Gets the hmiSettingsControlData portion of the ModuleData class
+ *
+ * @return HMISettingsControlData
+ */
+ public HMISettingsControlData getHmiSettingsControlData() {
+ return (HMISettingsControlData) getObject(HMISettingsControlData.class, KEY_HMI_SETTINGS_CONTROL_DATA);
+ }
}
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
index 1eee9a17a..0438d08cb 100644
--- a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlCapabilities.java
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlCapabilities.java
@@ -19,6 +19,7 @@ public class RadioControlCapabilities extends RPCStruct{
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 static final String KEY_SIS_DATA_AVAILABLE = "sisDataAvailable";
public RadioControlCapabilities() {
}
@@ -245,4 +246,24 @@ public class RadioControlCapabilities extends RPCStruct{
public Boolean getSignalChangeThresholdAvailable() {
return getBoolean(KEY_SIGNAL_CHANGE_THRESHOLD_AVAILABLE);
}
+
+ /**
+ * Sets the sisDataAvailable portion of the RadioControlCapabilities class
+ *
+ * @param sisDataAvailable Availability of the getting HD radio Station Information Service (SIS) data.
+ * True: Available, False: Not Available, Not present: Not Available.
+ */
+ public void setSisDataAvailable(Boolean sisDataAvailable) {
+ setValue(KEY_SIS_DATA_AVAILABLE, sisDataAvailable);
+ }
+
+ /**
+ * Gets the sisDataAvailable portion of the RadioControlCapabilities class
+ *
+ * @return Boolean - Availability of the getting HD radio Station Information Service (SIS) data.
+ * True: Available, False: Not Available, Not present: Not Available.
+ */
+ public Boolean getSisDataAvailable() {
+ return getBoolean(KEY_SIS_DATA_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
index 4744399ac..6a34d27aa 100644
--- a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlData.java
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlData.java
@@ -20,6 +20,7 @@ public class RadioControlData extends RPCStruct{
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 static final String KEY_SIS_DATA = "sisData";
public RadioControlData() {
}
@@ -220,4 +221,22 @@ public class RadioControlData extends RPCStruct{
public RadioState getState() {
return (RadioState) getObject(RadioState.class, KEY_STATE);
}
+
+ /**
+ * Sets the sisData portion of the RadioControlData class
+ *
+ * @param sisData Read-only Station Information Service (SIS) data provides basic information about the station such as call sign, as well as information not displayable to the consumer such as the station identification number.
+ */
+ public void setSisData(SisData sisData) {
+ setValue(KEY_SIS_DATA, sisData);
+ }
+
+ /**
+ * Gets the sisData portion of the RadioControlData class
+ *
+ * @return SisData - Read-only Station Information Service (SIS) data provides basic information about the station such as call sign, as well as information not displayable to the consumer such as the station identification number.
+ */
+ public SisData getSisData() {
+ return (SisData) getObject(SisData.class, KEY_SIS_DATA);
+ }
}
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
index 8a2106f6e..4c9861101 100644
--- a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RemoteControlCapabilities.java
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/RemoteControlCapabilities.java
@@ -10,6 +10,9 @@ public class RemoteControlCapabilities extends RPCStruct {
public static final String KEY_RADIO_CONTROL_CAPABILITIES = "radioControlCapabilities";
public static final String KEY_BUTTON_CAPABILITIES = "buttonCapabilities";
public static final String KEY_SEAT_CONTROL_CAPABILITIES = "seatControlCapabilities";
+ public static final String KEY_AUDIO_CONTROL_CAPABILITIES = "audioControlCapabilities";
+ public static final String KEY_HMI_SETTINGS_CONTROL_CAPABILITIES = "hmiSettingsControlCapabilities";
+ public static final String KEY_LIGHT_CONTROL_CAPABILITIES = "lightControlCapabilities";
public RemoteControlCapabilities() {
}
@@ -97,4 +100,59 @@ public class RemoteControlCapabilities extends RPCStruct {
public List<SeatControlCapabilities> getSeatControlCapabilities() {
return (List<SeatControlCapabilities>) getObject(SeatControlCapabilities.class, KEY_SEAT_CONTROL_CAPABILITIES);
}
+
+ /**
+ * Sets the audioControlCapabilities portion of the RemoteControlCapabilities class
+ *
+ * @param audioControlCapabilities If included, the platform supports audio controls.
+ */
+ public void setAudioControlCapabilities(List<AudioControlCapabilities> audioControlCapabilities) {
+ setValue(KEY_AUDIO_CONTROL_CAPABILITIES, audioControlCapabilities);
+ }
+
+ /**
+ * Gets the audioControlCapabilities portion of the RemoteControlCapabilities class
+ *
+ * @return List<AudioControlCapabilities>
+ * If included, the platform supports audio controls.
+ */
+ public List<AudioControlCapabilities> getAudioControlCapabilities() {
+ return (List<AudioControlCapabilities>) getObject(AudioControlCapabilities.class, KEY_AUDIO_CONTROL_CAPABILITIES);
+ }
+
+ /**
+ * Sets the hmiSettingsControlCapabilities portion of the RemoteControlCapabilities class
+ *
+ * @param hmiSettingsControlCapabilities If included, the platform supports hmi setting controls.
+ */
+ public void setHmiSettingsControlCapabilities(HMISettingsControlCapabilities hmiSettingsControlCapabilities) {
+ setValue(KEY_HMI_SETTINGS_CONTROL_CAPABILITIES, hmiSettingsControlCapabilities);
+ }
+
+ /**
+ * Gets the hmiSettingsControlCapabilities portion of the RemoteControlCapabilities class
+ *
+ * @return HMISettingsControlCapabilities - If included, the platform supports hmi setting controls.
+ */
+ public HMISettingsControlCapabilities getHmiSettingsControlCapabilities() {
+ return (HMISettingsControlCapabilities) getObject(HMISettingsControlCapabilities.class, KEY_HMI_SETTINGS_CONTROL_CAPABILITIES);
+ }
+
+ /**
+ * Sets the lightControlCapabilities portion of the RemoteControlCapabilities class
+ *
+ * @param lightControlCapabilities If included, the platform supports light controls.
+ */
+ public void setLightControlCapabilities(LightControlCapabilities lightControlCapabilities) {
+ setValue(KEY_LIGHT_CONTROL_CAPABILITIES, lightControlCapabilities);
+ }
+
+ /**
+ * Gets the lightControlCapabilities portion of the RemoteControlCapabilities class
+ *
+ * @return LightControlCapabilities - If included, the platform supports light controls.
+ */
+ public LightControlCapabilities getLightControlCapabilities() {
+ return (LightControlCapabilities) getObject(LightControlCapabilities.class, KEY_LIGHT_CONTROL_CAPABILITIES);
+ }
}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SisData.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SisData.java
new file mode 100644
index 000000000..13b30e37d
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SisData.java
@@ -0,0 +1,123 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+import java.util.Hashtable;
+
+public class SisData extends RPCStruct {
+ public static final String KEY_STATION_SHORT_NAME = "stationShortName";
+ public static final String KEY_STATION_ID_NUMBER = "stationIDNumber";
+ public static final String KEY_STATION_LONG_NAME = "stationLongName";
+ public static final String KEY_STATION_LOCATION = "stationLocation";
+ public static final String KEY_STATION_MESSAGE = "stationMessage";
+
+ /**
+ * Constructs a new SisData object
+ */
+ public SisData() {
+ }
+
+ /**
+ * <p>Constructs a new SisData object indicated by the Hashtable parameter
+ * </p>
+ *
+ * @param hash The Hashtable to use
+ */
+ public SisData(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets the stationShortName portion of the SisData class
+ *
+ * @param stationShortName Identifies the 4-alpha-character station call sign plus an optional (-FM) extension.
+ */
+ public void setStationShortName(String stationShortName) {
+ setValue(KEY_STATION_SHORT_NAME, stationShortName);
+ }
+
+ /**
+ * Gets the stationShortName portion of the SisData class
+ *
+ * @return String - Identifies the 4-alpha-character station call sign plus an optional (-FM) extension.
+ */
+ public String getStationShortName() {
+ return getString(KEY_STATION_SHORT_NAME);
+ }
+
+ /**
+ * Sets the stationIDNumber portion of the SisData class
+ *
+ * @param stationIDNumber
+ */
+ public void setStationIDNumber(StationIDNumber stationIDNumber) {
+ setValue(KEY_STATION_ID_NUMBER, stationIDNumber);
+ }
+
+ /**
+ * Gets the stationIDNumber portion of the SisData class
+ *
+ * @return StationIDNumber.
+ */
+ @SuppressWarnings("unchecked")
+ public StationIDNumber getStationIDNumber() {
+ return (StationIDNumber) getObject(StationIDNumber.class, KEY_STATION_ID_NUMBER);
+ }
+
+ /**
+ * Sets the stationLongName portion of the SisData class
+ *
+ * @param stationLongName Identifies the station call sign or other identifying information in the long format.
+ */
+ public void setStationLongName(String stationLongName) {
+ setValue(KEY_STATION_LONG_NAME, stationLongName);
+ }
+
+ /**
+ * Gets the stationLongName portion of the SisData class
+ *
+ * @return String - Identifies the station call sign or other identifying information in the long format.
+ */
+ public String getStationLongName() {
+ return getString(KEY_STATION_LONG_NAME);
+ }
+
+ /**
+ * Sets the stationLocation portion of the SisData class
+ *
+ * @param stationLocation Provides the 3-dimensional geographic station location.
+ */
+ public void setStationLocation(GPSData stationLocation) {
+ setValue(KEY_STATION_LOCATION, stationLocation);
+ }
+
+ /**
+ * Gets the stationLocation portion of the SisData class
+ *
+ * @return GPSData - Provides the 3-dimensional geographic station location.
+ */
+ @SuppressWarnings("unchecked")
+ public GPSData getStationLocation() {
+ return (GPSData) getObject(GPSData.class, KEY_STATION_LOCATION);
+ }
+
+ /**
+ * Sets the stationMessage portion of the SisData class
+ *
+ * @param stationMessage May be used to convey textual information of general interest to the consumer such as weather forecasts or public service announcements.
+ * Includes a high priority delivery feature to convey emergencies that may be in the listening area.
+ */
+ public void setStationMessage(String stationMessage) {
+ setValue(KEY_STATION_MESSAGE, stationMessage);
+ }
+
+ /**
+ * Gets the stationMessage portion of the SisData class
+ *
+ * @return String - May be used to convey textual information of general interest to the consumer such as weather forecasts or public service announcements.
+ * Includes a high priority delivery feature to convey emergencies that may be in the listening area.
+ */
+ public String getStationMessage() {
+ return getString(KEY_STATION_MESSAGE);
+ }
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/StationIDNumber.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/StationIDNumber.java
new file mode 100644
index 000000000..a8e926a2b
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/StationIDNumber.java
@@ -0,0 +1,54 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+import java.util.Hashtable;
+
+public class StationIDNumber extends RPCStruct {
+ public static final String KEY_COUNTRY_CODE = "countryCode";
+ public static final String KEY_FCC_FACILITY_ID = "fccFacilityId";
+
+ public StationIDNumber() {
+ }
+
+ public StationIDNumber(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets the countryCode portion of the StationIDNumber class
+ *
+ * @param countryCode Binary Representation of ITU Country Code. USA Code is 001.
+ */
+ public void setCountryCode(Integer countryCode) {
+ setValue(KEY_COUNTRY_CODE, countryCode);
+ }
+
+ /**
+ * Gets the countryCode portion of the StationIDNumber class
+ *
+ * @return Integer - Binary Representation of ITU Country Code. USA Code is 001.
+ */
+ public Integer getCountryCode() {
+ return getInteger(KEY_COUNTRY_CODE);
+ }
+
+ /**
+ * Sets the fccFacilityId portion of the StationIDNumber class
+ *
+ * @param fccFacilityId Binary representation of unique facility ID assigned by the FCC; FCC controlled for U.S. territory.
+ */
+ public void setFccFacilityId(Integer fccFacilityId) {
+ setValue(KEY_FCC_FACILITY_ID, fccFacilityId);
+ }
+
+ /**
+ * Gets the fccFacilityId portion of the StationIDNumber class
+ *
+ * @return Integer - Binary representation of unique facility ID assigned by the FCC; FCC controlled for U.S. territory.
+ */
+ public Integer getFccFacilityId() {
+ return getInteger(KEY_FCC_FACILITY_ID);
+ }
+
+}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DisplayMode.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DisplayMode.java
new file mode 100644
index 000000000..5a0c0c7e4
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DisplayMode.java
@@ -0,0 +1,16 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+public enum DisplayMode {
+ DAY,
+ NIGHT,
+ AUTO,
+ ;
+
+ public static DisplayMode 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/DistanceUnit.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DistanceUnit.java
new file mode 100644
index 000000000..36e103bf3
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/DistanceUnit.java
@@ -0,0 +1,15 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+public enum DistanceUnit {
+ MILES,
+ KILOMETERS,
+ ;
+
+ public static DistanceUnit 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/LightName.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/LightName.java
new file mode 100644
index 000000000..c3812f2da
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/LightName.java
@@ -0,0 +1,134 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+public enum LightName {
+ /*Common Single Light*/
+ FRONT_LEFT_HIGH_BEAM,
+ FRONT_RIGHT_HIGH_BEAM,
+ FRONT_LEFT_LOW_BEAM,
+ FRONT_RIGHT_LOW_BEAM,
+ FRONT_LEFT_PARKING_LIGHT,
+ FRONT_RIGHT_PARKING_LIGHT,
+ FRONT_LEFT_FOG_LIGHT,
+ FRONT_RIGHT_FOG_LIGHT,
+ FRONT_LEFT_DAYTIME_RUNNING_LIGHT,
+ FRONT_RIGHT_DAYTIME_RUNNING_LIGHT,
+ FRONT_LEFT_TURN_LIGHT,
+ FRONT_RIGHT_TURN_LIGHT,
+ REAR_LEFT_FOG_LIGHT,
+ REAR_RIGHT_FOG_LIGHT,
+ REAR_LEFT_TAIL_LIGHT,
+ REAR_RIGHT_TAIL_LIGHT,
+ REAR_LEFT_BRAKE_LIGHT,
+ REAR_RIGHT_BRAKE_LIGHT,
+ REAR_LEFT_TURN_LIGHT,
+ REAR_RIGHT_TURN_LIGHT,
+ REAR_REGISTRATION_PLATE_LIGHT,
+
+ /**
+ * Include all high beam lights: front_left and front_right.
+ */
+ HIGH_BEAMS,
+ /**
+ * Include all low beam lights: front_left and front_right.
+ */
+ LOW_BEAMS,
+ /**
+ * Include all fog lights: front_left, front_right, rear_left and rear_right.
+ */
+ FOG_LIGHTS,
+ /**
+ * Include all daytime running lights: front_left and front_right.
+ */
+ RUNNING_LIGHTS,
+ /**
+ * Include all parking lights: front_left and front_right.
+ */
+ PARKING_LIGHTS,
+ /**
+ * Include all brake lights: rear_left and rear_right.
+ */
+ BRAKE_LIGHTS,
+ REAR_REVERSING_LIGHTS,
+ SIDE_MARKER_LIGHTS,
+
+ /**
+ * Include all left turn signal lights: front_left, rear_left, left_side and mirror_mounted.
+ */
+ LEFT_TURN_LIGHTS,
+ /**
+ * Include all right turn signal lights: front_right, rear_right, right_side and mirror_mounted.
+ */
+ RIGHT_TURN_LIGHTS,
+ /**
+ * Include all hazard lights: front_left, front_right, rear_left and rear_right.
+ */
+ HAZARD_LIGHTS,
+ /**
+ * Cargo lamps illuminate the cargo area.
+ */
+ REAR_CARGO_LIGHTS,
+ /**
+ * Truck bed lamps light up the bed of the truck.
+ */
+ REAR_TRUCK_BED_LIGHTS,
+ /**
+ * Trailer lights are lamps mounted on a trailer hitch.
+ */
+ REAR_TRAILER_LIGHTS,
+ /**
+ * It is the spotlights mounted on the left side of a vehicle.
+ */
+ LEFT_SPOT_LIGHTS,
+ /**
+ * It is the spotlights mounted on the right side of a vehicle.
+ */
+ RIGHT_SPOT_LIGHTS,
+ /**
+ * Puddle lamps illuminate the ground beside the door as the customer is opening or approaching the door.
+ */
+ LEFT_PUDDLE_LIGHTS,
+ /**
+ * Puddle lamps illuminate the ground beside the door as the customer is opening or approaching the door.
+ */
+ RIGHT_PUDDLE_LIGHTS,
+
+ /*Interior Lights by common function groups*/
+
+ AMBIENT_LIGHTS,
+ OVERHEAD_LIGHTS,
+ READING_LIGHTS,
+ TRUNK_LIGHTS,
+
+
+ /*Lights by location*/
+
+ /**
+ * Include exterior lights located in front of the vehicle. For example, fog lights and low beams.
+ */
+ EXTERIOR_FRONT_LIGHTS,
+ /**
+ * Include exterior lights located at the back of the vehicle. For example, license plate lights, reverse lights, cargo lights, bed lights an trailer assist lights.
+ */
+ EXTERIOR_REAR_LIGHTS,
+ /**
+ * Include exterior lights located at the left side of the vehicle. For example, left puddle lights and spot lights.
+ */
+ EXTERIOR_LEFT_LIGHTS,
+ /**
+ * Include exterior lights located at the right side of the vehicle. For example, right puddle lights and spot lights.
+ */
+ EXTERIOR_RIGHT_LIGHTS,
+ /**
+ * Include all exterior lights around the vehicle.
+ */
+ EXTERIOR_ALL_LIGHTS,
+ ;
+
+ public static LightName 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/LightStatus.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/LightStatus.java
new file mode 100644
index 000000000..98c4b175c
--- /dev/null
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/LightStatus.java
@@ -0,0 +1,19 @@
+package com.smartdevicelink.proxy.rpc.enums;
+
+public enum LightStatus {
+ ON,
+ OFF,
+ RAMP_UP,
+ RAMP_DOWN,
+ UNKNOWN,
+ INVALID,
+ ;
+
+ public static LightStatus 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
index 5eaf6366e..c4bedfd46 100644
--- 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
@@ -4,6 +4,9 @@ public enum ModuleType {
CLIMATE,
RADIO,
SEAT,
+ AUDIO,
+ LIGHT,
+ HMI_SETTINGS,
;
public static ModuleType valueForString(String value) {
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PrimaryAudioSource.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PrimaryAudioSource.java
index b06045d1a..27f83d7d4 100644
--- a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PrimaryAudioSource.java
+++ b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/PrimaryAudioSource.java
@@ -5,11 +5,15 @@ package com.smartdevicelink.proxy.rpc.enums;
* @since SmartDeviceLink 2.0
*/
public enum PrimaryAudioSource {
- /**
- * Currently no source selected
- */
+ /**
+ * Currently no source selected
+ */
NO_SOURCE_SELECTED,
/**
+ * CD is current source
+ */
+ CD,
+ /**
* USB is current source
*/
USB,
@@ -32,18 +36,23 @@ public enum PrimaryAudioSource {
/**
* Mobile app is current source
*/
- MOBILE_APP;
+ MOBILE_APP,
+ AM,
+ FM,
+ XM,
+ DAB,
+ ;
/**
* Convert String to PrimaryAudioSource
* @param value String
* @return PrimaryAudioSource
- */
+ */
public static PrimaryAudioSource valueForString(String value) {
- try{
- return valueOf(value);
- }catch(Exception e){
- return null;
- }
+ try{
+ return valueOf(value);
+ }catch(Exception e){
+ return null;
+ }
}
}