DLAPI 4.1.1.0
An API for controlling Aluma branded cameras
dl::TConnectionDetails Struct Reference

Network connection detail structure. More...

#include <dlapi.h>

Public Member Functions

 TConnectionDetails ()
 Default constructor for the struct.
 

Public Attributes

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

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:

++
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);
}
Camera interface class.
Definition dlapi.h:1632
virtual ICamera::Info getInfo() const =0
Returns the buffered ICamera::Info structure.
Gateway object for controlling device discovery, and lifetime management.
Definition dlapi.h:2075
virtual ICameraPtr getCamera(TConnectionDetails details) const =0
Fetches a pointer to a camera with the provided connection details (if one is available).
virtual void queryUSBCameras()=0
Query the computer for any DLAPI compliant cameras connected via USB.
virtual void queryNetCameras()=0
Broadcast and enumerate any DLAPI compliant cameras connected to your network.
Top-level namespace containing all of DLAPI.
Definition dlapi.h:71
Network connection detail structure.
Definition dlapi.h:357
unsigned int serialNumber
The ICamera::Info::serialNumber to query--not the human readable serial number string.
Definition dlapi.h:358

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: