UNPKG

@kvaser/canking-api

Version:

CanKing API to communicate with the CanKing service using Node.js.

99 lines (98 loc) 3.02 kB
/** * This module includes types to be used in communication with CanKing. * @packageDocumentation */ import { StringsMap } from '../controls'; import { LogFileFormat, MeasurementSetup } from '../protos/measurement_settings'; import Long from 'long'; import DataBuffer, { DataBufferView, IReadOnlyDataBuffer as ReadOnlyDataBuffer } from './DataBuffer'; import electronApiFake, { createElectronApiFake } from './ElectronAPIFake'; import Point from './Point'; export * from '../protos/google/protobuf/empty'; export * from '../protos/common_params'; export * from '../protos/app_params'; export * from '../protos/device_params'; export * from '../protos/frame_params'; export * from '../protos/measurement_params'; export * from '../protos/measurement_settings'; export * from '../protos/signal_params'; export * from '../protos/status_params'; declare const decimalToHex: (d: number, padding?: number, prefix?: boolean) => string; declare const decimalToFixed: (d: number, padding?: number) => string; declare const longToNumber: (value: Long) => number; export { Point, decimalToHex, decimalToFixed, longToNumber, DataBuffer, DataBufferView, electronApiFake, createElectronApiFake, }; export type IReadOnlyDataBuffer<T> = ReadOnlyDataBuffer<T>; /** * Holds data about a log file format. */ export interface ILogFileFormat { format: LogFileFormat; name: string; description: string; extension: string; } export type themes = 'light' | 'dark'; /** * Interface describing the contents of the settings file. */ export interface IUserSettings { version: string; theme: themes; language: string; strings: StringsMap; showToolsPanel: boolean; useHexNumericBase: boolean; maxDataBytes: number; defaultProjectFolder: string; defaultLogFilesFolder: string; defaultCANDatabasesFolder: string; defaultLINDatabasesFolder: string; currentProjectFile: string; currentProjectFileName: string; recentProjectFiles: string[]; closeAppServiceAction: 'prompt' | 'clear' | 'keep'; } /** * Default user setting values. */ export declare const defaultUserSettings: IUserSettings; /** * Data stored by a Workspace. */ export interface IWorkspaceData { id: number; title: string; workspacePaneId: number; } /** * Data stored by a Workspace view. */ export interface IWorkspaceComponentPaneData { componentId: string; componentProps: string; } /** * Data stored by a Workspace view container. */ export interface IWorkspaceContainerPaneData { vertical: boolean; paneDataIds: number[]; paneRatios: number[]; } /** * Data stored by a Workspace pane. */ export interface IWorkspacePaneData { id: number; componentData?: IWorkspaceComponentPaneData; containerData?: IWorkspaceContainerPaneData; } /** * Data stored by the CanKing project. */ export interface IProject { version: number; measurementSetup: MeasurementSetup; workspaces: IWorkspaceData[]; workspacePanes: IWorkspacePaneData[]; }