(decoders: any[])
| 474 | } |
| 475 | |
| 476 | export function calculatePortMask(decoders: any[]) { |
| 477 | if (!decoders) { return 0; } |
| 478 | |
| 479 | let mask: number = 0; |
| 480 | decoders.forEach((d) => { |
| 481 | if (d.type === 'advanced') { |
| 482 | for (const port of d.ports) { |
| 483 | mask = (mask | (1 << port)) >>> 0; |
| 484 | } |
| 485 | } |
| 486 | else { |
| 487 | mask = (mask | (1 << d.port)) >>> 0; |
| 488 | } |
| 489 | }); |
| 490 | return mask; |
| 491 | } |
| 492 | |
| 493 | export function createPortName(procNum: number, prefix: string = 'gdbPort'): string { |
| 494 | return prefix + ((procNum === 0) ? '' : procNum.toString()); |
no outgoing calls
no test coverage detected