}
public isChargingStationAvailable(): boolean {
- return this.getConnectorStatus(0)?.availability === AvailabilityType.OPERATIVE;
+ return this.getConnectorStatus(0)?.availability === AvailabilityType.Operative;
}
public isConnectorAvailable(id: number): boolean {
- return id > 0 && this.getConnectorStatus(id)?.availability === AvailabilityType.OPERATIVE;
+ return id > 0 && this.getConnectorStatus(id)?.availability === AvailabilityType.Operative;
}
public getNumberOfConnectors(): number {
lastConnectorId,
Utils.cloneObject<ConnectorStatus>(connectorStatus)
);
- this.getConnectorStatus(lastConnectorId).availability = AvailabilityType.OPERATIVE;
+ this.getConnectorStatus(lastConnectorId).availability = AvailabilityType.Operative;
if (Utils.isUndefined(this.getConnectorStatus(lastConnectorId)?.chargingProfiles)) {
this.getConnectorStatus(lastConnectorId).chargingProfiles = [];
}
const connectorStatus = stationInfo?.Connectors[randConnectorId.toString()];
this.checkStationInfoConnectorStatus(randConnectorId, connectorStatus);
this.connectors.set(index, Utils.cloneObject<ConnectorStatus>(connectorStatus));
- this.getConnectorStatus(index).availability = AvailabilityType.OPERATIVE;
+ this.getConnectorStatus(index).availability = AvailabilityType.Operative;
if (Utils.isUndefined(this.getConnectorStatus(index)?.chargingProfiles)) {
this.getConnectorStatus(index).chargingProfiles = [];
}
for (const evse in stationInfo?.Evses) {
const evseId = Utils.convertToInt(evse);
this.evses.set(evseId, Utils.cloneObject<EvseStatus>(stationInfo?.Evses[evse]));
- this.evses.get(evseId).availability = AvailabilityType.OPERATIVE;
+ this.evses.get(evseId).availability = AvailabilityType.Operative;
}
}
} else {
return OCPP16Constants.OCPP_AVAILABILITY_RESPONSE_REJECTED;
}
const chargePointStatus: OCPP16ChargePointStatus =
- commandPayload.type === OCPP16AvailabilityType.OPERATIVE
+ commandPayload.type === OCPP16AvailabilityType.Operative
? OCPP16ChargePointStatus.Available
: OCPP16ChargePointStatus.Unavailable;
if (connectorId === 0) {
connectorId > 0 &&
(chargingStation.isChargingStationAvailable() === true ||
(chargingStation.isChargingStationAvailable() === false &&
- commandPayload.type === OCPP16AvailabilityType.INOPERATIVE))
+ commandPayload.type === OCPP16AvailabilityType.Inoperative))
) {
if (chargingStation.getConnectorStatus(connectorId)?.transactionStarted === true) {
chargingStation.getConnectorStatus(connectorId).availability = commandPayload.type;
}
export enum OCPP16AvailabilityType {
- INOPERATIVE = 'Inoperative',
- OPERATIVE = 'Operative',
+ Inoperative = 'Inoperative',
+ Operative = 'Operative',
}
export interface ChangeAvailabilityRequest extends JsonObject {