UNPKG

@kvaser/canking-api

Version:

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

110 lines (109 loc) 4.69 kB
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import Long from "long"; /** * Possible signal encodings. The value must match the kvadblib value. * * NOTE (known proto3 deviation): The zero value is SIGNAL_ENCODING_INTEL rather than * SIGNAL_ENCODING_UNSPECIFIED because the values are mapped directly to kvadblib constants * (0 = Intel/little-endian). Changing the zero value would require cascading changes * across the service implementation. */ export declare enum SignalEncoding { /** SIGNAL_ENCODING_INTEL - Intel / little endian encoding */ SIGNAL_ENCODING_INTEL = 0, /** SIGNAL_ENCODING_MOTOROLA - Motorola / big endian encoding */ SIGNAL_ENCODING_MOTOROLA = 1, UNRECOGNIZED = -1 } export declare function signalEncodingFromJSON(object: any): SignalEncoding; export declare function signalEncodingToJSON(object: SignalEncoding): string; /** * Possible signal types. The value must match the kvadblib value. * * NOTE (known proto3 deviation): The zero value is SIGNAL_TYPE_INVALID rather than * SIGNAL_TYPE_UNSPECIFIED because the values are mapped directly to kvadblib constants * (0 = invalid/unrecognised type). Changing the zero value would require cascading * changes across the service implementation. */ export declare enum SignalType { SIGNAL_TYPE_INVALID = 0, /** SIGNAL_TYPE_SIGNED - Signed integer */ SIGNAL_TYPE_SIGNED = 1, /** SIGNAL_TYPE_UNSIGNED - Unsigned integer */ SIGNAL_TYPE_UNSIGNED = 2, /** SIGNAL_TYPE_FLOAT - Float, strictly 32 bit long */ SIGNAL_TYPE_FLOAT = 3, /** SIGNAL_TYPE_DOUBLE - Double, strictly 64 bit long */ SIGNAL_TYPE_DOUBLE = 4, UNRECOGNIZED = -1 } export declare function signalTypeFromJSON(object: any): SignalType; export declare function signalTypeToJSON(object: SignalType): string; /** A message that holds information about a signal. */ export interface SignalDefinition { /** The name of the signal. */ name: string; /** The qualified name of the signal. This includes the database name and the message name as a prefix and it can be used to uniquely identify the signal. */ qualifiedName: string; /** A comment for the signal. */ comment: string; /** The encoding of the signal. */ encoding: SignalEncoding; /** The data type of the signal. */ dataType: SignalType; /** The start bit of the signal within the message. */ startbit: number; /** The length of the signal in bits. */ length: number; /** The unit of the signal. */ unit: string; /** The scaling factor for the signal. */ factor: number; /** The offset for the signal. */ offset: number; /** The minimum value of the signal. */ minValue: number; /** The maximum value of the signal. */ maxValue: number; /** The enumeration values for the signal, if it is an enumerated type. */ enumValues: { [key: number]: string; }; /** Whether the signal is the multiplexer signal within a message. */ isMultiplexer: boolean; /** Whether the signal is multiplexed within a message. */ isMultiplexed: boolean; /** The multiplex value for the signal, if it is multiplexed. */ multiplexValue?: number | undefined; } export interface SignalDefinition_EnumValuesEntry { key: number; value: string; } /** A collection of signal definitions. */ export interface SignalDefinitions { /** A list of signal definitions. */ items: SignalDefinition[]; } export declare const SignalDefinition: MessageFns<SignalDefinition>; export declare const SignalDefinition_EnumValuesEntry: MessageFns<SignalDefinition_EnumValuesEntry>; export declare const SignalDefinitions: MessageFns<SignalDefinitions>; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]>; } : Partial<T>; type KeysOfUnion<T> = T extends T ? keyof T : never; type Exact<P, I extends P> = P extends Builtin ? P : P & { [K in keyof P]: Exact<P[K], I[K]>; } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never; }; interface MessageFns<T> { encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; fromJSON(object: any): T; toJSON(message: T): unknown; create<I extends Exact<DeepPartial<T>, I>>(base?: I): T; fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T; } export {};