break;
default:
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
- throw new BaseError(`Unknown broadcast channel command: ${command}`);
+ throw new BaseError(`Unknown worker broadcast channel command: ${command}`);
}
}
import ChargingStationInfo from './ChargingStationInfo';
import { ConnectorStatus } from './ConnectorStatus';
import { JsonObject } from './JsonType';
+import { BootNotificationResponse } from './ocpp/Responses';
import Statistics from './Statistics';
import { WorkerData, WorkerMessage, WorkerMessageEvents } from './Worker';
hashId: string;
stationInfo: ChargingStationInfo;
stopped: boolean;
+ bootNotificationResponse: BootNotificationResponse;
connectors: ConnectorStatus[];
}
+import { JsonObject } from './JsonType';
+
export type ChargingStationData = {
hashId: string;
stationInfo: ChargingStationInfo;
+ stopped: boolean;
+ bootNotificationResponse: BootNotificationResponse;
connectors: ConnectorStatus[];
};
...OCPP16RequestCommand,
};
+export type BootNotificationResponse = OCPP16BootNotificationResponse;
+
+export enum OCPP16RegistrationStatus {
+ ACCEPTED = 'Accepted',
+ PENDING = 'Pending',
+ REJECTED = 'Rejected',
+}
+
+export interface OCPP16BootNotificationResponse extends JsonObject {
+ status: OCPP16RegistrationStatus;
+ currentTime: string;
+ interval: number;
+}
+
export interface CommandsSupport {
incomingCommands: Record<IncomingRequestCommand, boolean>;
outgoingCommands?: Record<RequestCommand, boolean>;
STOP_TRANSACTION = 'stopTransaction',
START_SIMULATOR = 'startSimulator',
STOP_SIMULATOR = 'stopSimulator',
+ OPEN_CONNECTION = 'openConnection',
+ CLOSE_CONNECTION = 'closeConnection',
}
export interface RequestPayload extends JsonObject {
hashId?: string;