import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import Long from "long"; import { Frame, FrameDefinition } from "./frame_params"; import { FramePropertyNames } from "./measurement_params"; import { CanMessageFilterSettings, DatabasesSettings, LogFileFormat, ServiceExtensionSettings } from "./measurement_settings"; /** * Possible kinds of an analysis session's underlying log file content. * @internal */ export declare enum AnalysisLogKind { ANALYSIS_LOG_KIND_UNSPECIFIED = 0, /** ANALYSIS_LOG_KIND_MESSAGE_LOG - The log file contains raw message/frame data (e.g. KME, ASC, BLF). */ ANALYSIS_LOG_KIND_MESSAGE_LOG = 1, /** ANALYSIS_LOG_KIND_SIGNAL_LOG - The log file contains pre-decoded signal values with no frame structure (e.g. CSV_SIGNAL, MDF_SIGNAL). */ ANALYSIS_LOG_KIND_SIGNAL_LOG = 2, UNRECOGNIZED = -1 } export declare function analysisLogKindFromJSON(object: any): AnalysisLogKind; export declare function analysisLogKindToJSON(object: AnalysisLogKind): string; /** * A request message to open a log file for analysis. * @internal */ export interface OpenAnalysisSessionRequest { /** Full path to the log file to open. Must be a path reachable by CanKingService (see FileSystemService for remote browsing). */ logFile: string; } /** * A response message for the OpenAnalysisSession request. * @internal */ export interface OpenAnalysisSessionResponse { /** Unique identifier of the newly opened analysis session. Use this identifier in all subsequent calls for this session. */ sessionId: string; /** Detected file format. */ format: LogFileFormat; /** Whether the file is a message log or a signal log. */ kind: AnalysisLogKind; /** Channel numbers found in the file (cheap up-front scan, message logs only). */ channels: number[]; /** Channel protocols found in the file, same order/length as channels (message logs only). */ protocols: string[]; /** True if the log file contains received frames. */ hasRxFrames: boolean; /** True if the log file contains transmitted frames. */ hasTxFrames: boolean; /** Total number of frames/rows in the file, if cheaply known up front; otherwise unset. */ totalEventCount?: Long | undefined; /** Absolute start-of-measurement timestamp (nanoseconds since 1 Jan 1970). */ startOfMeasurement?: Long | undefined; /** For signal logs: the qualified names of signals found in the file (no database needed, they come from the file's own header). */ signalQualifiedNames: string[]; } /** * A message for defining one stage of an analysis session's data-processing pipeline. * The pipeline is a strict, non-branching, ordered sequence of steps (no arbitrary graph like the live * measurement setup) - order is determined purely by position in the SetAnalysisProcessingRequest.steps list. * @internal */ export interface AnalysisProcessingStep { /** Decode frames into signals using one or more DBC/LDF database files. */ databasesSettings?: DatabasesSettings | undefined; /** Pass/block frames based on CAN identifier. */ canMessageFilterSettings?: CanMessageFilterSettings | undefined; /** A data-processor extension. Hosted without a live MeasurementManager (no live bus access) when used in analysis. */ extensionSettings?: ServiceExtensionSettings | undefined; } /** * A message describing an error that occurred while applying one step of an analysis session's processing pipeline. * @internal */ export interface StepError { /** Index into the steps list (from the request that produced this error) of the step that failed. */ stepIndex: number; /** A human readable error message. */ error: string; } /** * A request to replace the entire data-processing pipeline for an analysis session. * @internal */ export interface SetAnalysisProcessingRequest { /** The analysis session identifier. */ sessionId: string; /** * The full, ordered list of processing steps to apply, from first (closest to the file) to last (closest to display). * Replaces any previously configured pipeline for this session. An empty list removes all processing. */ steps: AnalysisProcessingStep[]; } /** * A response for the SetAnalysisProcessing request. * @internal */ export interface SetAnalysisProcessingResponse { /** * Errors detected while applying individual steps (e.g. a missing database file or an invalid filter), keyed by step index. * A step with an error is skipped (passes frames through unmodified) rather than failing the whole pipeline. */ stepErrors: StepError[]; /** * Frame definitions resulting from any databases steps in the pipeline, if any. Mirrors GetFrameDefinitions. * Nothing has been read at this point, so every channel in the file is listed as a possible source for every * definition; a read that covers the whole file replaces these, see AnalysisFrames.frame_definitions. */ frameDefinitions: FrameDefinition[]; /** * Map of extension name (AnalysisProcessingStep.extension_settings.extension_name) to the frame property names * that extension's step(s) may contribute to processed frames, for any extension steps in the pipeline. Lets * clients discover extension-contributed columns up front, mirroring MeasurementService's * GetAvailableFramePropertyNames, instead of having to scan already-fetched frames for property names. */ framePropertyNamesByExtension: { [key: string]: FramePropertyNames; }; } export interface SetAnalysisProcessingResponse_FramePropertyNamesByExtensionEntry { key: string; value: FramePropertyNames | undefined; } /** * A request to get frames from an analysis session before a specific timestamp, processed through the session's pipeline. * @internal */ export interface GetAnalysisFramesBeforeTimestampRequest { /** The analysis session identifier. */ sessionId: string; /** Timestamp in microseconds to retrieve frames before (exclusive). */ timestampUs: Long; /** Maximum number of frames to return. */ maxCount: number; } /** * A request to get frames from an analysis session after a specific timestamp, processed through the session's pipeline. * @internal */ export interface GetAnalysisFramesAfterTimestampRequest { /** The analysis session identifier. */ sessionId: string; /** Timestamp in microseconds to retrieve frames after (exclusive). */ timestampUs: Long; /** Maximum number of frames to return. */ maxCount: number; } /** * A request to get frames from an analysis session between two timestamps, processed through the session's pipeline. * @internal */ export interface GetAnalysisFramesBetweenTimestampsRequest { /** The analysis session identifier. */ sessionId: string; /** Timestamp in microseconds to retrieve frames from (inclusive). */ startTimestampUs: Long; /** Timestamp in microseconds to retrieve frames to (exclusive). */ endTimestampUs: Long; /** Maximum number of frames to return. */ maxCount: number; } /** * A chunk of frames from an analysis session, together with any frame definition updates learned while reading them. * @internal */ export interface AnalysisFrames { /** The frames in this chunk, in ascending timestamp order. */ items: Frame[]; /** * Frame definitions whose source_identifiers have been narrowed to the sources their frames were actually seen on * in the log file, replacing the ones returned by SetAnalysisProcessing (which has to assume that every channel in * the file is a possible source for every definition). A definition whose frames were not seen at all is left out * entirely rather than sent with an empty source_identifiers, since the whole file has been read at that point and * it can never gain a source to be read from. Only set on the last message of the stream, and only once the session * has read its whole file at least once with the pipeline currently configured - until then the observed sources are * only a lower bound that can still grow, so nothing is sent rather than a set that would wrongly narrow. Set again * on every later read that covers the whole file, since a pipeline change resets the observation. An empty list * therefore means "no update", which is also all a client sees in the corner case where the whole file has been read * and not one definition's frames were in it. */ frameDefinitions: FrameDefinition[]; } /** * A request to get downsampled signal time-series data (min/max per pixel bucket) for a signal plot from an * analysis session. Works for signal log sessions directly, and for message log sessions with databases attached. * @internal */ export interface GetAnalysisSignalEnvelopesRequest { /** The analysis session identifier. */ sessionId: string; /** * Qualified names of the signals to retrieve envelopes for. If empty, all available signals are returned * (message logs: all signals decodable via attached databases; signal logs: all signals in the file). */ signalQualifiedNames: string[]; /** Timestamp in microseconds to retrieve envelopes from (inclusive). */ startTimestampUs: Long; /** Timestamp in microseconds to retrieve envelopes to (exclusive). */ endTimestampUs: Long; /** Width of the view in pixels, used to determine the downsampling bucket size. */ viewWidthPx: number; /** * Identifiers of the source to read each signal from, should be in the same order with the same length as * signal_qualified_names. An empty entry means any source, i.e. the signal's values are merged across every source * it was decoded from. Requesting the same qualified name several times with different source identifiers yields one * envelope per source. Ignored when signal_qualified_names is empty. */ sourceIdentifiers: string[]; } /** * A data envelope for a single signal across a requested time range, downsampled to one min/max pair per bucket. * @internal */ export interface AnalysisSignalEnvelope { /** Signal qualified name. */ signalQualifiedName: string; /** Timestamps in microseconds, one per bucket. */ timestampsUs: Long[]; /** Minimum values, one per bucket. */ minValues: number[]; /** Maximum values, one per bucket. */ maxValues: number[]; /** * Identifier of the source the values were decoded from. Empty when the request did not restrict this signal to a * single source, in which case the values are merged across every source the signal was decoded from. */ sourceIdentifier: string; } /** * A response for the GetAnalysisSignalEnvelopes request. * @internal */ export interface GetAnalysisSignalEnvelopesResponse { /** Envelopes for all requested (or all available) signals. */ envelopes: AnalysisSignalEnvelope[]; /** * Frame definitions with source_identifiers narrowed to the sources actually seen in the file, and definitions * never seen at all left out, with exactly the same meaning and conditions as AnalysisFrames.frame_definitions - * building envelopes reads the file, so it learns the same thing a frame fetch does. */ frameDefinitions: FrameDefinition[]; } /** * A request to close an analysis session and free its server-side resources. * @internal */ export interface CloseAnalysisSessionRequest { /** The analysis session identifier. */ sessionId: string; } /** * Summary info about an open analysis session. * @internal */ export interface AnalysisSessionInfo { /** The analysis session identifier. */ sessionId: string; /** Full path to the underlying log file. */ logFile: string; /** Detected file format. */ format: LogFileFormat; /** Whether the file is a message log or a signal log. */ kind: AnalysisLogKind; /** UTC time in seconds since epoch when this session was opened. */ openedAtUnixS: Long; } /** * A response for the ListAnalysisSessions request. * @internal */ export interface ListAnalysisSessionsResponse { /** Currently open sessions. */ sessions: AnalysisSessionInfo[]; } export declare const OpenAnalysisSessionRequest: MessageFns; export declare const OpenAnalysisSessionResponse: MessageFns; export declare const AnalysisProcessingStep: MessageFns; export declare const StepError: MessageFns; export declare const SetAnalysisProcessingRequest: MessageFns; export declare const SetAnalysisProcessingResponse: MessageFns; export declare const SetAnalysisProcessingResponse_FramePropertyNamesByExtensionEntry: MessageFns; export declare const GetAnalysisFramesBeforeTimestampRequest: MessageFns; export declare const GetAnalysisFramesAfterTimestampRequest: MessageFns; export declare const GetAnalysisFramesBetweenTimestampsRequest: MessageFns; export declare const AnalysisFrames: MessageFns; export declare const GetAnalysisSignalEnvelopesRequest: MessageFns; export declare const AnalysisSignalEnvelope: MessageFns; export declare const GetAnalysisSignalEnvelopesResponse: MessageFns; export declare const CloseAnalysisSessionRequest: MessageFns; export declare const AnalysisSessionInfo: MessageFns; export declare const ListAnalysisSessionsResponse: MessageFns; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; type KeysOfUnion = T extends T ? keyof T : never; type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact; } & { [K in Exclude>]: never; }; interface MessageFns { encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; fromJSON(object: any): T; toJSON(message: T): unknown; create, I>>(base?: I): T; fromPartial, I>>(object: I): T; } export {};