import * as _angular_core from '@angular/core';
import { MeasurementRealtimeService, ManagedObjectRealtimeService, AlarmRealtimeService, EventRealtimeService, OperationRealtimeService } from '@c8y/ngx-components';
import { IManagedObject } from '@c8y/client';
import { AssetPropertyType } from '@c8y/ngx-components/asset-properties';

interface FieldbusDevice extends IManagedObject {
    c8y_ModbusDevice?: {
        address: number;
        protocol: string;
        ipAddress: string;
        /** Reference URL to Fieldbus device type (e.g. /inventory/managedObjects/12345). */
        type: string;
    };
    c8y_CoilStatus?: {
        [name: string]: number;
    };
    c8y_RegisterStatus?: {
        [name: string]: number;
    };
}
interface FieldbusDeviceType extends IManagedObject {
    name: string;
    type: string;
    fieldbusType: string;
    c8y_Coils?: FieldbusCoil[];
    c8y_Registers?: FieldbusRegister[];
}
interface FieldbusCoil {
    number: number;
    name: string;
    input: boolean;
    statusMapping: {
        status: 'read' | 'write';
    };
    enumValues?: {
        [value: number]: string;
    };
    alarmMapping?: {
        severity: 'CRITICAL' | 'MAJOR' | 'MINOR' | 'WARNING';
        type: string;
        text: string;
        raiseAlarmTemplate: number;
    };
}
interface FieldbusRegister {
    number: number;
    input: boolean;
    startBit: number;
    noBits: number;
    name: string;
    multiplier: number;
    divisor: number;
    decimalPlaces: number;
    unit: string;
    signed: boolean;
    min: number;
    max: number;
    category: string;
    measurementMapping?: {
        series: string;
        sendMeasurementTemplate: number;
        type: string;
    };
    statusMapping?: {
        status: 'read' | 'write';
    };
    enumValues?: {
        [value: number]: string;
    };
    eventMapping?: {
        eventTemplate: number;
        type: string;
        text: string;
    };
}
interface LegacyFieldbusProperty {
    fieldbus: true;
    id: string;
    keyPath: [string, string];
    label: string;
}

declare class FieldbusService {
    private inventory;
    private computedProperties;
    getDeviceTypeOf(fieldbusDevice: FieldbusDevice): Promise<FieldbusDeviceType>;
    migrateFieldbusProperty(legacyProperty: LegacyFieldbusProperty, fieldbusDevice: FieldbusDevice): Promise<AssetPropertyType>;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<FieldbusService, never>;
    static ɵprov: _angular_core.ɵɵInjectableDeclaration<FieldbusService>;
}

declare const computedAssetPropertiesProviders: (typeof MeasurementRealtimeService | _angular_core.ValueProvider | _angular_core.ClassProvider | _angular_core.ExistingProvider | typeof ManagedObjectRealtimeService | typeof AlarmRealtimeService | typeof EventRealtimeService | typeof OperationRealtimeService)[];

export { FieldbusService, computedAssetPropertiesProviders };
//# sourceMappingURL=index.d.ts.map
