import { IAccessor } from '@iotize/common/data-accessor';
import { ApplicationConfig, BleProtocolConfig, BundleConfig, CanConfig, CloudConfig, EthernetConfig, HostProtocolConfig, JvmConfig, LoraProtocolConfig, MCUTargetProtocolConfig, ModbusConfig, ModbusTcpConfig, MqttProtocolConfig, NfcProtocolConfig, S3PConfig, SerialConfig, SlaveServerConfig, SpecialProfileConfig, TapConfig, TapnpassProtocolConfigurationConfig, TapOptions, TapTimeConfig, TargetConfig, UserConfig, VariableConfig, WifiProtocolConfig, WirelessOptionsConfig } from '@iotize/tap/config/schema/v1';
import { TapnpassProtocolConfigurationConverter } from '@iotize/tap/service/all';
export declare namespace IoTizeStudioToTapConfigConverter {
    interface Options {
        /**
         * If strict mode is enabled, it will throw an
         * error when an invalid value for the configuration is detected.
         * If not enabled, errors will be stored as warnings
         */
        strict: boolean;
    }
    interface Host {
        getFileContent(path: string): Uint8Array;
    }
}
export declare function xmlToJson(xml: string): any;
export declare function convertIoTizeStudioConfigToTapConfig(fileContent: string): TapConfig;
export declare function decodeInitialVariableValue(value: string): string | number | (string | number)[] | undefined;
/**
 * Convert an IoTize studio configuration file to TapConfiguratorConfig
 */
export declare class IoTizeStudioToTapConfigConverter {
    options: IoTizeStudioToTapConfigConverter.Options;
    host?: IoTizeStudioToTapConfigConverter.Host | undefined;
    /**
     * Errors reported during convertion when strict mode is disabled
     */
    readonly warnings: {
        message: string;
        error: Error;
    }[];
    modbusSerialConfigConverter: TapnpassProtocolConfigurationConverter;
    constructor(options?: IoTizeStudioToTapConfigConverter.Options, host?: IoTizeStudioToTapConfigConverter.Host | undefined);
    convert(root: IAccessor): TapConfig;
    private reportError;
    readSlaveServerConfig(appConfig: IAccessor | undefined): SlaveServerConfig | undefined;
    readMqttConfig(cloudServicesConfig: IAccessor | undefined): MqttProtocolConfig | undefined;
    readLoraConfig(appConfigNode: IAccessor): LoraProtocolConfig;
    readBleConfig(appConfigNode: IAccessor): BleProtocolConfig | undefined;
    readNfcConfig(appConfigNode: IAccessor): NfcProtocolConfig;
    readWifiConfig(wifiConfigNode: IAccessor | undefined): WifiProtocolConfig | undefined;
    private toAuthorizedHostProtocols;
    readAuthorizedHostProtocols(appConfigNode: IAccessor): HostProtocolConfig[] | undefined;
    readWirelessOptionsConfig(appConfigNode: IAccessor): WirelessOptionsConfig;
    readJvmConfig(config: IAccessor): JvmConfig | undefined;
    readEthernetConfig(accessor: IAccessor): EthernetConfig | undefined;
    readFileContentAsHexString(path: string | undefined): string | undefined;
    readCloudConfig(appConfigNode: IAccessor): CloudConfig | undefined;
    readApplicationConfig(appConfigNode: IAccessor): ApplicationConfig;
    readTapConfig(appConfigNode: IAccessor): TapOptions;
    readTapTimeConfig(appConfigNode: IAccessor): TapTimeConfig | undefined;
    readTargetConfig(appConfig: IAccessor): TargetConfig | undefined;
    readTargetProtocol(appConfig: IAccessor): "NONE" | "CUSTOM" | "SWD" | "S3P" | "JTAG" | "MODBUS" | "SERIAL" | "CAN" | "MODBUS_TCP" | "DIRECT_IO" | undefined;
    readTapnpassTargetProtocol(appConfig: IAccessor): {
        type: string;
        config: TapnpassProtocolConfigurationConfig;
    };
    readTapnpassTargetProtocolConfig(appConfig: IAccessor): TapnpassProtocolConfigurationConfig;
    readMCUTargetProtocol(appConfig: IAccessor): MCUTargetProtocolConfig | undefined;
    readSerialProtocolConfig(appConfig: IAccessor): SerialConfig | undefined;
    readS3PProtocolConfig(appConfig: IAccessor): S3PConfig;
    /**
     * CAN_Freqkbps="0" CAN_Mode="1" CAN_Filter="1" CAN_Code="305419896" CAN_Mask="2596069104"
     * @param appConfig
     * @returns
     */
    readCanProtocolConfig(appConfig: IAccessor): CanConfig;
    readModbusTcpProtocolConfig(node: IAccessor): ModbusTcpConfig | undefined;
    readModbusProtocolConfig(appConfig: IAccessor): {
        modbus: ModbusConfig;
        serial: SerialConfig;
    } | undefined;
    toEnumKey<ValueType extends string | number | symbol, MappingType>(value: ValueType, mapping: MappingType): keyof MappingType;
    readProfilesConfig(profiles: IAccessor[]): (UserConfig | SpecialProfileConfig)[];
    readUserKey(xmlProfile: IAccessor): string | undefined;
    readUserProfile(subProfilesConfig: IAccessor[]): UserConfig[];
    readBundlesConfig(xmlBundles: IAccessor[]): BundleConfig[];
    private readSpecialFeatures;
    readVariablesConfig(variables: IAccessor[]): VariableConfig[];
    private _protocolDataToJsonConfig;
}
