import { Observable } from 'rxjs';
import { TLVConverter } from '../../client/impl/converter/tlv-converter';
import { EncoderDecoder } from '../../core/converter/encoder-decoder.interface';
import { TlvBundleConverter } from '../extra-converter/TlvBundleConverter';
import { Tap } from '../iotize-device';
import { SinglePacketConverter } from '../converter';
import { BundleManager, BundleConfigPredefined } from '../target-variable/bundle-manager';
import { SinglePacket } from '../model';
import { VariableManager } from '../target-variable';
/**
 * Experimental data logger class
 *
 * @experimental
 */
export declare class DataLogger {
    private tap;
    converter: DataLogPacketConverter;
    options: DataLogger.Options;
    private source;
    constructor(tap: Tap, converter: DataLogPacketConverter, options: DataLogger.Options);
    static fromTap(tap: Tap, options: DataLogger.Options): DataLogger;
    dequeue(): Promise<DataLogger.PacketInfo>;
    getPacketCount(): Promise<number>;
    download(): Observable<DataLogger.DownloadEvent>;
}
export declare namespace DataLogger {
    interface Options {
        period: number;
    }
    interface DownloadEvent {
        type: string;
        payload?: any;
        error?: Error;
    }
    interface RawPacket {
        _raw?: Uint8Array;
        bundle: {
            id: number;
            logTime?: Date;
            [key: string]: any;
        };
        rawVariables: Record<number, Uint8Array>;
    }
    interface Packet<T extends Record<string, any>> extends RawPacket {
        bundle: {
            id: number;
            logTime?: Date;
            name?: string;
        };
        variables: T;
    }
    interface PacketInfo<T = Record<string, any>> {
        singlePacket: SinglePacket;
        rawSinglePacket: Uint8Array;
        packet: Packet<T>;
    }
    class CannotDecodePacketError extends Error {
        singlePacket: SinglePacket;
        cause: Error;
        constructor(singlePacket: SinglePacket, cause: Error);
    }
}
/**
 *
 * @experimental
 */
export declare class RawPacketConverter implements EncoderDecoder<DataLogger.RawPacket, Uint8Array> {
    tlvConverter: TLVConverter;
    bundleConverter: TlvBundleConverter<Record<string, Uint8Array>>;
    singlePacketConverter: SinglePacketConverter;
    constructor(tlvConverter?: TLVConverter, bundleConverter?: TlvBundleConverter<Record<string, Uint8Array>>, singlePacketConverter?: SinglePacketConverter);
    encode(data: DataLogger.RawPacket): Uint8Array;
    decode(data: Uint8Array): DataLogger.RawPacket;
}
/**
 *
 * @experimental
 */
export declare class DataLogPacketConverter<T = Record<string, any>> implements EncoderDecoder<DataLogger.PacketInfo<T>, {
    raw: Uint8Array;
    singlePacket: SinglePacket;
}> {
    meta?: BundleConfigPredefined[] | undefined;
    rawPacketConverter: RawPacketConverter;
    constructor(meta?: BundleConfigPredefined[] | undefined, rawPacketConverter?: RawPacketConverter);
    static createFromManager<T = Record<string, any>>(bundleManager: BundleManager, variableManager: VariableManager): DataLogPacketConverter<T>;
    static createFromMeta<T>(meta: BundleConfigPredefined[], rawPacketConverter?: RawPacketConverter): DataLogPacketConverter<T>;
    encode(type: DataLogger.PacketInfo<T>): {
        raw: Uint8Array;
        singlePacket: SinglePacket;
    };
    decode(data: {
        raw: Uint8Array;
        singlePacket: SinglePacket;
    }): DataLogger.PacketInfo<T>;
}
/**
 *
 * @experimental
 */
export declare function populateDataLogPacket<T extends Record<string, any>>(rawDataLogPacket: DataLogger.RawPacket, meta: BundleConfigPredefined[]): DataLogger.Packet<T>;
