Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SourceMergeNode<InOut>

Source merge node. This node merges the data frames from multiple sources into one.

Usage

Merging is done by determining the incoming edges, once the amount of received frames from unique sources is the same as the incoming edges, the frames are merged and pushed.

It is possible to set a timeout, when this timeout is reached the frames that are received are merged and pushed.

When frames of the same source are received they are overridden.

Type parameters

Hierarchy

Index

Constructors

constructor

Properties

graph

graph: any

Graph shape

name

name: string

Name of the node. Does not have to be unique.

Protected options

uid

uid: string = ...

Unique identifier of node.

Readonly Static captureRejectionSymbol

captureRejectionSymbol: typeof captureRejectionSymbol

Static captureRejections

captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

Static defaultMaxListeners

defaultMaxListeners: number

Readonly Static errorMonitor

errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Accessors

inlets

  • get inlets(): Inlet<In>[]

model

  • get model(): Model<any, any>
  • Graph this model is part of

    Returns Model<any, any>

    Positioning model

outlets

  • get outlets(): Outlet<Out>[]

Methods

addListener

  • addListener(event: string | symbol, listener: (...args: any[]) => void): SourceMergeNode<InOut>
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns SourceMergeNode<InOut>

emit

  • emit(name: string | symbol, ...args: any[]): boolean
  • emit(event: "available"): boolean
  • emit(name: "completed", e: PushCompletedEvent): boolean
  • emit(name: "error", e: PushError): boolean
  • emit(name: "ready"): boolean
  • emit(name: "destroy"): boolean

emitAsync

  • emitAsync(type: string | symbol, ...args: any[]): Promise<boolean>

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

Protected findNodeDataService

getMaxListeners

  • getMaxListeners(): number

Protected getNodeData

  • getNodeData(dataObject: DataObject): Promise<any>

getOptions

isAvailable

  • isAvailable(): boolean

isReady

  • isReady(): boolean

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

logger

  • logger(level: string, log: any): void

merge

  • merge(frames: InOut[]): InOut

mergeObjects

mergePositions

off

  • off(event: string | symbol, listener: (...args: any[]) => void): SourceMergeNode<InOut>
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns SourceMergeNode<InOut>

on

once

  • once(name: string | symbol, listener: (...args: any[]) => void): SourceMergeNode<InOut>
  • once(event: "available", listener: () => void | Promise<void>): SourceMergeNode<InOut>
  • once(name: "completed", listener: (event: PushCompletedEvent) => void | Promise<void>): SourceMergeNode<InOut>
  • once(name: "destroy", listener: () => void | Promise<void>): SourceMergeNode<InOut>
  • once(name: "build", listener: (builder: any) => void | Promise<void>): SourceMergeNode<InOut>
  • once(name: "ready", listener: () => void | Promise<void>): SourceMergeNode<InOut>

onceAvailable

  • onceAvailable(): Promise<void>

onceCompleted

  • onceCompleted(frameUID: string): Promise<PushEvent>

prependListener

  • prependListener(event: string | symbol, listener: (...args: any[]) => void): SourceMergeNode<InOut>
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns SourceMergeNode<InOut>

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): SourceMergeNode<InOut>
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns SourceMergeNode<InOut>

process

  • process(frame: InOut, options?: PushOptions): Promise<InOut>

pull

push

  • push(data: InOut | InOut[], options?: PushOptions): Promise<void>

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

removeAllListeners

removeListener

  • removeListener(event: string | symbol, listener: (...args: any[]) => void): SourceMergeNode<InOut>
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns SourceMergeNode<InOut>

setMaxListeners

Protected setNodeData

setOptions

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Static on

  • on(emitter: EventEmitter, event: string): AsyncIterableIterator<any>
  • Parameters

    • emitter: EventEmitter
    • event: string

    Returns AsyncIterableIterator<any>

Static once

  • once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>
  • once(emitter: DOMEventTarget, event: string): Promise<any[]>
  • Parameters

    • emitter: NodeEventTarget
    • event: string | symbol

    Returns Promise<any[]>

  • Parameters

    • emitter: DOMEventTarget
    • event: string

    Returns Promise<any[]>