|
ImagingTools Core SDK
|
Base implementation class for device instances. More...
#include <CDeviceInstanceBase.h>
Classes | |
| class | VersionInfo |
| Internal version information implementation. More... | |
Public Member Functions | |
| CDeviceInstanceBase () | |
| Constructor. | |
| ~CDeviceInstanceBase () | |
| Destructor. | |
| virtual bool | SetIdentifier (IdentifierTypes idType, const QByteArray &id) override |
| Set device identifier. | |
| virtual bool | SetVersion (int versionId, quint32 version, const QString &description) override |
| Set version information component. | |
| virtual iattr::IAttributesManager * | GetAttributesManager () override |
| Get attributes manager for modification. | |
| virtual QByteArray | GetIdentifier (int idType) const override |
| Get device identifier. | |
| virtual const iser::IVersionInfo & | GetVersion () const override |
| Get version information. | |
| virtual const iattr::IAttributesProvider * | GetAttributes () const override |
| Get attributes provider (read-only) | |
| virtual int | GetSupportedOperations () const override |
| Get supported operations. | |
| virtual bool | CopyFrom (const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override |
| Copy data from another instance. | |
| virtual bool | ResetData (CompatibilityMode mode=CM_WITHOUT_REFS) override |
| Reset device instance data. | |
Public Member Functions inherited from imtdev::IDeviceInstance | |
| virtual const IDeviceSpecification & | GetDeviceSpecification () const =0 |
| Get device static info associated with device instance. | |
Protected Member Functions | |
| virtual bool | EnsureAttributesCreated () const |
| Ensure attributes provider is created. | |
Protected Attributes | |
| imod::CModelUpdateBridge | m_updateBridge |
| Bridge for change notifications (mutable for change tracking in const methods) | |
| std::unique_ptr< iattr::IAttributesProvider > | m_attributesPtr |
| Lazy-created attributes (mutable to allow creation in const GetAttributes()) | |
Additional Inherited Members | |
Public Types inherited from imtdev::IDeviceInstance | |
| 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... | |
Base implementation class for device instances.
CDeviceInstanceBase provides a complete, reusable implementation of IEditableDeviceInstance that manages device identifiers, version information, and attributes. This class serves as the foundation for device instance objects throughout the imtdev library.
Definition at line 84 of file CDeviceInstanceBase.h.
| imtdev::CDeviceInstanceBase::CDeviceInstanceBase | ( | ) |
Constructor.
Initializes the device instance with empty identifiers, version info, and no attributes (created lazily on first access).
| imtdev::CDeviceInstanceBase::~CDeviceInstanceBase | ( | ) |
Destructor.
Cleans up resources including attributes provider if it was created.
|
overridevirtual |
Copy data from another instance.
Copies identifiers, version info, and attributes from another device instance.
| object | Source object to copy from |
| mode | Compatibility mode for copying |
Reimplemented in imtdev::CCompositeDeviceInstanceBase.
|
protectedvirtual |
Ensure attributes provider is created.
Creates the attributes provider if it doesn't exist yet (lazy initialization). Can be overridden by derived classes to customize attribute provider creation.
|
overridevirtual |
Get attributes provider (read-only)
Returns the attributes provider for reading attributes.
Implements imtdev::IDeviceInstance.
|
overridevirtual |
Get attributes manager for modification.
Returns the attributes manager, creating it if necessary (lazy initialization).
Implements imtdev::IEditableDeviceInstance.
|
overridevirtual |
Get device identifier.
Retrieves the identifier value for the specified type.
| idType | Type of identifier to retrieve |
Implements imtdev::IDeviceInstance.
|
overridevirtual |
Get supported operations.
Returns flags indicating which operations are supported (copy, reset, etc.).
Reimplemented in imtdev::CCompositeDeviceInstanceBase.
|
overridevirtual |
Get version information.
Returns the complete version information object containing all version components.
Implements imtdev::IDeviceInstance.
|
overridevirtual |
Reset device instance data.
Clears all identifiers, version information, and attributes.
| mode | Compatibility mode for reset |
Reimplemented in imtdev::CCompositeDeviceInstanceBase.
|
overridevirtual |
Set device identifier.
Stores the identifier value for the specified identifier type. Triggers change notification if the value differs from current.
| idType | Type of identifier (e.g., IT_SERIAL) |
| id | Identifier value |
Implements imtdev::IEditableDeviceInstance.
|
overridevirtual |
Set version information component.
Sets a specific version component (e.g., firmware major version) with its value and description.
| versionId | Version component identifier |
| version | Version number |
| description | Human-readable description |
Implements imtdev::IEditableDeviceInstance.