OCPP16IncomingRequestService,
OCPP16RequestService,
OCPP16ResponseService,
- OCPP16ServiceUtils,
OCPP20IncomingRequestService,
OCPP20RequestService,
OCPP20ResponseService,
type OCPPIncomingRequestService,
type OCPPRequestService,
+ buildMeterValue,
buildStatusNotificationRequest,
+ buildTransactionEndMeterValue,
getMessageTypeString,
sendAndSetConnectorStatus,
} from './ocpp';
type IncomingRequestCommand,
type JsonType,
MessageType,
- type MeterValue,
MeterValueMeasurand,
type MeterValuesRequest,
type MeterValuesResponse,
}
if (interval > 0) {
this.getConnectorStatus(connectorId)!.transactionSetInterval = setInterval(() => {
- // FIXME: Implement OCPP version agnostic helpers
- const meterValue: MeterValue = OCPP16ServiceUtils.buildMeterValue(
+ const meterValue = buildMeterValue(
this,
connectorId,
this.getConnectorStatus(connectorId)!.transactionId!,
this.stationInfo?.ocppStrictCompliance === true &&
this.stationInfo?.outOfOrderEndMeterValues === false
) {
- // FIXME: Implement OCPP version agnostic helpers
- const transactionEndMeterValue = OCPP16ServiceUtils.buildTransactionEndMeterValue(
+ const transactionEndMeterValue = buildTransactionEndMeterValue(
this,
connectorId,
this.getEnergyActiveImportRegisterByTransactionId(transactionId!),