UNPKG

typed-ocpp

Version:

A library for type-aware parsing, serialization and validation of OCPP 1.6, OCPP 2.0 and OCPP 2.1 messages

46 lines (45 loc) 2.08 kB
import type { Schedule, CloneDataFn, MergeDataFn, MaybeSchedule } from '../schedule/schedule.js'; import type { Models } from '../models.js'; import type { ChargingLimits } from '../utils.js'; export interface ChargingContext { model: Models.EnergyExchange; } /** * Specializes the generic `Schedule` type into a schedule of periods described * by `ExchangeLimits` objects. */ export type ChargingSchedule = Schedule<ChargingLimits>; /** * Specializes the generic `MaybeSchedule` type into a schedule of periods * described by `ExchangeLimits` objects. */ export type MaybeChargingSchedule = MaybeSchedule<ChargingLimits>; /** * Cloning function for use with scheduling methods in `./schedule.ts` that * returns a deep copy of the provided `ExchangeLimits` object. */ export declare const cloneChargingLimits: CloneDataFn<ChargingLimits>; /** * Merging function for use with scheduling methods in `./schedule.ts` that * returns a deep copy of the provided `right` instance of `ExchangeLimits`. * Semantically, this can be used to merge two exchange schedules in a manner * that sets the limits of overlapping periods to those from the `right` * schedule. */ export declare const mergeChargingLimitsRight: MergeDataFn<ChargingLimits>; /** * Merging function for use with scheduling methods in `./schedule.ts` that * returns a new `ExchangeLimits` object computed as the convervative minimum * between `left` and `right`. Semantically, this can be used to merge two * schedules in a manner that sets the limits of overlapping periods to the * minimum values between both. */ export declare const mergeChargingLimitsMin: MergeDataFn<ChargingLimits>; /** * Merging function for use with scheduling methods in `./schedule.ts` that * returns a new `ExchangeLimits` object computed as the logical sum of the * limits in `left` and `right`. Semantically, this can be used to merge two * exchange schedules in a manner that composes limits of overlapping periods * via addition. */ export declare const mergeChargingLimitsAdd: MergeDataFn<ChargingLimits>;