In order to read service discovery messages a seperate socket must be opened.
Check with your camera supplier on what port number they use for service discovery messages and if they use a multicastgroup.
std::vector<std::string> multicastGroups;
multicastGroups.push_back("239.0.0.1");
multicastGroups.push_back("239.0.0.2");
multicastGroups.push_back("239.0.0.3");
const int portNumber = 17216;
//Open the API for service discovery
m_cameraSettings->openServiceDiscovery(multicastGroups, portNumber);
....
IPv4Option option;
//Look for a service discovery message with the IPv4 endpoint option
ETHCamStatus status = m_cameraSettings->serviceDiscoveryGetIPv4(option);
//If ok, we can use the struct here
if(status == E_OK)
{
//use option struct here
}
If your camera does not employ a multicast group you can open the API like this
//Open the API for service discovery
m_cameraSettings->openServiceDiscovery(portNumber);