type JsonType,
type OCPP20ClearCacheRequest,
OCPP20IncomingRequestCommand,
type JsonType,
type OCPP20ClearCacheRequest,
OCPP20IncomingRequestCommand,
const moduleName = 'OCPP20IncomingRequestService';
export class OCPP20IncomingRequestService extends OCPPIncomingRequestService {
const moduleName = 'OCPP20IncomingRequestService';
export class OCPP20IncomingRequestService extends OCPPIncomingRequestService {
this.incomingRequestHandlers = new Map<OCPP20IncomingRequestCommand, IncomingRequestHandler>([
[OCPP20IncomingRequestCommand.CLEAR_CACHE, this.handleRequestClearCache.bind(this)],
]);
this.incomingRequestHandlers = new Map<OCPP20IncomingRequestCommand, IncomingRequestHandler>([
[OCPP20IncomingRequestCommand.CLEAR_CACHE, this.handleRequestClearCache.bind(this)],
]);
[
OCPP20IncomingRequestCommand.CLEAR_CACHE,
OCPP20ServiceUtils.parseJsonSchemaFile<OCPP20ClearCacheRequest>(
[
OCPP20IncomingRequestCommand.CLEAR_CACHE,
OCPP20ServiceUtils.parseJsonSchemaFile<OCPP20ClearCacheRequest>(
chargingStation: ChargingStation,
messageId: string,
commandName: OCPP20IncomingRequestCommand,
chargingStation: ChargingStation,
messageId: string,
commandName: OCPP20IncomingRequestCommand,
chargingStation.inPendingState() === true &&
(commandName === OCPP20IncomingRequestCommand.REQUEST_START_TRANSACTION ||
commandName === OCPP20IncomingRequestCommand.REQUEST_STOP_TRANSACTION)
chargingStation.inPendingState() === true &&
(commandName === OCPP20IncomingRequestCommand.REQUEST_START_TRANSACTION ||
commandName === OCPP20IncomingRequestCommand.REQUEST_STOP_TRANSACTION)
ErrorType.SECURITY_ERROR,
`${commandName} cannot be issued to handle request PDU ${JSON.stringify(
commandPayload,
ErrorType.SECURITY_ERROR,
`${commandName} cannot be issued to handle request PDU ${JSON.stringify(
commandPayload,
try {
this.validatePayload(chargingStation, commandName, commandPayload);
// Call the method to build the response
try {
this.validatePayload(chargingStation, commandName, commandPayload);
// Call the method to build the response
ErrorType.NOT_IMPLEMENTED,
`${commandName} is not implemented to handle request PDU ${JSON.stringify(
commandPayload,
ErrorType.NOT_IMPLEMENTED,
`${commandName} is not implemented to handle request PDU ${JSON.stringify(
commandPayload,
ErrorType.SECURITY_ERROR,
`${commandName} cannot be issued to handle request PDU ${JSON.stringify(
commandPayload,
ErrorType.SECURITY_ERROR,
`${commandName} cannot be issued to handle request PDU ${JSON.stringify(
commandPayload,