import Constants from '../utils/Constants';
import FileUtils from '../utils/FileUtils';
import { MessageType } from '../types/ocpp/MessageType';
import Constants from '../utils/Constants';
import FileUtils from '../utils/FileUtils';
import { MessageType } from '../types/ocpp/MessageType';
import OCPP16RequestService from './ocpp/1.6/OCPP16RequestService';
import OCPP16ResponseService from './ocpp/1.6/OCPP16ResponseService';
import OCPPError from './OCPPError';
import OCPP16RequestService from './ocpp/1.6/OCPP16RequestService';
import OCPP16ResponseService from './ocpp/1.6/OCPP16ResponseService';
import OCPPError from './OCPPError';
if (this.isRegistered()) {
await this.startMessageSequence();
this.hasStopped && (this.hasStopped = false);
if (this.isRegistered()) {
await this.startMessageSequence();
this.hasStopped && (this.hasStopped = false);
: 0;
if (webSocketPingInterval > 0 && !this.webSocketPingSetInterval) {
this.webSocketPingSetInterval = setInterval(() => {
: 0;
if (webSocketPingInterval > 0 && !this.webSocketPingSetInterval) {
this.webSocketPingSetInterval = setInterval(() => {
this.wsConnection.ping((): void => { });
}
}, webSocketPingInterval * 1000);
this.wsConnection.ping((): void => { });
}
}, webSocketPingInterval * 1000);
if (!Utils.isNullOrUndefined(this.stationInfo.supervisionUser) && !Utils.isNullOrUndefined(this.stationInfo.supervisionPassword)) {
options.auth = `${this.stationInfo.supervisionUser}:${this.stationInfo.supervisionPassword}`;
}
if (!Utils.isNullOrUndefined(this.stationInfo.supervisionUser) && !Utils.isNullOrUndefined(this.stationInfo.supervisionPassword)) {
options.auth = `${this.stationInfo.supervisionUser}:${this.stationInfo.supervisionPassword}`;
}