Skip to content

probe-web / @probe-web/client / index / MonitorEvent

Type Alias: MonitorEvent

ts
type MonitorEvent = 
  | {
  kind: "rtt-discovered";
  up: ChannelInfo[];
  down: ChannelInfo[];
}
  | {
  kind: "text";
  channel: number;
  text: string;
}
  | {
  kind: "defmt";
  channel: number;
  lines: {
     level: string | null;
     message: string;
     location: string | null;
  }[];
  malformed: boolean;
}
  | {
  kind: "bytes";
  channel: number;
  bytes: number[];
}
  | {
  kind: "semihosting";
  stream: string;
  data: string;
};

Defined in: index.ts:255

Target output delivered by Session.monitor, Session.listTests and Session.runTest:

  • rtt-discovered: the RTT control block was found; lists its up and down channels.
  • text: output from a String RTT channel.
  • defmt: decoded lines from a Defmt channel (needs Session.setDefmtElf), each with its log level and source location when the firmware recorded them; malformed is set when some frames could not be decoded.
  • bytes: raw data from a BinaryLE channel.
  • semihosting: console output the firmware wrote over semihosting (stream is e.g. stdout).