UNPKG

@openhps/core

Version:

Open Hybrid Positioning System - Core component

27 lines 964 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LoggingSinkNode = void 0; const CallbackSinkNode_1 = require("./CallbackSinkNode"); /** * This sink node will serialize the data frames pushed to this * output layer, and log them to the console using the logging function * specified in the constructor. * @category Sink node */ class LoggingSinkNode extends CallbackSinkNode_1.CallbackSinkNode { /** * Create a new logger output sink * @param {Function} loggingFn Logging function * @param {SinkNodeOptions} options Sink node options */ constructor(loggingFn, options) { super(loggingFn, options); if (loggingFn === undefined) { this.callback = (frame) => { this.logger('debug', `Received a data frame in node ${this.uid}`, frame); }; } } } exports.LoggingSinkNode = LoggingSinkNode; //# sourceMappingURL=LoggingSinkNode.js.map