import { JDBus } from "../bus"; import { JDFrameBuffer, Packet } from "../packet"; import { PrintPacketOptions } from "../pretty"; /** * Collect stack trace at the current execution position * @returns * @internal */ export declare function stack(): string; /** * @internal */ export declare function cleanStack(text: string): string; export declare function serializeToTrace(frame: JDFrameBuffer, start?: number, bus?: JDBus, options?: PrintPacketOptions): string; /** * A sequence of packets. * @category Trace */ export declare class Trace { frames: JDFrameBuffer[]; readonly id: string; readonly maxLength: number; readonly description: string; private resolutionBus; /** * Constructs a new empty trace or from an existing list of packets * @param frames list of frames/packets * @param description description of the trace */ constructor(frames?: JDFrameBuffer[], options?: { description?: string; maxLength?: number; }); /** * Number of packets in trace */ get length(): number; /** * Duration in milliseconds between the first and last packet. */ get duration(): number; /** * _jacdac_timestamp of the first packet, defaults to 0 if trace is empty. */ get startTimestamp(): number; /** * _jacdac_timestamp of the last packet, defaults to 0 if trace is empty. */ get endTimestamp(): number; /** * Appends a frame to the trace * @param frame frame/packet to add */ addFrame(frame: JDFrameBuffer): void; /** * Gets a text-rendered view of the trace * @param length maximum number of elements * @returns text where each line is a packet */ serializeToText(length?: number): string; resolveDevices(bus: JDBus): void; toPackets(bus?: JDBus): Packet[]; } //# sourceMappingURL=trace.d.ts.map