} from '../../../types/ocpp/1.6/Transaction';
import { ErrorType } from '../../../types/ocpp/ErrorType';
import type { ResponseHandler } from '../../../types/ocpp/Responses';
+import Constants from '../../../utils/Constants';
import logger from '../../../utils/Logger';
import Utils from '../../../utils/Utils';
import type ChargingStation from '../../ChargingStation';
import { ChargingStationConfigurationUtils } from '../../ChargingStationConfigurationUtils';
-import { ChargingStationUtils } from '../../ChargingStationUtils';
import OCPPResponseService from '../OCPPResponseService';
import { OCPP16ServiceUtils } from './OCPP16ServiceUtils';
payload: JsonType,
requestPayload: JsonType
): Promise<void> {
- if (chargingStation.isRegistered() || commandName === OCPP16RequestCommand.BOOT_NOTIFICATION) {
+ if (
+ chargingStation.isRegistered() === true ||
+ commandName === OCPP16RequestCommand.BOOT_NOTIFICATION
+ ) {
if (
- this.responseHandlers.has(commandName) &&
- ChargingStationUtils.isRequestCommandSupported(commandName, chargingStation)
+ this.responseHandlers.has(commandName) === true &&
+ OCPP16ServiceUtils.isRequestCommandSupported(chargingStation, commandName) === true
) {
try {
this.validatePayload(chargingStation, commandName, payload);
connectorId,
configuredMeterValueSampleInterval
? Utils.convertToInt(configuredMeterValueSampleInterval.value) * 1000
- : 60000
+ : Constants.DEFAULT_METER_VALUES_INTERVAL
);
} else {
logger.warn(
],
}));
if (
- !chargingStation.isChargingStationAvailable() ||
- !chargingStation.isConnectorAvailable(transactionConnectorId)
+ chargingStation.isChargingStationAvailable() === false ||
+ chargingStation.isConnectorAvailable(transactionConnectorId) === false
) {
await chargingStation.ocppRequestService.requestHandler<
OCPP16StatusNotificationRequest,