{ from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Finishing },
{ from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Reserved },
{ from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Unavailable }
- // { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Faulted },
+ // { from: OCPP16ChargePointStatus.Faulted, to: OCPP16ChargePointStatus.Faulted }
])
}
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const connectorStatus = chargingStation.getConnectorStatus(connectorId)!
if (
- isEmptyArray(
- connectorStatus?.chargingProfiles != null &&
- isEmptyArray(chargingStation.getConnectorStatus(0)?.chargingProfiles)
- )
+ isEmptyArray(connectorStatus?.chargingProfiles) &&
+ isEmptyArray(chargingStation.getConnectorStatus(0)?.chargingProfiles)
) {
return OCPP16Constants.OCPP_RESPONSE_REJECTED
}
import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core'
// eslint-disable-next-line @typescript-eslint/no-unused-vars
-import type { PerformanceRecord } from './PerformanceRecord.js'
+import { PerformanceRecord } from './PerformanceRecord.js'
@Entity()
export class PerformanceData {
// @PrimaryKey()
- // pk!: number;
+ // pk!: number
// @Property()
- // commandName!: string;
+ // commandName!: string
// @Property()
- // countRequest!: number;
+ // countRequest!: number
// @Property()
- // countResponse!: number;
+ // countResponse!: number
// @Property()
- // countError!: number;
+ // countError!: number
// @Property()
- // countTimeMeasurement!: number;
+ // countTimeMeasurement!: number
// @Property()
- // timeMeasurementSeries!: number[];
+ // timeMeasurementSeries!: number[]
// @Property()
- // currentTimeMeasurement!: number;
+ // currentTimeMeasurement!: number
// @Property()
- // minTimeMeasurement!: number;
+ // minTimeMeasurement!: number
// @Property()
- // maxTimeMeasurement!: number;
+ // maxTimeMeasurement!: number
// @Property()
- // totalTimeMeasurement!: number;
+ // totalTimeMeasurement!: number
// @Property()
- // avgTimeMeasurement!: number;
+ // avgTimeMeasurement!: number
// @Property()
- // medTimeMeasurement!: number;
+ // medTimeMeasurement!: number
// @Property()
- // ninetyFiveThPercentileTimeMeasurement!: number;
+ // ninetyFiveThPercentileTimeMeasurement!: number
// @Property()
- // stdDevTimeMeasurement!: number;
+ // stdDevTimeMeasurement!: number
// @ManyToOne('PerformanceRecord')
- // performanceRecord!: PerformanceRecord;
+ // performanceRecord!: PerformanceRecord
}
return value
}
if (isString(value) || typeof value === 'number') {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const valueToDate = new Date(value)
if (isNaN(valueToDate.getTime())) {
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
throw new Error(`Cannot convert to date: '${value}'`)
}
return valueToDate