(packet: Packet)
| 353 | } |
| 354 | |
| 355 | private processPacket(packet: Packet) { |
| 356 | if (packet.type === PacketType.SOFTWARE) { |
| 357 | this.processors.forEach((p) => p.softwareEvent(packet)); |
| 358 | } |
| 359 | else if (packet.type === PacketType.HARDWARE) { |
| 360 | this.processors.forEach((p) => p.hardwareEvent(packet)); |
| 361 | if (packet.port === 2) { |
| 362 | if (this.webview) { |
| 363 | const pc = parseUnsigned(packet.data); |
| 364 | const symbol = this.getFunctionAtAddress(pc); |
| 365 | |
| 366 | const message: GrapherProgramCounterMessage = { |
| 367 | type: 'program-counter', |
| 368 | counter: pc, |
| 369 | function: symbol ? symbol.name : '**Unknown**' |
| 370 | }; |
| 371 | this.webview.sendMessage(message); |
| 372 | } |
| 373 | } |
| 374 | else { |
| 375 | // tslint:disable-next-line:no-console |
| 376 | console.log('Received Other Hardware Packet: ', packet); |
| 377 | } |
| 378 | } |
| 379 | } |
| 380 | |
| 381 | private processTimestampPacket(packet: Packet) { |
| 382 | let timestamp = 0; |
nothing calls this directly
no test coverage detected