Maybe this snippet is what you are looking for, here the broadcastdiscovery is disabled on the interface bevore discovering:
// Discover all interfaces
auto allInterfaceFlags = Cvb::Driver::DiscoverFlags::UpToLevelInterface | Cvb::Driver::DiscoverFlags::IgnoreGevSD;
auto allInterfaces = Cvb::DeviceFactory::Discover(allInterfaceFlags);
for (auto& iface : allInterfaces)
{
// Broadcast discover on each interface to find every device, even devices in the wrong subnet:
auto allDevFlags = Cvb::Driver::DiscoverFlags::IgnoreVins |
Cvb::Driver::DiscoverFlags::IncludeInaccessible |
Cvb::Driver::DiscoverFlags::IgnoreGevSD;
iface.SetGenApiFeature("TLInterface", "DisableSubnetMatch", "1");
iface.SetGenApiFeature("TLInterface", "AllowBroadcastDiscoveryResponse", "1");
auto allDevices = Cvb::DeviceFactory::Discover(iface, allDevFlags);
for (auto& device : allDevices)
{
// Check if camera is accessible:
// device[Cvb::Driver::DiscoveryProperties::DeviceAccessStatus];
// Work with camera. e.g. open it:
// auto cam = Cvb::DeviceFactory::Open(device.AccessToken());
}
}
```cpp
Just notice, you dont want to ignore the gevSD on ubuntu machines as there is no filter driver.
On windows we prefer working with the FD thus we ignore the SD when discovering. On ubuntu you wont find any devices when doing so.
I had a short chat with one of my colleagues and unfortunately have to tell you, that there is no way to avoid the Broadcast.
The reason is, that there was no need so far, as the Broadcast itself is not really putting any load to the network.