@@ -29,6+29,7 @@ import { WebSocketCloseEventStatusCode } from '../types/WebSocket';
import crypto from 'crypto';
import fs from 'fs';
import logger from '../utils/Logger';
import crypto from 'crypto';
import fs from 'fs';
import logger from '../utils/Logger';
+import path from 'path';
export default class ChargingStation {
public stationTemplateFile: string;
export default class ChargingStation {
public stationTemplateFile: string;
@@ -223,7+224,7 @@ export default class ChargingStation {
}
}, interval);
} else {
}
}, interval);
} else {
- logger.error(`${this.logPrefix()} Charging station ${StandardParametersKey.MeterValueSampleInterval} configuration set to ${Utils.milliSecondsToHHMMSS(interval)}, not sending MeterValues`);
+ logger.error(`${this.logPrefix()} Charging station ${StandardParametersKey.MeterValueSampleInterval} configuration set to ${interval ? Utils.milliSecondsToHHMMSS(interval) : interval}, not sending MeterValues`);
}
}
}
}
@@ -319,7+320,7 @@ export default class ChargingStation {
}
}
}
}
- public addMessageToBuffer(message: string): void {
+ public addToMessageQueue(message: string): void {
let dups = false;
// Handle dups in buffer
for (const bufferedMessage of this.messageQueue) {
let dups = false;
// Handle dups in buffer
for (const bufferedMessage of this.messageQueue) {
@@ -335,6+336,15 @@ export default class ChargingStation {