ImagingTools Core SDK
CDeviceStateProviderAdapterComp.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// ACF includes
6#include <icomp/CComponentBase.h>
7#include <imod/CModelUpdateBridge.h>
8
9// ImtCore includes
10#include <imtdev/IDeviceController.h>
11
12
13namespace imtdev
14{
15
16
77 public icomp::CComponentBase,
79{
80public:
81 typedef icomp::CComponentBase BaseClass;
82
83 I_BEGIN_COMPONENT(CDeviceStateProviderAdapterComp);
84 I_REGISTER_INTERFACE(IDeviceStateProvider);
85 I_ASSIGN(m_deviceControllerCompPtr, "DeviceController", "Device controller", false, "DeviceController");
86 I_END_COMPONENT;
87
89
90 // reimplemented (imtdev::IDeviceStateProvider)
91 virtual DeviceState GetDeviceState(const QByteArray& deviceId) const override;
92
93protected:
94 // reimplemented (icomp::CComponentBase)
95 virtual void OnComponentCreated() override;
96 virtual void OnComponentDestroyed() override;
97
98private:
99 I_REF(IDeviceController, m_deviceControllerCompPtr);
100
101 imod::CModelUpdateBridge m_updateBridge;
102};
103
104
105} // namespace imtdev
106
107
Adapter component providing standalone device state provider.
Common interface for controlling devices.
Interface for tracking device connection states.
DeviceState
Runtime state of a device.