The EventSource
class provides methods for monitoring signals.
Inherits From : ISignal
This module exposes no properties.
Method | Description |
---|---|
history | history(framesCount: number): EventSourceHistory Returns an object used to access signal values from past frames. The amount of frames tracked is customizable via framesCount parameter.Historical signal values are going to be initialized with signal value at call time or using initialValues if provided. |
select | select(property: string): EventSource Converts event source by selecting a property in the event object. Events without specified property are ignored. |
skip | skip(count: number): EventSource Yields a filtered event source: the first count events from the original source are dropped, and subsequent ones signaled. |
subscribe | subscribe(callback: (event: mixed) => void): Subscription Sets a callback for the event source. The callback will be invoked every time an event is emitted from this EventSource .See Also: Subscription.unsubscribe .Note: subscribe and subscribeOnNext functions are completely equivalent. |
subscribeOnNext | subscribeOnNext(callback: (event: mixed) => void): Subscription Sets a callback for the event source. The callback will be invoked every time an event is emitted from this EventSource .See Also: Subscription.unsubscribe .Note: subscribe and subscribeOnNext functions are completely equivalent. |
subscribeWithSnapshot | subscribeWithSnapshot(snapshot: { [name: string]: Signal}, callback: (event: mixed, snapshot: mixed) => void): Subscription Sets a callback for the event source, similar to Subscribe function, but with additional Snapshot parameter.Snapshot is a dictionary of String/Bool/Scalar signals, which will be passed as JSON to the callback function using lastValue from requested signals |
take | take(count: number): EventSource Yields a filtered event source: the first count events from the original source are signaled, and subsequent ones ignored. |