Class: Discovery

Discovery()

ONVIF devices support WS-Discovery, which is a mechanism that supports probing a network to find ONVIF capable devices. For example, it enables devices to send Hello messages when they come online to let other devices know they are there. In addition, clients can send Probe messages to find other devices and services on the network. Devices can also send Bye messages to indicate they are leaving the network and going offline.
Messages are sent over UDP to a standardized multicast address and UDP port number. All the devices that match the types and scopes specified in the Probe message respond by sending ProbeMatch messages back to the sender.
WS-Discovery is normally limited by the network segmentation at a site since the multicast packages typically do not traverse routers. Using a Discovery Proxy could solve that problem, but details about this topic are beyond the scope of this document. For more information, see [ONVIF/Discovery] and [WS-Discovery].

Constructor

new Discovery()

Source:

Methods

startProbe(callbackopt)

Start a Discovery probe.
Parameters:
Name Type Attributes Description
callback callback <optional>
Optional callback, instead of a Promise.
Source:
Example
const OnvifManager = require('onvif-nvt')
OnvifManager.add('discovery')
OnvifManager.discovery.startProbe().then(deviceList => {
console.log(deviceList)
// 'deviceList' contains all ONVIF devices that have responded.
// If it is empty, then no ONVIF devices
// responded back to the broadcast.
})

stopProbe(callbackopt)

Stop a Discovery probe.
Parameters:
Name Type Attributes Description
callback callback <optional>
Optional callback, instead of a Promise.
Source: