Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
-Subproject commit b042164ef7144070be0fe1af2ce310bc512803aa
+Subproject commit c08cc2beb3cbed8907a2f1c84ea7bc698131714c
-import Constants from './Constants';
export default class CircularArray<T> extends Array<T> {
public size: number;
+ private readonly MAXIMUM_CIRCULAR_ARRAY_SIZE = 2000;
- constructor(size: number = Constants.MAXIMUM_MEASUREMENTS_NUMBER) {
+ constructor(size?: number) {
super();
- this.size = size;
+ this.size = size && size <= this.MAXIMUM_CIRCULAR_ARRAY_SIZE ? size : this.MAXIMUM_CIRCULAR_ARRAY_SIZE;
}
push(...items: T[]): number {
static readonly CHARGING_STATION_DEFAULT_RESET_TIME = 60000; // Ms
static readonly CHARGING_STATION_ATG_WAIT_TIME = 2000; // Ms
- static readonly MAXIMUM_MEASUREMENTS_NUMBER = 2000;
-
static readonly TRANSACTION_DEFAULT_IDTAG = '00000000';
}