@openhps/core
Version:
Open Hybrid Positioning System - Core component
24 lines • 852 B
JavaScript
import { FrameMergeNode } from './FrameMergeNode';
/**
* 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.
* @rdf {@link http://purl.org/poso/HighLevelFusion}
* @category Flow shape
*/
export class SourceMergeNode extends FrameMergeNode {
constructor(options) {
super(frame => {
if (frame.source === undefined) {
return null;
}
return frame.source.uid;
}, frame => frame.uid, options);
}
}