ImagingTools Core SDK
Public Types | Public Member Functions | List of all members
imtdev::IDeviceInstanceabstract

Interface for describing runtime information about a device instance. More...

#include <IDeviceInstance.h>

Inheritance diagram for imtdev::IDeviceInstance:
imtdev::ICompositeDeviceInstance imtdev::IDeviceDataProvider imtdev::IEditableDeviceInstance imtdev::IEditableCompositeDeviceInstance imtdev::CDeviceInstanceBase imtdev::CCompositeDeviceInstanceBase imtdev::CCompositeDeviceInstanceBase

Public Types

enum  IdentifierTypes { IT_SERIAL }
 Types of device identifiers. More...
 
enum  VersionIds {
  VI_FIRMWARE_VERSION_MAJOR = iser::IVersionInfo::UserVersionId , VI_FIRMWARE_VERSION_MINOR , VI_FIRMWARE_VERSION_PATCH , VI_HARDWARE_VERSION_MAJOR ,
  VI_HARDWARE_VERSION_MINOR , VI_HARDWARE_VERSION_PATCH
}
 Version information identifiers. More...
 

Public Member Functions

virtual const IDeviceSpecificationGetDeviceSpecification () const =0
 Get device static info associated with device instance.
 
virtual QByteArray GetIdentifier (int identifierType) const =0
 Get the device identifier of the given type.
 
virtual const iser::IVersionInfo & GetVersion () const =0
 Get device instance version information.
 
virtual const iattr::IAttributesProvider * GetAttributes () const =0
 Get device instance attributes provider.
 

Detailed Description

Interface for describing runtime information about a device instance.

IDeviceInstance represents a specific instance of a device at runtime. It provides access to instance-specific information including unique identifiers (such as serial numbers), version information (firmware, hardware), and dynamic attributes.

This interface extends istd::IChangeable to support change notifications when device instance properties are modified.

Key Concepts:
  • Device Instance: A runtime object representing a connected or manageable device
  • Identifiers: Unique identifiers like serial numbers that distinguish device instances
  • Version Information: Firmware and hardware version tracking for compatibility checks
  • Attributes: Dynamic properties specific to this device instance
Usage Example:
DeviceInstancePtr pInstance = pController->GetDeviceInstance(deviceId);
// Get device type information
const IDeviceSpecification& spec = pInstance->GetDeviceSpecification();
// Get serial number
QByteArray serialNumber = pInstance->GetIdentifier(IDeviceInstance::IT_SERIAL);
// Check firmware version
const iser::IVersionInfo& version = pInstance->GetVersion();
int fwMajor = version.GetVersion(IDeviceInstance::VI_FIRMWARE_VERSION_MAJOR);
// Access device-specific attributes
const iattr::IAttributesProvider* attrs = pInstance->GetAttributes();
@ IT_SERIAL
Serial number identifier.
@ VI_FIRMWARE_VERSION_MAJOR
Major firmware version number.
Interface for describing static information about a device type/class.
virtual const iattr::IAttributesProvider * GetAttributes() const =0
Get device static attributes provider.
See also
IDeviceSpecification
IEditableDeviceInstance
ICompositeDeviceInstance

Definition at line 59 of file IDeviceInstance.h.

Member Enumeration Documentation

◆ IdentifierTypes

Types of device identifiers.

Enumeration of different identifier types that can be used to uniquely identify device instances.

Enumerator
IT_SERIAL 

Serial number identifier.

Definition at line 68 of file IDeviceInstance.h.

◆ VersionIds

Version information identifiers.

Enumeration of version components that can be queried from device instances. Extends iser::IVersionInfo::UserVersionId to add device-specific version types.

Enumerator
VI_FIRMWARE_VERSION_MAJOR 

Major firmware version number.

VI_FIRMWARE_VERSION_MINOR 

Minor firmware version number.

VI_FIRMWARE_VERSION_PATCH 

Patch firmware version number.

VI_HARDWARE_VERSION_MAJOR 

Major hardware version number.

VI_HARDWARE_VERSION_MINOR 

Minor hardware version number.

VI_HARDWARE_VERSION_PATCH 

Patch hardware version number.

Definition at line 80 of file IDeviceInstance.h.

Member Function Documentation

◆ GetAttributes()

virtual const iattr::IAttributesProvider * imtdev::IDeviceInstance::GetAttributes ( ) const
pure virtual

Get device instance attributes provider.

Returns the attributes provider that manages dynamic, instance-specific properties for this device. May return nullptr if no attributes are available.

Returns
Pointer to attributes provider, or nullptr if not available
See also
iattr::IAttributesProvider

Implemented in imtdev::CDeviceInstanceBase.

◆ GetDeviceSpecification()

virtual const IDeviceSpecification & imtdev::IDeviceInstance::GetDeviceSpecification ( ) const
pure virtual

Get device static info associated with device instance.

Returns the device specification that describes the static properties and capabilities of this device type.

Returns
Reference to the device specification object
See also
IDeviceSpecification

◆ GetIdentifier()

virtual QByteArray imtdev::IDeviceInstance::GetIdentifier ( int  identifierType) const
pure virtual

Get the device identifier of the given type.

Retrieves a device identifier such as serial number that uniquely identifies this device instance.

Parameters
identifierTypeType of identifier to retrieve (e.g., IT_SERIAL)
Returns
Device identifier as a byte array
See also
IdentifierTypes

Implemented in imtdev::CDeviceInstanceBase.

◆ GetVersion()

virtual const iser::IVersionInfo & imtdev::IDeviceInstance::GetVersion ( ) const
pure virtual

Get device instance version information.

Returns version information containing firmware and hardware version numbers for this specific device instance.

Returns
Reference to version information object
See also
iser::IVersionInfo
VersionIds

Implemented in imtdev::CDeviceInstanceBase.