onvif
    Preparing search index...

    Class Subscription

    Subscription to events class data - emitted when event is received error - emitted when error occurs

      const sub = new Subscription(cam, 'pullPoint', {
    filter: {
    topicExpression: [
    {
    expression: 'tns1:RuleEngine/PeopleDetector/People',
    dialect: 'http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet',
    },
    ],
    },
    });
    sub.on('data', console.log);
    await sub.subscribe();

    Hierarchy

    Index
    connectionError: (error: ErrnoException) => void
    eventReconnectMs: number
    subscription?: PullPointSubscription
    • Loop events from the subscription

      Returns Promise<void>

    • Properties inform a client about property creation, changes and deletion in a uniform way. When a client wants to synchronize its properties with the properties of the device, it can request a synchronization point which repeats the current status of all properties to which a client has subscribed. The PropertyOperation of all produced notifications is set to “Initialized”. The Synchronization Point is requested directly from the SubscriptionManager which was returned in either the SubscriptionResponse or in the CreatePullPointSubscriptionResponse. The property update is transmitted via the notification transportation of the notification interface. This method is mandatory.

      Returns Promise<void>

    • Returns Promise<void>

    • The device shall provide the following Unsubscribe command for all SubscriptionManager endpoints returned by the CreatePullPointSubscription command. This command shall terminate the lifetime of a pull point.

      Returns Promise<void>

    data: (msg: NotificationMessage) => void

    Event received from subscription

    Type Declaration

    error: (error: ErrnoException) => void

    Any subscription error

    Type Declaration

      • (error: ErrnoException): void
      • Parameters

        • error: ErrnoException

          Error object

        Returns void