Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing new ElectronicParkBrakeStatus #797

Merged
merged 5 commits into from
Jul 11, 2018
Merged

Conversation

askirk
Copy link
Contributor

@askirk askirk commented Jun 22, 2018

Fixes #632

This PR is [ready] for review.

Risk

This PR makes [minor] API changes.

Testing Plan

Unit tests were updated to cover new code changes.

Summary

  • adding new enum
  • adding additional VehicleDataType
  • adding field in Subscribe and Unsubscribe Vehicle Data Request & Response
  • adding field in GetVehicleData Request & Response
  • adding field in OnVehicleData notification
  • adding corresponding sections to unit tests to cover new code

Changelog

Enhancements
  • New vehicle data available electronicParkBrakeStatus

CLA

- adding new enum
- adding additional VehicleDataType
- adding field in Subscribe and Unsubscribe Vehicle Data Request & Response
- adding field in GetVehicleData Request & Response
- adding field in OnVehicleData notification
- adding corresponding sections to unit tests to cover new code
@codecov-io
Copy link

codecov-io commented Jun 22, 2018

Codecov Report

Merging #797 into develop will increase coverage by 0.1%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             develop     #797     +/-   ##
============================================
+ Coverage      42.74%   42.85%   +0.1%     
- Complexity      2900     2916     +16     
============================================
  Files            369      370      +1     
  Lines          17187    17218     +31     
  Branches        1732     1732             
============================================
+ Hits            7347     7378     +31     
  Misses          9523     9523             
  Partials         317      317
Impacted Files Coverage Δ Complexity Δ
...a/com/smartdevicelink/proxy/rpc/OnVehicleData.java 95.09% <100%> (+0.14%) 59 <2> (+2) ⬆️
...ink/proxy/rpc/enums/ElectronicParkBrakeStatus.java 100% <100%> (ø) 2 <2> (?)
...martdevicelink/proxy/rpc/SubscribeVehicleData.java 98.88% <100%> (+0.03%) 59 <2> (+2) ⬆️
...rtdevicelink/proxy/rpc/GetVehicleDataResponse.java 96.22% <100%> (+0.1%) 60 <2> (+2) ⬆️
...artdevicelink/proxy/rpc/enums/VehicleDataType.java 100% <100%> (ø) 2 <0> (ø) ⬇️
...link/proxy/rpc/UnsubscribeVehicleDataResponse.java 96.84% <100%> (+0.1%) 59 <2> (+2) ⬆️
.../com/smartdevicelink/proxy/rpc/GetVehicleData.java 98.92% <100%> (+0.03%) 61 <2> (+2) ⬆️
...rtdevicelink/proxy/rpc/UnsubscribeVehicleData.java 98.88% <100%> (+0.03%) 59 <2> (+2) ⬆️
...celink/proxy/rpc/SubscribeVehicleDataResponse.java 96.84% <100%> (+0.1%) 59 <2> (+2) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6a9cf35...5ab611d. Read the comment docs.

}

/**
* Verifies the possible enum values of WiperStatus.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not WiperStatus

@@ -162,6 +165,7 @@ public void testRpcValues () {
assertNull(Test.NULL, msg.getEmergencyEvent());
assertNull(Test.NULL, msg.getClusterModeStatus());
assertNull(Test.NULL, msg.getMyKey());
assertNull(Test.NULL, msg.getElectronicParkBrakeStatus());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how picky we want to be with tabs/spaces but there are a lot of lines in this PR that dont line up

# Conflicts:
#	sdl_android/src/androidTest/assets/json/GetVehicleData.json
#	sdl_android/src/androidTest/assets/json/SubscribeVehicleData.json
#	sdl_android/src/androidTest/assets/json/UnsubscribeVehicleData.json
#	sdl_android/src/androidTest/java/com/smartdevicelink/test/VehicleDataHelper.java
#	sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/VehicleDataTypeTests.java
#	sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnVehicleDataTests.java
#	sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetVehicleDataTests.java
#	sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubscribeVehicleDataTests.java
#	sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnsubscribeVehicleDataTests.java
#	sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetVehicleDataResponseTests.java
#	sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java
#	sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java
#	sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleData.java
#	sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java
#	sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/OnVehicleData.java
#	sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java
#	sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java
#	sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java
#	sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java
#	sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataType.java
@@ -474,4 +475,12 @@ public Boolean getFuelRange() {
* @return a Boolean value.
*/
public Boolean getTurnSignal() { return getBoolean(KEY_TURN_SIGNAL); }

