/*! Copyright (c) 2018 Siemens AG. Licensed under the MIT License. */ import { Observable } from "rxjs"; import { Controller, IoSource } from ".."; /** * Provides data transfer rate controlled publishing of IO values for * IO sources and monitoring of changes in the association state of IO sources. * * This controller respects the backpressure strategy of an IO source in order to * cope with IO values that are more rapidly produced than specified in the * recommended update rate. */ export declare class IoSourceController extends Controller { private _sourceItems; onInit(): void; onCommunicationManagerStarting(): void; onCommunicationManagerStopping(): void; /** * Schedule the given IO value for publishing on the given IO source. * Values to be pulished may be throttled or sampled according to * the backpressure strategy and the recommended update rate of the IO source. * * If the given IO source is not associated currently, * no publishing takes place. The given IO value is discarded. * * @param source an IO source object * @param value an IO value of the given type */ publish(source: IoSource, value: T): void; /** * Listen to update rate changes for the given IO source. * The returned observable emits distinct rate values until changed. * When the last association becomes disassociated, undefined is emitted. * When subscribed, the current update rate is emitted immediately. * * @param source an IO source object */ observeUpdateRate(source: IoSource): Observable; /** * Listen to associations or disassociations for the given IO source. * The returned observable emits distinct boolean values until changed, i.e * true when the first association is made and false, when the last * association becomes disassociated. * When subscribed, the current association state is emitted immediately. * * @param source an IO source object */ observeAssociation(source: IoSource): Observable; /** * Determines whether the given IO source is currently associated. */ isAssociated(source: IoSource): boolean; private _reregisterAll; private _deregisterAll; private _ensureRegistered; private _onIoStateChanged; private _updateUpdateRateObservable; }