Generic CVB physical device.
More...
#include <cvb/device.hpp>
Inherits enable_shared_from_this< Device >.
Inherited by EmuDevice, GenICamDevice, NonStreamingDevice, VideoDevice, and VinDevice.
Generic CVB physical device.
A device may provide an image stream or just expose a configuration interface.
See DeviceFactory for creating instances of this object.
- Examples
- Cvb/QtStreamDisplayPair.
◆ DeviceControl()
Gets the DeviceControl interface if present.
- Returns
- Pointer object for accessing the interface; empty pointer if not available.
- Exceptions
-
◆ DeviceImage() [1/2]
Gets, if available, the device image pointing to the last synchronized image.
- Returns
- Pointer to the device image (casted to the provided type).
- Exceptions
-
- Examples
- Cvb/QtStreamDisplayPair.
◆ DeviceImage() [2/2]
Gets, if available, the device image pointing to the latest synchronized image.
- Returns
- Pointer to the device image.
- Exceptions
-
◆ DigitalIO()
Gets the DigitalIO interface if present.
- Returns
- Pointer object for accessing the interface; empty pointer if not available.
- Exceptions
-
◆ Handle()
Classic API device handle.
- Returns
- Classic API handle.
- Exceptions
-
Does | not throw any exception. |
It is normally not necessary to work with this handle.
◆ ImageRect()
Gets the ImageRect interface if present.
- Returns
- Pointer object for accessing the interface; empty pointer if not available.
- Exceptions
-
◆ NodeMap()
Gets the NodeMap with the given name.
- Parameters
-
[in] | name | The NodeMap name. |
- Returns
- A pointer to the NodeMap
- Exceptions
-
- Example:
auto device = Cvb::Device::Open(Cvb::ExpandPath(CVB_LIT("%CVB%/drivers/GenICam.vin")));
auto deviceNodeMap = device->NodeMap(CVB_LIT("Device"));
◆ NodeMaps()
Gets the dictionary holding all available NodeMaps.
- Returns
- Dictionary containing all available node maps. Empty if no node map interface is available on this device.
- Exceptions
-
◆ NotifyObservable()
Get the observable for a given id.
- Parameters
-
[in] | id | The observable id, which is device specific. |
- Returns
- Pointer to the observabel object; empty pointer if not available.
- Exceptions
-
◆ RegisterConnectionStateChangedEvent()
Register a listener to the OnDisconnect event.
- Parameters
-
[in] | handler | Listener, to the OnDisconnect event. |
- Returns
- Event cookie, to manually unregister the listener.
- Exceptions
-
◆ ResourceLocator()
String ResourceLocator |
( |
| ) |
const |
|
inlinenoexcept |
Gets the access token or path of the file name including its extension.
- Returns
- String containing the access token or rooted path for a file name.
- Exceptions
-
Does | not throw any exception. |
◆ SoftwareTrigger()
Gets the SoftwareTrigger interface if present.
- Returns
- Pointer object for accessing the interface; empty pointer if not available.
- Exceptions
-
◆ Stream()
Get the stream for this device.
- Note
- This method is not supported by GenICamDevice.
- Deprecated:
- This method is deprecated for all technologies providing a GenTL. Use the template version with ImageStream, PointCloudStream or CompositeStream instead.
- Returns
- Pointer to the stream object.
- Exceptions
-
Reimplemented in GenICamDevice, and GenICamDevice.
- Examples
- Cvb/QtStreamDisplayPair.
◆ StreamCount()
int StreamCount |
( |
| ) |
const |
|
inlinenoexcept |
Get the number of streams.
- Note
- Only a GenICamDevice can have more than one stream A NonStreamingDevice does not have a stream!
- Returns
- Number of streams.
- Exceptions
-
Does | not throw any exception. |
◆ UnregisterConnectionStateChangedEvent()
void UnregisterConnectionStateChangedEvent |
( |
EventCookie |
eventCookie | ) |
|
|
inlinenoexcept |
Manually unregister a listener to the OnDisconnect event.
- Parameters
-
[in] | eventCookie | Event cookie, obtained from registering the listener. |
- Exceptions
-
Does | not throw any exception. |