MCPcopy Create free account
hub / github.com/Marus/cortex-debug / getTxString

Method getTxString

src/frontend/swo/sources/socket.ts:213–225  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

211 }
212
213 public getTxString(): string {
214 const header = Buffer.alloc(32);
215 header.writeUInt32BE(1, 0 * 4); // No idea seems to always be 1
216 header.writeUInt32BE(1, 1 * 4); // No idea seems to always be 1
217 header.writeUInt32BE(PeHeaderType.TX_COMMAND, 2 * 4); // packet type
218 header.writeUInt32BE(this.sequence, 3 * 4); // Sequence number
219 header.writeUInt32BE(PeMicroHeader.headerLength + this.dataLength, 4 * 4); // Size
220 header.writeUInt32BE(0, 5 * 4); // No idea seems to always be 0
221 header.writeUInt32BE(0, 6 * 4); // No idea seems to always be 0
222 header.writeUInt32BE(0, 7 * 4); // No idea seems to always be 0
223 const decoder = new TextDecoder();
224 return decoder.decode(header);
225 }
226}
227
228enum PeState {

Callers 1

writeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected