import {
DiagnosticsStatusNotificationRequest,
OCPP16BootNotificationRequest,
+ OCPP16DataTransferRequest,
OCPP16HeartbeatRequest,
OCPP16RequestCommand,
OCPP16StatusNotificationRequest,
)
) as JSONSchemaType<OCPP16StopTransactionRequest>,
],
+ [
+ OCPP16RequestCommand.DATA_TRANSFER,
+ JSON.parse(
+ fs.readFileSync(
+ path.resolve(
+ path.dirname(fileURLToPath(import.meta.url)),
+ '../../../assets/json-schemas/ocpp/1.6/DataTransfer.json'
+ ),
+ 'utf8'
+ )
+ ) as JSONSchemaType<OCPP16DataTransferRequest>,
+ ],
]);
this.buildRequestPayload.bind(this);
this.validatePayload.bind(this);
),
}),
} as unknown as Request;
+ case OCPP16RequestCommand.DATA_TRANSFER:
+ return commandParams as unknown as Request;
default:
// OCPPError usage here is debatable: it's an error in the OCPP stack but not targeted to sendError().
throw new OCPPError(