import { Client, type FTPResponse } from 'basic-ftp';
import tar from 'tar';
-import { OCPP16ServiceUtils } from './OCPP16ServiceUtils';
+import {
+ type ChargingStation,
+ ChargingStationConfigurationUtils,
+ ChargingStationUtils,
+} from '../../../charging-station';
import { OCPPError } from '../../../exception';
import {
type ChangeAvailabilityRequest,
type ChangeAvailabilityResponse,
type ChangeConfigurationRequest,
type ChangeConfigurationResponse,
- ChargingProfilePurposeType,
type ClearChargingProfileRequest,
type ClearChargingProfileResponse,
ErrorType,
OCPP16ChargePointErrorCode,
OCPP16ChargePointStatus,
type OCPP16ChargingProfile,
+ OCPP16ChargingProfilePurposeType,
type OCPP16ClearCacheRequest,
type OCPP16DataTransferRequest,
type OCPP16DataTransferResponse,
type UnlockConnectorRequest,
type UnlockConnectorResponse,
} from '../../../types';
-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 { OCPPConstants } from '../OCPPConstants';
-import { OCPPIncomingRequestService } from '../OCPPIncomingRequestService';
+import { Constants, Utils, logger } from '../../../utils';
+import { OCPP16ServiceUtils, OCPPConstants, OCPPIncomingRequestService } from '../internal';
const moduleName = 'OCPP16IncomingRequestService';
}
if (
commandPayload.csChargingProfiles.chargingProfilePurpose ===
- ChargingProfilePurposeType.CHARGE_POINT_MAX_PROFILE &&
+ OCPP16ChargingProfilePurposeType.CHARGE_POINT_MAX_PROFILE &&
commandPayload.connectorId !== 0
) {
return OCPPConstants.OCPP_SET_CHARGING_PROFILE_RESPONSE_REJECTED;
}
if (
commandPayload.csChargingProfiles.chargingProfilePurpose ===
- ChargingProfilePurposeType.TX_PROFILE &&
+ OCPP16ChargingProfilePurposeType.TX_PROFILE &&
(commandPayload.connectorId === 0 ||
chargingStation.getConnectorStatus(commandPayload.connectorId)?.transactionStarted ===
false)
connectorId: number,
cp: OCPP16ChargingProfile
): boolean {
- if (cp && cp.chargingProfilePurpose === ChargingProfilePurposeType.TX_PROFILE) {
+ if (cp && cp.chargingProfilePurpose === OCPP16ChargingProfilePurposeType.TX_PROFILE) {
OCPP16ServiceUtils.setChargingProfile(chargingStation, connectorId, cp);
logger.debug(
`${chargingStation.logPrefix()} Charging profile(s) set at remote start transaction on connector id ${connectorId}: %j`,
cp
);
return true;
- } else if (cp && cp.chargingProfilePurpose !== ChargingProfilePurposeType.TX_PROFILE) {
+ } else if (cp && cp.chargingProfilePurpose !== OCPP16ChargingProfilePurposeType.TX_PROFILE) {
logger.warn(
`${chargingStation.logPrefix()} Not allowed to set ${
cp.chargingProfilePurpose