![]() |
DLAPI 4.1.1.0
An API for controlling Aluma branded cameras
|
Gateway object for controlling device discovery, and lifetime management. More...
#include <dlapi.h>
Public Member Functions | |
| virtual | ~IGateway ()=0 |
| Virtual destructor to ensure the class is an abstract. | |
| virtual TConnectionDetails | getCameraConnectionDetails (unsigned int serial) const =0 |
| Returns the connection details for a camera with the provided serial number. | |
| 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 size_t | getUSBCameraCount () const =0 |
| Returns the number of cameras found via the last call to IGateway::queryUSBCameras(). | |
| virtual ICameraPtr | getUSBCamera (unsigned int id) const =0 |
| Returns a pointer to the camera with the supplied index, from zero to IGateway::getUSBCameraCount(). | |
| virtual void | queryNetCameras ()=0 |
| Broadcast and enumerate any DLAPI compliant cameras connected to your network. | |
| virtual void | queryNetCamera (const char *ip, size_t port)=0 |
| Attempt to connect to a camera with the supplied IP Address and port. | |
| virtual size_t | getNetCameraCount () const =0 |
| Returns the number of cameras found after a call to IGateway::queryNetCameras(). | |
| virtual ICameraPtr | getNetCamera (unsigned int id) const =0 |
| Get a pointer to a camera found on the network via IGateway::queryNetCameras() with the given index, from zero to IGateway::getNetCameraCount(). | |
| virtual ICameraPtr | getNetCamera (const char *ip, unsigned int port) const =0 |
| Get a pointer to a queried camera with a given IP and port, if it exists. | |
| virtual size_t | getCommProtocolVersion () const =0 |
| Returns the maximum FPGA revision supported by this version of DLAPI. | |
| virtual void | initFitsDebugSettings ()=0 |
| virtual void | initNetworkConfig (const char *filePath)=0 |
| Initializes the network configuration of UPD-capable cameras using a supplied YAML file. | |
Gateway object for controlling device discovery, and lifetime management.
The IGateway interface provides users with a single point of access for discovering DLAPI devices, and managing their resources from the start to finish of an of an imaging lifecycle.
An example application would wrap all API calls in the dl::getGateway() and dl::deleteGateway() function as follows:
|
pure virtual |
Virtual destructor to ensure the class is an abstract.
Used to ensure IGateway is pure-virtual.
|
pure virtual |
Fetches a pointer to a camera with the provided connection details (if one is available).
| details | obtain a camera using the connection details supplied. |
This convenience function takes a TConnectionDetails structure, and attempts to access a camera from the appropriate USB, or UDP device list. If no camera can be found matching those connection details, nullptr is returned.
|
pure virtual |
Returns the connection details for a camera with the provided serial number.
| serial | a buffer containing the serial number to look up connection details of. |
This function takes a serial number input, and searches the list of found devices for one with a matching serial. If a camera with a matching serial is found, the function returns a TConnectionDetails structure with the appropriate EEndpointType, and device index. The user can use this information to access the appropriate USB, or UDP camera access points.
If no camera is found, TConnectionDetails::endpointType will be set to InvalidEndpoint.
|
pure virtual |
Returns the maximum FPGA revision supported by this version of DLAPI.
|
pure virtual |
Get a pointer to a queried camera with a given IP and port, if it exists.
| ip | a null-terminated string containing the IP address of the camera to obtain. |
| port | the network port to query. |
Returns the Networked camera at the given ip address. if no camera is found at the given IP address, the function returns nullptr.
|
pure virtual |
Get a pointer to a camera found on the network via IGateway::queryNetCameras() with the given index, from zero to IGateway::getNetCameraCount().
| id | zero-based index of the UDP camera to retrieve |
Returns the Networked camera associated with the provided zero-based index. Attempting to access indices below zero, or at the value returned by IGateway::getNetCameraCount() will return nullptr.
|
pure virtual |
Returns the number of cameras found after a call to IGateway::queryNetCameras().
Returns the number of cameras found using the IGateway::queryNetCameras() function. Retrieve pointers to found cameras via IGateway::getNetCamera().
|
pure virtual |
Returns a pointer to the camera with the supplied index, from zero to IGateway::getUSBCameraCount().
| id | zero-based index of the usb camera to retrieve |
Returns the usb camera associated with the provided zero-based index. Attempting to access indices below zero, or at the value returned by IGateway::getUSBCameraCount() will return nullptr.
|
pure virtual |
Returns the number of cameras found via the last call to IGateway::queryUSBCameras().
Returns the number of cameras found using the IGateway::queryUSBCameras() function. Retrieve pointers to found cameras via IGateway::getUSBCamera().
|
pure virtual |
|
pure virtual |
Initializes the network configuration of UPD-capable cameras using a supplied YAML file.
| filePath | the full path to the YAML file containing the network configuration. |
This function parses the supplied YAML file for serial-number dependent network configurations for UDP capable cameras. It sends out a broadcast on the specified network interface card to all cameras and the appropriate camera will reconfigure itself to respond with the supplied network settings.
You will be expected to supply a device list with the following information:
You can also supply a global gateway and subnet_mask if the cameras are all on the same subnet. If you do this, the global gateway and subnet_mask will be overridden by any camera-specific settings.
NOTE: You will need to ensure your host PC has the appropriate network settings to communicate with the cameras. This means ensuring the network intefaces connected to the camera are assigned the IP addresses specified in this config file.
example script:
|
pure virtual |
Attempt to connect to a camera with the supplied IP Address and port.
This function sends a GetInfo request to the device located at ip:port. This function blocks until the operation is complete. When the operation is complete it will have enumerated all DLAPI protocol compliant devices connected to the computer via a network. It will have called:
This process takes up to 2 seconds to complete while the cameras respond via UDP over IP. Note that virtual network interfaces, and bridged adapters can eat up the UDP broadcasts destined for DLAPI devices. If your device is not discovered, check to make sure you have no network adapters that might be intercepting those broadcasts.
|
pure virtual |
Broadcast and enumerate any DLAPI compliant cameras connected to your network.
This function searches through all available UDP devices on the active network. This function blocks until the operation is complete. When the operation is complete it will have enumerated all DLAPI protocol compliant devices connected to the computer via a network. It will have called:
This process takes up to 2 seconds to complete while the cameras respond via UDP. Note that virtual network interfaces, and bridged adapters can eat up the UDP broadcasts destined for DLAPI devices. If your device is not discovered, check to make sure you have no network adapters that might be intercepting those broadcasts.
|
pure virtual |
Query the computer for any DLAPI compliant cameras connected via USB.
This function searches through all available USB devices connected to the computer which are not in use by another API instance. This function blocks until the operation is complete. When the operation is complete it will have enumerated all DLAPI protocol compliant devices connected to the computer via USB. It will have called: