X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2Focpp%2FOCPPConstants.ts;h=2da9345563936f545fef5089abd373bc00ebd2a3;hb=481c3802ecbdb0ae3cf75e028c7236f6b9b12671;hp=b94484479a71c0a149267e13529bdfc9a69aba54;hpb=f03e10429357538c286b94a99c9ccc5dfe43b348;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ocpp/OCPPConstants.ts b/src/charging-station/ocpp/OCPPConstants.ts index b9448447..2da93455 100644 --- a/src/charging-station/ocpp/OCPPConstants.ts +++ b/src/charging-station/ocpp/OCPPConstants.ts @@ -7,12 +7,14 @@ import { GenericStatus, TriggerMessageStatus, UnlockStatus, -} from '../../types/ocpp/Responses'; +} from '../../types'; +import { Constants } from '../../utils'; -export default class OCPPConstants { - static readonly OCPP_RESPONSE_EMPTY = Object.freeze({}); - static readonly OCPP_RESPONSE_ACCEPTED = Object.freeze({ status: GenericStatus.ACCEPTED }); - static readonly OCPP_RESPONSE_REJECTED = Object.freeze({ status: GenericStatus.REJECTED }); +export class OCPPConstants { + static readonly OCPP_REQUEST_EMPTY = Constants.EMPTY_FREEZED_OBJECT; + static readonly OCPP_RESPONSE_EMPTY = Constants.EMPTY_FREEZED_OBJECT; + static readonly OCPP_RESPONSE_ACCEPTED = Object.freeze({ status: GenericStatus.Accepted }); + static readonly OCPP_RESPONSE_REJECTED = Object.freeze({ status: GenericStatus.Rejected }); static readonly OCPP_CONFIGURATION_RESPONSE_ACCEPTED = Object.freeze({ status: ConfigurationStatus.ACCEPTED, @@ -87,7 +89,7 @@ export default class OCPPConstants { status: DataTransferStatus.REJECTED, }); - private constructor() { + protected constructor() { // This is intentional } }