'use strict'; const { BaseNodeAdapter } = require('generalFunctions'); const Settler = require('./specificClass'); const commands = require('./commands'); // settler is event-driven on Port 0: the 3-stream Fluent envelope is // re-emitted whenever the upstream reactor fires stateChange or an // operator pushes data.influent. Port 1 (InfluxDB telemetry) reuses the // base `output-changed` pipeline via `getOutput()`. `tickInterval=null` // means BaseNodeAdapter installs no periodic loop — settling state has // no time-dependent integrator. class nodeClass extends BaseNodeAdapter { static DomainClass = Settler; static commands = commands; static tickInterval = null; static statusInterval = 1000; buildDomainConfig() { return {}; } _emitOutputs() { if (!this.source) return; const fluent = this.source.getEffluent; const raw = this.source.getOutput?.() || {}; const cfg = this.source.config || this.config; const influxMsg = this._output.formatMsg(raw, cfg, 'influxdb'); this.node.send([fluent, influxMsg, null]); } } module.exports = nodeClass;