How to use the node-opcua-common.SubscriptionDiagnosticsDataType function in node-opcua-common

To help you get started, we’ve selected a few node-opcua-common 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
function createSubscriptionDiagnostics(subscription: Subscription): SubscriptionDiagnosticsDataTypePriv {

  assert(subscription instanceof Subscription);

  const subscriptionDiagnostics = new SubscriptionDiagnosticsDataType({});

  const subscription_subscriptionDiagnostics = (subscriptionDiagnostics as any);
  subscription_subscriptionDiagnostics.$subscription = subscription;
  // "sessionId"
  subscription_subscriptionDiagnostics.__defineGetter__("sessionId", function (this: SubscriptionDiagnosticsDataTypePriv) {
    return this.$subscription.getSessionId();
  });
  subscription_subscriptionDiagnostics.__defineGetter__("subscriptionId", function (this: SubscriptionDiagnosticsDataTypePriv) {
    return this.$subscription.id;
  });
  subscription_subscriptionDiagnostics.__defineGetter__("priority", function (this: SubscriptionDiagnosticsDataTypePriv) {
    return this.$subscription.priority;
  });
  subscription_subscriptionDiagnostics.__defineGetter__("publishingInterval", function (this: SubscriptionDiagnosticsDataTypePriv) {
    return this.$subscription.publishingInterval;
  });
github node-opcua / node-opcua / packages / node-opcua-server / src / server_subscription.js View on Github external
function createSubscriptionDiagnostics(self) {

    assert(self instanceof Subscription);

    self.subscriptionDiagnostics = new SubscriptionDiagnosticsDataType({});

    self.subscriptionDiagnostics.$subscription = self;
    // "sessionId"
    self.subscriptionDiagnostics.__defineGetter__("sessionId", function () {
      return this.$subscription.getSessionId();
    });
    self.subscriptionDiagnostics.__defineGetter__("subscriptionId", function () {
        return this.$subscription.id;
    });
    self.subscriptionDiagnostics.__defineGetter__("priority", function () {
        return this.$subscription.priority;
    });
    self.subscriptionDiagnostics.__defineGetter__("publishingInterval", function () {
        return this.$subscription.publishingInterval;
    });
    self.subscriptionDiagnostics.__defineGetter__("maxLifetimeCount", function () {