type Range = [number, number] | [undefined]; export interface APDUTelegramContext { groupAddress?: string; sourceAddress?: string; } export interface FormatAPDUContext extends APDUTelegramContext { dptid?: number | string; logSuffix?: string; } export interface FromBufferContext extends APDUTelegramContext { dptid?: number | string; logSuffix?: string; } interface DatapointSubtype { scalar_range?: Range; name: string; use?: string; desc?: string; force_encoding?: string; unit?: string; enc?: Record; range?: Range; } export interface DatapointConfig { id: string; subtypeid?: string; basetype: { bitlength: number; signedness?: string; range?: Range; valuetype: string; desc?: string; help?: string; helplink?: string; }; subtype?: DatapointSubtype; subtypes?: Record; formatAPDU?: (value: any, context?: FormatAPDUContext) => Buffer | void | null; fromBuffer?: (buf: Buffer, context?: FromBufferContext) => any; } export declare const dpts: Record; export declare function resolve(dptid: string | number): DatapointConfig; export type APDU = { bitlength: number; data: Buffer; }; export interface DptErrorStat { encodeErrors: number; decodeErrors: number; totalErrors: number; lastError: string; lastUpdate: string; } export declare function getDptErrorStats(): Record; export declare function resetDptErrorStats(): void; export declare function populateAPDU(value: any, apdu: APDU, dptid?: number | string, context?: APDUTelegramContext): APDU; export declare function fromBuffer(buf: Buffer, dpt: DatapointConfig, context?: FromBufferContext): number; export {};