Imaging Control 4 C++ Library 1.2.0
|
Contains information about a video capture device. More...
Public Member Functions | |
DeviceInfo ()=default | |
Creates an invalid object. | |
bool | is_valid () const noexcept |
Checks whether this device information is a valid object. | |
bool | operator== (const DeviceInfo &other) const |
Checks whether two device information objects refer to the same video capture device. | |
bool | operator!= (const DeviceInfo &other) const |
Checks whether two device information objects refer to different devices. | |
std::string | modelName (Error &err=Error::Default()) const |
Gets the model name for this device. | |
std::string | uniqueName (Error &err=Error::Default()) const |
Gets the unique name for this device. | |
std::string | serial (Error &err=Error::Default()) const |
Gets the serial of this device. | |
std::string | version (Error &err=Error::Default()) const |
Gets the version of this device. | |
std::string | userID (Error &err=Error::Default()) const |
Gets the user-defined identifier of this device. | |
Interface | getInterface (Error &err=Error::Default()) const |
Returns the interface this device is attached to. | |
Contains information about a video capture device.
The information provided includes the device's model name, serial number and firmware version.
Instances of this class are created by calling DeviceEnum::enumDevices(), Interface::enumDevices(), or Grabber::deviceInfo().
Objects returned from Grabber::deviceInfo() are potentially invalid, for example if no device was opened. Check the err
output parameter or DeviceInfo::is_valid(). Default-constructed DeviceInfo objects are also invalid.
DeviceInfo objects are copyable and comparable using operator==
and operator!=
.
|
inline |
Returns the interface this device is attached to.
[out] | err | Reference to an error handler. See Error Handling for details. |
|
inlinenoexcept |
Checks whether this device information is a valid object.
If ic4::Grabber::deviceInfo() could not create a valid device information object, and the passed err
was not set to ic4::Error::Throw(), an invalid object is created. All member function calls will fail.
true
, if this device information object was constructed successfully, otherwise false
.
|
inline |
Gets the model name for this device.
[out] | err | Reference to an error handler. See Error Handling for details. |
|
inline |
Checks whether two device information objects refer to different devices.
[in] | other | A second device information object. |
true
if the two device information objects refer to different devices, otherwise false
.
|
inline |
Checks whether two device information objects refer to the same video capture device.
[in] | other | A second device information object. |
true
if the two device information objects refer to the same device, otherwise false
.
|
inline |
Gets the serial of this device.
The serial is a string uniquely identifying the device. Usually this is a number that is also printed on the device's housing.
[out] | err | Reference to an error handler. See Error Handling for details. |
|
inline |
Gets the unique name for this device.
The unique name consists of an identifier for the device driver and the device's serial number, allowing devices to be uniquely identified by a single string.
[out] | err | Reference to an error handler. See Error Handling for details. |
|
inline |
Gets the user-defined identifier of this device.
If supported by the device, the device's user-defined identifier can be configured through the DeviceUserID
feature in the device's property map.
[out] | err | Reference to an error handler. See Error Handling for details. |
|
inline |
Gets the version of this device.
The format of the version string is device-specific.
[out] | err | Reference to an error handler. See Error Handling for details. |