ImagingTools Core SDK
IDeviceAccessor.h
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ImtCore-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QSharedPointer>
7
8// ACF includes
9#include <istd/IChangeable.h>
10
11
12namespace iprm
13{
14 class IOptionsList;
15 class IParamsSet;
16}
17
18
19namespace imtdev
20{
21
22
23class IDeviceAccessor;
24
32typedef QSharedPointer<IDeviceAccessor> DeviceAccessorPtr;
33
34
84class IDeviceAccessor: virtual public istd::IPolymorphic
85{
86public:
93 typedef QSharedPointer<istd::IChangeable> CommandResultPtr;
94
105 virtual bool IsValid() const = 0;
106
115 virtual QByteArray GetDeviceId() const = 0;
116
127 virtual const iprm::IOptionsList& GetSubDeviceList() const = 0;
128
139 virtual DeviceAccessorPtr GetSubDevice(const QByteArray& deviceId) const = 0;
140
154 const QByteArray& commandId,
155 const iprm::IParamsSet* commandParamsPtr = nullptr) = 0;
156};
157
158
159} // namespace imtdev
160
161
Common interface for accessing an open device.
virtual const iprm::IOptionsList & GetSubDeviceList() const =0
Get the list of sub-devices.
virtual QByteArray GetDeviceId() const =0
Get the device ID associated with this accessor.
virtual CommandResultPtr ExecuteCommand(const QByteArray &commandId, const iprm::IParamsSet *commandParamsPtr=nullptr)=0
Execute a command on the device.
virtual DeviceAccessorPtr GetSubDevice(const QByteArray &deviceId) const =0
Access a sub-device.
virtual bool IsValid() const =0
Get device accessor validity status.
QSharedPointer< istd::IChangeable > CommandResultPtr
Shared pointer type for command results.