+ private cleanRequestPayload(
+ command: BroadcastChannelProcedureName,
+ requestPayload: BroadcastChannelRequestPayload
+ ): void {
+ delete requestPayload.hashId;
+ delete requestPayload.hashIds;
+ [
+ BroadcastChannelProcedureName.START_AUTOMATIC_TRANSACTION_GENERATOR,
+ BroadcastChannelProcedureName.STOP_AUTOMATIC_TRANSACTION_GENERATOR,
+ ].includes(command) === false && delete requestPayload.connectorIds;
+ }
+
+ private commandResponseToResponsePayload(
+ command: BroadcastChannelProcedureName,
+ requestPayload: BroadcastChannelRequestPayload,
+ commandResponse: CommandResponse
+ ): BroadcastChannelResponsePayload {
+ const responseStatus = this.commandResponseToResponseStatus(command, commandResponse);
+ if (responseStatus === ResponseStatus.SUCCESS) {
+ return {
+ hashId: this.chargingStation.stationInfo.hashId,
+ status: responseStatus,
+ };
+ }
+ return {
+ hashId: this.chargingStation.stationInfo.hashId,
+ status: responseStatus,
+ command,
+ requestPayload,
+ commandResponse,
+ };
+ }
+