+ async _stopMessageSequence(reason = ''): Promise<void> {
+ // Stop heartbeat
+ this._stopHeartbeat();
+ // Stop the ATG
+ if (Utils.convertToBoolean(this._stationInfo.AutomaticTransactionGenerator.enable) &&
+ this._automaticTransactionGeneration &&
+ !this._automaticTransactionGeneration.timeToStop) {
+ await this._automaticTransactionGeneration.stop(reason);
+ } else {
+ for (const connector in this._connectors) {
+ if (this.getConnector(Utils.convertToInt(connector)).transactionStarted) {
+ await this.sendStopTransaction(this.getConnector(Utils.convertToInt(connector)).transactionId, reason);
+ }
+ }
+ }
+ }
+