dl::TConnectionDetails Struct Reference

Network connection detail structure. More...

#include <dlapi.h>

Public Member Functions

 TConnectionDetails ()
 Default constructor for the struct. More...
 

Public Attributes

unsigned int serialNumber
 The ICamera::Info::serialNumber to query--not the human readable serial number string. More...
 
EEndpointType endpointType
 Type of endpoint to connect to. Not needed in IGateway::GetCameraBySerial() More...
 
size_t index
 The Internal index of the camera to connect to (depends on EEndpointType). Not needed in IGateway::GetCameraBySerial() More...
 

Detailed Description

Network connection detail structure.

This structure contains the endpoint information necessary to connect to a camera via the API's internal indexing system. Let's say you've selected a camera in one session of your software, and you'd like to ensure it is used in subsequent sessions even if the camera is unplugged/moved from one connection method to another. This can be achieved using the ICamera::Info::serialNumber of the camera in question.

An example on how to use camera serial numbers to fetch pointers to ICamera instances via the IGateway object:

{c++}
struct Settings
{
size_t cameraSerialNumber;
void writeToFile();
void loadFromFile();
};
using namespace dl;
void saveCamera(ICameraPtr pCamera)
{
auto info = pCamera->getInfo();
Settings settings;
settings.cameraSerialNumber = info.serialNumber;
settings.writeToFile();
}
ICameraPtr loadCamera(IGatewayPtr pGateway)
{
Settings settings;
settings.loadFromFile();
pGateway->queryUSBCameras();
pGateway->queryNetCameras();
details.serialNumber = settings.cameraSerialNumber;
return pGateway->getCamera(details);
}

You could also use the IGateway::getCameraConnectionDetails() function to retrieve the TConnectionDetails of a given camera, extract TConnectionDetails::serialNumber and TConnectionDetails::endpointType, and load the camera with the IGateway::getUSBCamera() or IGateway::getNetCamera() functions--but that method isn't much faster than the one shown above.

Constructor & Destructor Documentation

◆ TConnectionDetails()

dl::TConnectionDetails::TConnectionDetails ( )
inline

Default constructor for the struct.

Member Data Documentation

◆ endpointType

EEndpointType dl::TConnectionDetails::endpointType

Type of endpoint to connect to. Not needed in IGateway::GetCameraBySerial()

See also
EEndpointType

◆ index

size_t dl::TConnectionDetails::index

The Internal index of the camera to connect to (depends on EEndpointType). Not needed in IGateway::GetCameraBySerial()

◆ serialNumber

unsigned int dl::TConnectionDetails::serialNumber

The ICamera::Info::serialNumber to query--not the human readable serial number string.


The documentation for this struct was generated from the following file:
  • C:/NightlyBuild/DL_Imaging/Aluma_Software/dlapi/src/dlapi.h