continue contigency
MODIFY
src/server/ocpp/services/OCPPService.ts
src/server/ocpp/services/OCPPService.ts
@@ -1338,7 +1338,9 @@ export default class OCPPService {
}
}
// Signed Data
- OCPPUtils.updateSignedData(transaction, meterValue);
+ if (OCPPUtils.updateSignedData(transaction, meterValue)) {
+ continue;
+ }
// SoC
if (meterValue.attribute.measurand === OCPPMeasurand.STATE_OF_CHARGE) {
// Set the first SoC and keep it

MODIFY
src/server/ocpp/utils/OCPPUtils.ts
src/server/ocpp/utils/OCPPUtils.ts
@@ -1851,16 +1851,19 @@ export default class OCPPUtils {
return resetResult;
}
- public static updateSignedData(transaction: Transaction, meterValue: OCPPNormalizedMeterValue): void {
+ public static updateSignedData(transaction: Transaction, meterValue: OCPPNormalizedMeterValue): boolean {
if (meterValue.attribute.format === OCPPValueFormat.SIGNED_DATA) {
if (meterValue.attribute.context === OCPPReadingContext.TRANSACTION_BEGIN) {
// Set the first Signed Data and keep it
transaction.signedData = meterValue.value as string;
+ return true;
} else if (meterValue.attribute.context === OCPPReadingContext.TRANSACTION_END) {
// Set the last Signed Data (used in the last consumption)
transaction.currentSignedData = meterValue.value as string;
+ return true;
}
}
+ return false;
}
private static async enrichChargingStationWithTemplate(tenantID: string, chargingStation: ChargingStation): Promise<TemplateUpdateResult> {

continue contigency