type IncomingRequest,
IncomingRequestCommand,
type MeterValuesRequest,
+ type OutgoingRequest,
RequestCommand,
type ResponseCallback,
type StatusNotificationRequest,
this.messageBuffer.forEach((message) => {
// TODO: evaluate the need to track performance
this.wsConnection.send(message);
+ const [messageType] = JSON.parse(message) as OutgoingRequest | Response | ErrorResponse;
+ logger.debug(
+ `${this.logPrefix()} >> Buffered ${OCPPServiceUtils.getMessageTypeString(
+ messageType
+ )} payload sent: ${message}`
+ );
this.messageBuffer.delete(message);
});
}
' Starting transaction id ' +
payload.transactionId.toString() +
" REJECTED with status '" +
- payload?.idTagInfo?.status +
+ payload.idTagInfo?.status +
"', idTag '" +
requestPayload.idTag +
"'"
chargingStation.powerDivider--;
}
chargingStation.resetConnectorStatus(transactionConnectorId);
- const logMsg =
- chargingStation.logPrefix() +
- ' Transaction ' +
- requestPayload.transactionId.toString() +
- ' STOPPED on ' +
- chargingStation.stationInfo.chargingStationId +
- '#' +
- transactionConnectorId.toString() +
- " with status '" +
- payload.idTagInfo?.status ?? 'undefined' + "'";
+ const logMsg = `${chargingStation.logPrefix()} Transaction ${requestPayload.transactionId.toString()} STOPPED on ${
+ chargingStation.stationInfo.chargingStationId
+ }#${transactionConnectorId.toString()} with status '${
+ payload.idTagInfo?.status ?? 'undefined'
+ }'`;
if (
Utils.isNullOrUndefined(payload.idTagInfo) ||
payload.idTagInfo?.status === OCPP16AuthorizationStatus.ACCEPTED