Răsfoiți Sursa

minor changes

Marc Mültin 9 ani în urmă
părinte
comite
0047027eea

+ 7 - 5
RISE-V2G-SECC/src/main/java/org/eclipse/risev2g/secc/backend/DummyBackendInterface.java

@@ -123,10 +123,12 @@ public class DummyBackendInterface implements IBackendInterface {
 		SAScheduleListType saScheduleList = new SAScheduleListType();
 		saScheduleList.getSAScheduleTuple().add(saScheduleTuple);
 		
-		// Set xml reference elements (repeat this for every sales tariff)
-		xmlSignatureRefElements.put(
-				salesTariff.getId(), 
-				SecurityUtils.generateDigest(salesTariff, false));
+		// Set xml reference elements for SalesTariff elements (repeat this for every sales tariff) if they are sent
+		if (saScheduleTuple.getSalesTariff() != null) {
+			xmlSignatureRefElements.put(
+					salesTariff.getId(), 
+					SecurityUtils.generateDigest(salesTariff, false));
+		}
 	
 		return saScheduleList;
 	}
@@ -208,7 +210,7 @@ public class DummyBackendInterface implements IBackendInterface {
 	@Override
 	public ECPrivateKey getMOSubCA2CertificatePrivateKey() {
 		ECPrivateKey privateKey = SecurityUtils.getPrivateKey(
-				"./PKI-1_CRT_MO_SUB2_VALID.key", 
+				"./moSub2CA.key", 
 				GlobalValues.PASSPHRASE_FOR_CERTIFICATES_AND_KEYS.toString());
 		
 		if (privateKey == null) 

+ 7 - 1
RISE-V2G-SECC/src/main/java/org/eclipse/risev2g/secc/states/WaitForCurrentDemandReq.java

@@ -45,7 +45,13 @@ public class WaitForCurrentDemandReq extends ServerState {
 			
 			// TODO how to deal with the remaining parameters of currentDemandReq?
 			
-			currentDemandRes.setDCEVSEStatus(evseController.getDCEVSEStatus(EVSENotificationType.NONE));
+			/*
+			 * TODO check if a renegotiation is wanted or not
+			 * Change EVSENotificationType to NONE if you want more than one charge loop iteration, 
+			 * but then make sure the EV is stopping the charge loop
+			 */
+			currentDemandRes.setDCEVSEStatus(evseController.getDCEVSEStatus(EVSENotificationType.STOP_CHARGING));
+			
 			currentDemandRes.setEVSECurrentLimitAchieved(evseController.isEVSECurrentLimitAchieved());
 			currentDemandRes.setEVSEVoltageLimitAchieved(evseController.isEVSEVoltageLimitAchieved());
 			currentDemandRes.setEVSEPowerLimitAchieved(evseController.isEVSEPowerLimitAchieved());