type GetDiagnosticsRequest,
type GetDiagnosticsResponse,
type IncomingRequestHandler,
- type JsonObject,
type JsonType,
OCPP16AuthorizationStatus,
OCPP16AvailabilityType,
const moduleName = 'OCPP16IncomingRequestService';
export class OCPP16IncomingRequestService extends OCPPIncomingRequestService {
- protected jsonSchemas: Map<OCPP16IncomingRequestCommand, JSONSchemaType<JsonObject>>;
+ protected jsonSchemas: Map<OCPP16IncomingRequestCommand, JSONSchemaType<JsonType>>;
private incomingRequestHandlers: Map<OCPP16IncomingRequestCommand, IncomingRequestHandler>;
public constructor() {
this.handleRequestCancelReservation.bind(this) as unknown as IncomingRequestHandler,
],
]);
- this.jsonSchemas = new Map<OCPP16IncomingRequestCommand, JSONSchemaType<JsonObject>>([
+ this.jsonSchemas = new Map<OCPP16IncomingRequestCommand, JSONSchemaType<JsonType>>([
[
OCPP16IncomingRequestCommand.RESET,
OCPP16ServiceUtils.parseJsonSchemaFile<ResetRequest>(
ErrorType.SECURITY_ERROR,
`${commandName} cannot be issued to handle request PDU ${JSON.stringify(
commandPayload,
- null,
+ undefined,
2,
)} while the charging station is in pending state on the central server`,
commandName,
ErrorType.NOT_IMPLEMENTED,
`${commandName} is not implemented to handle request PDU ${JSON.stringify(
commandPayload,
- null,
+ undefined,
2,
)}`,
commandName,
ErrorType.SECURITY_ERROR,
`${commandName} cannot be issued to handle request PDU ${JSON.stringify(
commandPayload,
- null,
+ undefined,
2,
)} while the charging station is not registered on the central server.`,
commandName,
.requestHandler<OCPP16HeartbeatRequest, OCPP16HeartbeatResponse>(
chargingStation,
OCPP16RequestCommand.HEARTBEAT,
- null,
+ undefined,
{
triggerMessage: true,
},