checkChargingStationState,
getConfigurationKey,
getConnectorChargingProfiles,
+ getIdTagsFile,
prepareChargingProfileKind,
removeExpiredReservations,
resetAuthorizeConnectorStatus,
import {
type ChangeConfigurationRequest,
type ChangeConfigurationResponse,
+ type ClearCacheResponse,
ConfigurationSection,
ErrorType,
type GenericResponse,
logger,
sleep,
} from '../../../utils/index.js'
+import { OCPPConstants } from '../OCPPConstants.js'
import { OCPPIncomingRequestService } from '../OCPPIncomingRequestService.js'
import { OCPPServiceUtils } from '../OCPPServiceUtils.js'
import { OCPP16Constants } from './OCPP16Constants.js'
],
[
OCPP16IncomingRequestCommand.CLEAR_CACHE,
- super.handleRequestClearCache.bind(this) as unknown as IncomingRequestHandler,
+ this.handleRequestClearCache.bind(this) as unknown as IncomingRequestHandler,
],
[
OCPP16IncomingRequestCommand.CLEAR_CHARGING_PROFILE,
return OCPP16Constants.OCPP_CONFIGURATION_RESPONSE_NOT_SUPPORTED
}
+ private handleRequestClearCache (chargingStation: ChargingStation): ClearCacheResponse {
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ if (chargingStation.idTagsCache.deleteIdTags(getIdTagsFile(chargingStation.stationInfo!)!)) {
+ return OCPPConstants.OCPP_RESPONSE_ACCEPTED
+ }
+ return OCPPConstants.OCPP_RESPONSE_REJECTED
+ }
+
private handleRequestClearChargingProfile (
chargingStation: ChargingStation,
commandPayload: OCPP16ClearChargingProfileRequest
import _ajvFormats from 'ajv-formats'
import { EventEmitter } from 'node:events'
-import type {
- ClearCacheResponse,
- IncomingRequestCommand,
- JsonType,
- OCPPVersion,
-} from '../../types/index.js'
+import type { IncomingRequestCommand, JsonType, OCPPVersion } from '../../types/index.js'
-import { type ChargingStation, getIdTagsFile } from '../../charging-station/index.js'
+import { type ChargingStation } from '../../charging-station/index.js'
import { OCPPError } from '../../exception/index.js'
import { logger } from '../../utils/index.js'
-import { OCPPConstants } from './OCPPConstants.js'
import { ajvErrorsToErrorType } from './OCPPServiceUtils.js'
type Ajv = _Ajv.default
): Promise<void>
public abstract stop (chargingStation: ChargingStation): void
-
- protected handleRequestClearCache (
- chargingStation: ChargingStation
- ): ClearCacheResponse | Promise<ClearCacheResponse> {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- if (chargingStation.idTagsCache.deleteIdTags(getIdTagsFile(chargingStation.stationInfo!)!)) {
- return OCPPConstants.OCPP_RESPONSE_ACCEPTED
- }
- return OCPPConstants.OCPP_RESPONSE_REJECTED
- }
-
/**
* Validates incoming request payload against JSON schema
* @param chargingStation - The charging station instance processing the request