): OCPP16DataTransferResponse {
try {
if (Object.values(OCPP16DataTransferVendorId).includes(commandPayload.vendorId)) {
- return {
- status: OCPP16DataTransferStatus.ACCEPTED,
- };
+ return OCPP16Constants.OCPP_DATA_TRANSFER_RESPONSE_ACCEPTED;
}
- return {
- status: OCPP16DataTransferStatus.UNKNOWN_VENDOR_ID,
- };
+ return OCPP16Constants.OCPP_DATA_TRANSFER_RESPONSE_UNKNOWN_VENDOR_ID;
} catch (error) {
return this.handleIncomingRequestError(
chargingStation,
status: TriggerMessageStatus.NOT_IMPLEMENTED,
});
+ static readonly OCPP_DATA_TRANSFER_RESPONSE_ACCEPTED = Object.freeze({
+ status: DataTransferStatus.ACCEPTED,
+ });
+
static readonly OCPP_DATA_TRANSFER_RESPONSE_REJECTED = Object.freeze({
status: DataTransferStatus.REJECTED,
});
+ static readonly OCPP_DATA_TRANSFER_RESPONSE_UNKNOWN_VENDOR_ID = Object.freeze({
+ status: DataTransferStatus.UNKNOWN_VENDOR_ID,
+ });
+
protected constructor() {
// This is intentional
}