public void setElectronicParkBrakeStatus(Boolean electronicParkBrakeStatus){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add javadoc

setParameters(KEY_ELECTRONIC_PARK_BRAKE_STATUS, electronicParkBrakeStatus);
}

public Boolean getElectronicParkBrakeStatus(){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add javadoc

@@ -295,4 +297,11 @@ public void setTurnSignal(TurnSignal turnSignal) {
public TurnSignal getTurnSignal() {
return (TurnSignal) getObject(TurnSignal.class, KEY_TURN_SIGNAL);
}

public void setElectronicParkBrakeStatus(ElectronicParkBrakeStatus electronicParkBrakeStatus){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add javadoc

public void setElectronicParkBrakeStatus(ElectronicParkBrakeStatus electronicParkBrakeStatus){
setParameters(KEY_ELECTRONIC_PARK_BRAKE_STATUS, electronicParkBrakeStatus);
}
public ElectronicParkBrakeStatus getElectronicParkBrakeStatus(){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add javadoc

@@ -510,4 +512,11 @@ public void setTurnSignal(TurnSignal turnSignal) {
public TurnSignal getTurnSignal() {
return (TurnSignal) getObject(TurnSignal.class, KEY_TURN_SIGNAL);
}

public void setElectronicParkBrakeStatus(ElectronicParkBrakeStatus electronicParkBrakeStatus){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add javadoc

public void setElectronicParkBrakeStatus(ElectronicParkBrakeStatus electronicParkBrakeStatus){
setParameters(KEY_ELECTRONIC_PARK_BRAKE_STATUS, electronicParkBrakeStatus);
}
public ElectronicParkBrakeStatus getElectronicParkBrakeStatus(){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add javadoc

@@ -790,4 +791,11 @@ public Boolean getFuelRange() {
* @return a Boolean value.
*/
public Boolean getTurnSignal() { return getBoolean(KEY_TURN_SIGNAL); }

public void setElectronicParkBrakeStatus(boolean electronicParkBrakeStatus){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add javadoc

public void setElectronicParkBrakeStatus(boolean electronicParkBrakeStatus){
setParameters(KEY_ELECTRONIC_PARK_BRAKE_STATUS, electronicParkBrakeStatus);
}
public Boolean getElectronicParkBrakeStatus(){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add javadoc

@@ -449,4 +450,11 @@ public void setTurnSignal(VehicleDataResult turnSignal) {
public VehicleDataResult getTurnSignal() {
return (VehicleDataResult) getObject(VehicleDataResult.class, KEY_TURN_SIGNAL);
}

public void setElectronicParkBrakeStatus(VehicleDataResult electronicParkBrakeStatus){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add javadoc

public void setElectronicParkBrakeStatus(VehicleDataResult electronicParkBrakeStatus){
setParameters(KEY_ELECTRONIC_PARK_BRAKE_STATUS, electronicParkBrakeStatus);
}
public VehicleDataResult getElectronicParkBrakeStatus(){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add javadoc

@@ -784,4 +785,11 @@ public Boolean getFuelRange() {
* @return a Boolean value.
*/
public Boolean getTurnSignal() { return getBoolean(KEY_TURN_SIGNAL); }

public void setElectronicParkBrakeStatus(Boolean electronicParkBrakeStatus) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add javadoc

public void setElectronicParkBrakeStatus(Boolean electronicParkBrakeStatus) {
setParameters(KEY_ELECTRONIC_PARK_BRAKE_STATUS, electronicParkBrakeStatus);
}
public Boolean getElectronicParkBrakeStatus() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add javadoc

@@ -454,4 +455,11 @@ public void setTurnSignal(VehicleDataResult turnSignal) {
public VehicleDataResult getTurnSignal() {
return (VehicleDataResult) getObject(VehicleDataResult.class, KEY_TURN_SIGNAL);
}

public void setElectronicParkBrakeStatus(VehicleDataResult electronicParkBrakeStatus){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add javadoc

public void setElectronicParkBrakeStatus(VehicleDataResult electronicParkBrakeStatus){
setParameters(KEY_ELECTRONIC_PARK_BRAKE_STATUS, electronicParkBrakeStatus);
}
public VehicleDataResult getElectronicParkBrakeStatus(){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add javadoc

/**
* When system has a fault or is under maintenance.
*/
FAULT;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comma, an extra clear line, and move the semicolon underneath

@joeygrover joeygrover merged commit 3f2a124 into develop Jul 11, 2018
@joeygrover joeygrover deleted the feature/issue_632 branch July 11, 2018 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants