()
| 63 | } |
| 64 | |
| 65 | writeNextCommand() { |
| 66 | if (this.commandIndex < this.commandQueue.length) { |
| 67 | const cmd = this.commandQueue[this.commandIndex++]; |
| 68 | this.stream.write(cmd + "\n"); |
| 69 | |
| 70 | if (this.commandIndex < this.commandQueue.length) { |
| 71 | setTimeout(() => this.writeNextCommand(), 50); |
| 72 | } |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | onData(data) { this.processOutput(data.toString()); } |
| 77 |