dl::V3::ICamera
More...
#include <dlapi.h>
dl::V3::ICamera
Added support for direct querying of unique Endpoint descriptors.
◆ getEndpoint()
getEndpoint()
- Returns
- a pointer to an IEndpoint interface for querying the camera's endpoint descriptors.
This function returns a pointer to an IEndpoint interface that you can use to query unique endpoint identifiers if you want to connect directly to a camera without querying. This is particularly useful for network cameras, where the endpoint identifier contains the IP address of the camera, and can be used to connect directly to the camera without broadcasting on an open network.
To use this function, call it on an initialized camera instance to retrieve a pointer to the camera's endpoint manager. Then cast the pointer to the appropriate implementation interface (USB or Network), and use that to collect information:
void getCameraNetEndpoints(
dl::ICameraPtr pCamera, std::string& camIP, std::string& nicIP)
{
if (!pCameraV3) throw std::runtime_error("Your version of DLAPI does not support the V3 Camera interface");
auto pEndpoint = pCameraV3->getEndpoint();
if (!pEndpoint) throw std::runtime_error("Failed to retrieve camera endpoint");
if (pEndpoint->getType() !=
EEndpointType::Net)
throw std::runtime_error(
"Your camera is not a Network camera");
if (!pNetEndpoint) throw std::runtime_error("Your camera is not a Network camera");
camIP = pNetEndpoint->getIp();
nicIP = pNetEndpoint->getNICIP();
}
Camera interface class.
Definition dlapi.h:1958
Abstract interface for a UDP/IP camera connection endpoint.
Definition dlapi.h:421
dl::V3::ICamera
Definition dlapi.h:2417
@ Net
A UDP over Ethernet/WiFi endpoint.
Definition dlapi.h:180
The documentation for this class was generated from the following file:
- C:/Users/arobi/Perforce/nightly/DL_Imaging/Aluma_Software/dlapi/src/dlapi.h