import { EncoderDecoder } from "../../core/converter/encoder-decoder.interface";
import { VariableInteraction } from './variable-interaction.interface';
import { MemoryInfo, ModbusOptions, ModbusWriteOptions, MemoryWriteInfo } from "../model";
import { VariableMonitor } from "./monitor/variable-monitor.interface";
import { Response } from "../../client/api/response/response.interface";
export declare abstract class GenericVariableInteraction<DataType> implements VariableInteraction<DataType> {
    protected _monitor?: VariableMonitor<DataType>;
    protected _identifier: string;
    converter?: EncoderDecoder<DataType, Uint8Array>;
    constructor(identifier: string);
    read(): Promise<DataType>;
    write(value: DataType): Promise<any>;
    abstract readRaw(): Promise<Uint8Array>;
    abstract writeRaw(value: Uint8Array): Promise<any>;
    identifier(): string;
    monitor(): VariableMonitor<DataType>;
}
export declare namespace VariableMemory {
    type ServiceType = {
        readAddress: (data: MemoryInfo) => Promise<Response<Uint8Array>>;
        writeAddress: (data: MemoryWriteInfo) => Promise<Response<void>>;
    };
}
export declare class VariableMemory<DataType> extends GenericVariableInteraction<DataType> {
    converter?: EncoderDecoder<DataType, Uint8Array>;
    service: VariableMemory.ServiceType;
    info: MemoryInfo;
    constructor(identifier: string, info: MemoryInfo, service: VariableMemory.ServiceType, converter?: EncoderDecoder<DataType, Uint8Array>);
    static createRaw(identifier: string, info: MemoryInfo, service: VariableMemory.ServiceType): VariableMemory<Uint8Array>;
    static create<DataType>(identifier: string, info: MemoryInfo, service: VariableMemory.ServiceType, converter: EncoderDecoder<DataType, Uint8Array>): VariableMemory<DataType>;
    readRaw(): Promise<Uint8Array>;
    writeRaw(encodedValue: Uint8Array): Promise<any>;
    private static _create;
}
export declare namespace ModbusRegister {
    type ServiceType = {
        modbusRead: (data: ModbusOptions) => Promise<Response<Uint8Array>>;
        modbusWrite: (data: ModbusWriteOptions) => Promise<Response<void>>;
    };
}
export declare class ModbusRegister<DataType> extends GenericVariableInteraction<DataType> {
    converter?: EncoderDecoder<DataType, Uint8Array>;
    service: ModbusRegister.ServiceType;
    info: ModbusOptions;
    constructor(identifier: string, info: ModbusOptions, service: ModbusRegister.ServiceType, converter?: EncoderDecoder<DataType, Uint8Array>);
    readRaw(): Promise<Uint8Array>;
    writeRaw(value: Uint8Array): Promise<void>;
}
export declare namespace VariableConfig {
    type ServiceType = {
        getValue: (id: number) => Promise<Response<Uint8Array>>;
        setValue: (id: number, data: Uint8Array) => Promise<Response<void>>;
    };
}
/**
 * Represents a configured TAP variable
 */
export declare class VariableConfig<DataType> extends GenericVariableInteraction<DataType> {
    converter?: EncoderDecoder<DataType, Uint8Array>;
    service: VariableConfig.ServiceType;
    variableId: number;
    private constructor();
    static createRaw<Uint8Array>(identifier: string, variableId: number, service: VariableConfig.ServiceType): VariableConfig<Uint8Array>;
    static create<DataType>(identifier: string, variableId: number, service: VariableConfig.ServiceType, converter: EncoderDecoder<DataType, Uint8Array>): VariableConfig<DataType>;
    protected static _create<DataType>(identifier: string, variableId: number, service: VariableConfig.ServiceType, converter?: EncoderDecoder<DataType, Uint8Array>): VariableConfig<DataType>;
    readRaw(): Promise<Uint8Array>;
    writeRaw(value: Uint8Array): Promise<void>;
}
