|
ImagingTools Core SDK
|
Common interface for accessing an open device. More...
#include <IDeviceAccessor.h>
Inherits istd::IPolymorphic.
Public Types | |
| typedef QSharedPointer< istd::IChangeable > | CommandResultPtr |
| Shared pointer type for command results. | |
Public Member Functions | |
| virtual bool | IsValid () const =0 |
| Get device accessor validity status. | |
| virtual QByteArray | GetDeviceId () const =0 |
| Get the device ID associated with this accessor. | |
| virtual const iprm::IOptionsList & | GetSubDeviceList () const =0 |
| Get the list of sub-devices. | |
| virtual DeviceAccessorPtr | GetSubDevice (const QByteArray &deviceId) const =0 |
| Access a sub-device. | |
| virtual CommandResultPtr | ExecuteCommand (const QByteArray &commandId, const iprm::IParamsSet *commandParamsPtr=nullptr)=0 |
| Execute a command on the device. | |
Common interface for accessing an open device.
IDeviceAccessor provides the mechanism to interact with an opened device, enabling command execution and navigation of hierarchical device structures.
An accessor is obtained by opening a device via IDeviceController::OpenDevice() and remains valid as long as the device stays open and communication is maintained. The accessor becomes invalid if communication with the device is lost.
Definition at line 84 of file IDeviceAccessor.h.
| typedef QSharedPointer<istd::IChangeable> imtdev::IDeviceAccessor::CommandResultPtr |
Shared pointer type for command results.
Command execution results are returned as changeable objects wrapped in shared pointers for proper lifetime management.
Definition at line 93 of file IDeviceAccessor.h.
|
pure virtual |
Execute a command on the device.
Executes a device-specific command with optional parameters. The command must be in the list of supported commands defined by IDeviceSpecification.
| commandId | Unique identifier of the command to execute |
| commandParamsPtr | Optional parameters for the command (can be nullptr) |
|
pure virtual |
Get the device ID associated with this accessor.
Returns the unique identifier of the device that this accessor controls.
|
pure virtual |
Access a sub-device.
Creates an accessor for a specific sub-device within a composite device. The sub-device must be in the list returned by GetSubDeviceList().
| deviceId | Unique identifier of the sub-device to access |
|
pure virtual |
Get the list of sub-devices.
For composite devices, returns a list of available sub-devices that can be accessed through this accessor. For simple devices, returns an empty list.
|
pure virtual |
Get device accessor validity status.
Checks if the accessor is valid and can be used to perform operations. An accessor becomes invalid when communication with the device is lost or the device is closed.