import { VariableConfigPredefined } from './config/variable-config';
import { VariableConfig, VariableMemory, ModbusRegister } from "./variable";
import { Tap } from '../iotize-device';
import { VariableInteraction } from './variable-interaction.interface';
import { MemoryInfo, ModbusOptions } from '../model';
import { EncoderDecoder } from '../../core';
export declare class VariableManager {
    protected device: Tap;
    readonly variableConfig: VariableConfigPredefined<any>[];
    _variables: {
        [key: number]: VariableInteraction<any>;
    };
    constructor(device: Tap);
    static fromVariableConfig(tap: Tap, meta: VariableConfigPredefined<any>[]): VariableManager;
    readonly variables: {
        [key: number]: VariableInteraction<any>;
    };
    /**
     * Get variable by name
     * If it does not exist, it will throw an error
     */
    get<DataType>(identifier: string): VariableInteraction<DataType>;
    /**
     * Check is manager has variable
     * @param identifier variable identifier
     * @returns true if the variable exists
     */
    has<DataType>(identifier: string): boolean;
    /**
     * Get variable by name
     * If it does not exist, it will throw an error
     *
     * TODO remove as it's a duplicate of get()
     * @deprecated will be removed. Use {@link #get()} instead
     */
    variable<DataType>(identifier: string): VariableInteraction<DataType>;
    /**
     * Get variable by id
     * If it does not exist, it will throw an error
     */
    getById(id: number | string): VariableInteraction<any>;
    getConfiguredVariables(): Promise<VariableConfig<any>[]>;
    /**
     * Get variable by id
     * If it does not exist, it will throw an error
     */
    getConfiguredVariable<T>(id: number): Promise<VariableConfig<T>>;
    createFromConfig<DataType>(config: VariableConfigPredefined<DataType>): VariableConfig<DataType>;
    addFromVariableConfig<Datatype = any>(metas: VariableConfigPredefined<Datatype> | VariableConfigPredefined<Datatype>[]): this;
    addFromConfig<Datatype>(config: VariableConfigPredefined<Datatype> | VariableConfigPredefined<Datatype>[]): this;
    createFromMemoryAddress<DataType>(identifier: string, memoryInfo: MemoryInfo, converter?: EncoderDecoder<DataType, Uint8Array>): VariableMemory<DataType>;
    addFromMemoryAddress<DataType>(identifier: string, memoryInfo: MemoryInfo, converter?: EncoderDecoder<DataType, Uint8Array>): this;
    createFromModbusRegister<DataType>(identifier: string, modbusOptions: ModbusOptions, converter?: EncoderDecoder<DataType, Uint8Array>): ModbusRegister<DataType>;
    addFromModbusRegister<DataType>(identifier: string, modbusOptions: ModbusOptions, converter?: EncoderDecoder<DataType, Uint8Array>): this;
    addVariable(...variables: VariableInteraction<any>[]): this;
    /**
     * @deprecated use addFromConfig instead
     *
     * @param identifier variable identifier
     * @param configOrVariable
     */
    add(identifier: string, configOrVariable: VariableConfigPredefined<any>): this;
    clear(): void;
    /**
     * Get variable by name
     * If it does not exist, it will throw an error
     */
    protected variableByName(identifier: string): VariableInteraction<any>;
}
