How to use the node-opcua-types.MonitoredItemCreateResult function in node-opcua-types

To help you get started, we’ve selected a few node-opcua-types examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github node-opcua / node-opcua / packages / node-opcua-server / source / server_subscription.ts View on Github external
// reincorporate monitoredItemId and itemToMonitor into the requestedParameters
    const options = requestedParameters as any as MonitoredItemOptions;

    options.monitoredItemId = monitoredItemId;
    options.itemToMonitor = itemToMonitor;

    const monitoredItem = new MonitoredItem(options);
    monitoredItem.timestampsToReturn = timestampsToReturn;
    monitoredItem.$subscription = this;

    assert(monitoredItem.monitoredItemId === monitoredItemId);
    this.monitoredItems[monitoredItemId] = monitoredItem;

    const filterResult = _process_filter(node, requestedParameters.filter);

    const monitoredItemCreateResult = new MonitoredItemCreateResult({
      filterResult,
      monitoredItemId,
      revisedQueueSize: monitoredItem.queueSize,
      revisedSamplingInterval: monitoredItem.samplingInterval,
      statusCode: StatusCodes.Good
    });
    return monitoredItemCreateResult;
  }
github node-opcua / node-opcua / packages / node-opcua-server / source / server_subscription.ts View on Github external
function handle_error(statusCode: StatusCode): MonitoredItemCreateResult {
      return new MonitoredItemCreateResult({ statusCode });
    }