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>(
): Promise<void> {
let response: ResType;
if (
- chargingStation.getOcppStrictCompliance() === true &&
+ chargingStation.stationInfo?.ocppStrictCompliance === true &&
chargingStation.inPendingState() === true &&
(commandName === OCPP16IncomingRequestCommand.REMOTE_START_TRANSACTION ||
commandName === OCPP16IncomingRequestCommand.REMOTE_STOP_TRANSACTION)
}
if (
chargingStation.isRegistered() === true ||
- (chargingStation.getOcppStrictCompliance() === false &&
+ (chargingStation.stationInfo?.ocppStrictCompliance === false &&
chargingStation.inUnknownState() === true)
) {
if (
} else if (isNotEmptyArray(key) === true) {
for (const k of key!) {
const keyFound = getConfigurationKey(chargingStation, k, true);
- if (keyFound) {
+ if (keyFound !== undefined) {
if (isUndefined(keyFound.visible) === true) {
keyFound.visible = true;
}