X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FChargingStation.ts;h=547a4f3693321bf271d23cdae07c6cb51df01876;hb=8ca6874c767f7068b101291232cf69b05bbd28c1;hp=a87ef6f2145bf6c89cd8a946bb27a593366290ee;hpb=2cace1a546e371a9326f84179d0e2384275048bf;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index a87ef6f2..547a4f36 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -65,6 +65,7 @@ import { type IncomingRequest, IncomingRequestCommand, type MeterValuesRequest, + type OutgoingRequest, RequestCommand, type ResponseCallback, type StatusNotificationRequest, @@ -769,6 +770,12 @@ export default class ChargingStation { 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); }); }