export default class ChargingStationWorkerBroadcastChannel extends WorkerBroadcastChannel {
private readonly commandHandlers: Map<BroadcastChannelProcedureName, CommandHandler>;
-
private readonly chargingStation: ChargingStation;
constructor(chargingStation: ChargingStation) {
return;
}
const [uuid, command, requestPayload] = validatedMessageEvent.data as BroadcastChannelRequest;
-
if (
requestPayload?.hashIds !== undefined &&
requestPayload?.hashIds?.includes(this.chargingStation.stationInfo.hashId) === false
private messageErrorHandler(messageEvent: MessageEvent): void {
logger.error(
`${this.chargingStation.logPrefix()} ${moduleName}.messageErrorHandler: Error at handling message:`,
- { messageEvent }
+ messageEvent
);
}
const moduleName = 'AbstractUIService';
export default abstract class AbstractUIService {
- protected static readonly ProcedureNameToBroadCastChannelProcedureNameMap: Omit<
+ private static readonly ProcedureNameToBroadCastChannelProcedureNameMap: Omit<
Record<ProcedureName, BroadcastChannelProcedureName>,
'startSimulator' | 'stopSimulator' | 'listChargingStations'
> = {