18 #include <peak/generic/peak_t_callback_manager.hpp> 25 #include <type_traits> 26 #include <unordered_map> 27 #include <unordered_set> 88 using SystemFoundCallback = std::function<void(const std::shared_ptr<const core::System>& foundSystem)>;
100 using DeviceFoundCallback = std::function<void(const std::shared_ptr<core::DeviceDescriptor>& foundDevice)>;
232 std::vector<std::shared_ptr<const core::System>>
Systems()
const;
242 std::vector<std::shared_ptr<const core::Interface>>
Interfaces()
const;
252 std::vector<std::shared_ptr<core::DeviceDescriptor>>
Devices()
const;
409 void GetLostDevicesFromLostInterfaces(
410 const std::unordered_set<std::string>& lostInterfaces, std::vector<std::string>& lostDevices);
412 void TriggerSystemFoundCallbacks(
const std::shared_ptr<const core::System>& foundSystem)
const;
413 void TriggerInterfaceFoundCallbacks(
const std::shared_ptr<const core::Interface>& foundInterface)
const;
414 void TriggerInterfaceLostCallbacks(
const std::string& lostInterfaceKey)
const;
415 void TriggerDeviceFoundCallbacks(
const std::shared_ptr<core::DeviceDescriptor>& foundDevice)
const;
416 void TriggerDeviceLostCallbacks(
const std::string& lostDeviceKey)
const;
418 void CheckDevicesOpened()
const;
420 std::mutex m_updateMutex;
421 std::atomic<core::Timeout> m_interfaceUpdateTimeout_ms{ 100 };
422 std::atomic<core::Timeout> m_deviceUpdateTimeout_ms{ 300 };
424 std::vector<std::string> m_producerLibrariesToAdd;
426 std::unordered_map<std::string, std::shared_ptr<core::ProducerLibrary>> m_producerLibraries;
427 std::vector<std::shared_ptr<const core::System>> m_systems;
428 std::vector<std::shared_ptr<const core::Interface>> m_interfaces;
429 std::vector<std::shared_ptr<core::DeviceDescriptor>> m_devices;
433 std::weak_ptr<core::Device> device;
434 std::string displayName;
436 std::vector<OpenedDevice> m_openedDevices;
438 core::TTriggerCallbackManager<SystemFoundCallbackHandle, SystemFoundCallback> m_systemFoundCallbackManager;
439 core::TTriggerCallbackManager<InterfaceFoundCallbackHandle, InterfaceFoundCallback> m_interfaceFoundCallbackManager;
440 core::TTriggerCallbackManager<InterfaceLostCallbackHandle, InterfaceLostCallback> m_interfaceLostCallbackManager;
441 core::TTriggerCallbackManager<DeviceFoundCallbackHandle, DeviceFoundCallback> m_deviceFoundCallbackManager;
442 core::TTriggerCallbackManager<DeviceLostCallbackHandle, DeviceLostCallback> m_deviceLostCallbackManager;
444 std::mutex m_producerLibrariesToAddMutex;
445 mutable std::mutex m_systemsMutex;
446 mutable std::mutex m_interfacesMutex;
447 mutable std::mutex m_devicesMutex;
448 mutable std::mutex m_openedDevicesMutex;
451 template <
typename T,
452 typename std::enable_if<(noexcept(std::declval<T>()())
453 || (std::is_pointer<
typename std::decay<T>::type>::value && __cplusplus < 201703L)
456 && std::is_same<
void, decltype(std::declval<T>()())>::value && std::is_move_constructible<T>::value
457 && std::is_nothrow_move_constructible<T>::value,
460 template <
typename T>
467 RAIIGuard(T&& fun) noexcept
468 : m_fun(std::forward<T>(fun))
470 RAIIGuard(RAIIGuard
const&) =
delete;
471 RAIIGuard(RAIIGuard&& other) noexcept
472 : m_fun(std::move(other.m_fun))
474 ~RAIIGuard() noexcept
479 template <
typename T>
480 static RAIIGuard<T> makeRAIIGuard(T&& fun) noexcept
482 return { std::forward<T>(fun) };
485 template<
typename T = DeviceManager>
486 class LifetimeTracker
489 static void Create();
490 static void Destroy();
494 static T* m_instance;
495 static std::mutex m_mtx;
496 static size_t m_initializedCount;
507 T* DeviceManager::LifetimeTracker<T>::m_instance = {};
510 std::mutex DeviceManager::LifetimeTracker<T>::m_mtx = {};
513 size_t DeviceManager::LifetimeTracker<T>::m_initializedCount = {};
516 void DeviceManager::LifetimeTracker<T>::Create()
518 std::lock_guard<decltype(m_mtx)> lock{m_mtx};
522 m_instance =
new T{};
525 m_initializedCount++;
529 void DeviceManager::LifetimeTracker<T>::Destroy()
531 std::lock_guard<decltype(m_mtx)> lock{m_mtx};
533 if (0 == m_initializedCount)
538 m_initializedCount--;
540 if (0 == m_initializedCount)
545 m_instance =
nullptr;
551 T& DeviceManager::LifetimeTracker<T>::Instance()
558 return DeviceManager::LifetimeTracker<>::Instance();
561 inline DeviceManager::~DeviceManager()
568 std::lock_guard<std::mutex> lock(m_producerLibrariesToAddMutex);
570 m_producerLibrariesToAdd.emplace_back(ctiPath);
576 std::lock_guard<std::mutex> lockUpdate(m_updateMutex);
578 std::vector<std::shared_ptr<core::System>> allFoundSystems;
579 std::vector<std::shared_ptr<core::Interface>> allFoundInterfaces;
580 std::vector<std::string> allLostInterfaces;
581 std::vector<std::shared_ptr<core::DeviceDescriptor>> allFoundDevices;
582 std::vector<std::string> allLostDevices;
584 auto interfaceUpdateTimeout_ms = m_interfaceUpdateTimeout_ms.load();
585 auto deviceUpdateTimeout_ms = m_deviceUpdateTimeout_ms.load();
587 std::vector<std::string> ctiPaths;
595 std::lock_guard<std::mutex> lock(m_producerLibrariesToAddMutex);
597 ctiPaths.reserve(ctiPaths.size() + m_producerLibrariesToAdd.size());
599 std::begin(m_producerLibrariesToAdd), std::end(m_producerLibrariesToAdd), std::back_inserter(ctiPaths));
601 m_producerLibrariesToAdd.clear();
603 for (
const auto& ctiPath : ctiPaths)
605 if (!m_producerLibraries.count(ctiPath))
610 auto system = producerLibrary->System()->OpenSystem();
612 m_producerLibraries.emplace(ctiPath, producerLibrary);
613 allFoundSystems.emplace_back(system);
631 errorCallback(
"[CTI - " + ctiPath +
"]: " + ex.what());
640 auto interfaceUpdateFunc = [&interfaceUpdateTimeout_ms, &errorCallback](
const std::shared_ptr<core::System>& system)
641 -> std::tuple<std::vector<std::shared_ptr<core::Interface>>, std::vector<std::string>> {
642 std::vector<std::shared_ptr<core::Interface>> foundInterfaces;
643 std::vector<std::string> lostInterfaces;
647 auto foundCallbackHandle = system->RegisterInterfaceFoundCallback(
648 [&foundInterfaces](
const std::shared_ptr<core::InterfaceDescriptor>& foundInterface) {
649 foundInterfaces.emplace_back(foundInterface->OpenInterface());
651 auto const foundCallbackCleanupGuard = makeRAIIGuard([system, &foundCallbackHandle]() noexcept {
654 system->UnregisterInterfaceFoundCallback(foundCallbackHandle);
662 auto keysById = std::unordered_map<std::string, std::string>();
663 for (
const auto& iface : system->Interfaces())
665 keysById.emplace(iface->ID(), iface->Key());
667 auto lostCallbackHandle = system->RegisterInterfaceLostCallback(
668 [&lostInterfaces, &keysById](
const std::string& lostInterfaceId) {
669 auto idKeyPairIt = keysById.find(lostInterfaceId);
671 if (idKeyPairIt != keysById.end())
673 lostInterfaces.emplace_back((*idKeyPairIt).second);
676 auto const lostCallbackCleanupGuard = makeRAIIGuard([system, &lostCallbackHandle]() noexcept {
679 system->UnregisterInterfaceLostCallback(lostCallbackHandle);
687 system->UpdateInterfaces(interfaceUpdateTimeout_ms);
695 errorCallback(
"[System - " + system->Key() +
"]: " + ex.what());
702 return std::make_tuple(foundInterfaces, lostInterfaces);
706 const std::launch launchPolicy =
708 std::vector<std::future<std::tuple<std::vector<std::shared_ptr<core::Interface>>, std::vector<std::string>>>>
709 interfaceUpdateFutures;
710 for (
const auto& system : m_systems)
712 interfaceUpdateFutures.emplace_back(
713 std::async(launchPolicy, interfaceUpdateFunc, std::const_pointer_cast<core::System>(system)));
715 for (
const auto& system : allFoundSystems)
717 interfaceUpdateFutures.emplace_back(std::async(launchPolicy, interfaceUpdateFunc, system));
719 for (
auto& future : interfaceUpdateFutures)
721 auto foundLostInterfacesTuple = future.get();
722 auto foundInterfaces = std::get<0>(foundLostInterfacesTuple);
723 auto lostInterfaces = std::get<1>(foundLostInterfacesTuple);
724 allFoundInterfaces.reserve(allFoundInterfaces.size() + foundInterfaces.size());
725 std::move(std::begin(foundInterfaces), std::end(foundInterfaces), std::back_inserter(allFoundInterfaces));
726 allLostInterfaces.reserve(allLostInterfaces.size() + lostInterfaces.size());
727 std::move(std::begin(lostInterfaces), std::end(lostInterfaces), std::back_inserter(allLostInterfaces));
730 auto deviceUpdateFunc = [
this, &deviceUpdateTimeout_ms, &errorCallback](
731 const std::shared_ptr<core::Interface>& iface)
732 -> std::tuple<std::vector<std::shared_ptr<core::DeviceDescriptor>>, std::vector<std::string>> {
733 std::vector<std::shared_ptr<core::DeviceDescriptor>> foundDevices;
734 std::vector<std::string> lostDevices;
738 auto foundCallbackHandle = iface->RegisterDeviceFoundCallback(
739 [
this, &foundDevices](
const std::shared_ptr<core::DeviceDescriptor>& foundDevice) {
740 foundDevice->RegisterDeviceOpenedCallback(
741 [
this](
const std::shared_ptr<core::Device>& openedDevice) {
742 std::lock_guard<std::mutex> lock(m_openedDevicesMutex);
745 m_openedDevices.erase(std::remove_if(std::begin(m_openedDevices), std::end(m_openedDevices),
746 [](
const OpenedDevice& dev) {
return dev.device.expired(); }),
747 std::end(m_openedDevices));
751 device.device = openedDevice;
752 device.displayName = openedDevice->DisplayName();
753 m_openedDevices.push_back(device);
756 foundDevices.emplace_back(foundDevice);
758 auto const foundCallbackCleanupGuard = makeRAIIGuard([iface, &foundCallbackHandle]() noexcept {
761 iface->UnregisterDeviceFoundCallback(foundCallbackHandle);
769 auto keysById = std::unordered_map<std::string, std::string>();
770 for (
const auto& device : iface->Devices())
772 keysById.emplace(device->ID(), device->Key());
774 auto lostCallbackHandle = iface->RegisterDeviceLostCallback(
775 [&lostDevices, &keysById](
const std::string& lostDeviceId) {
776 auto idKeyPairIt = keysById.find(lostDeviceId);
778 if (idKeyPairIt != keysById.end())
780 lostDevices.emplace_back((*idKeyPairIt).second);
783 auto const lostCallbackCleanupGuard = makeRAIIGuard([iface, &lostCallbackHandle]() noexcept {
786 iface->UnregisterDeviceLostCallback(lostCallbackHandle);
794 iface->UpdateDevices(deviceUpdateTimeout_ms);
802 errorCallback(
"[Interface - " + iface->Key() +
"]: " + ex.what());
809 return std::make_tuple(foundDevices, lostDevices);
813 std::vector<std::future<std::tuple<std::vector<std::shared_ptr<core::DeviceDescriptor>>, std::vector<std::string>>>>
815 for (
const auto& iface : m_interfaces)
817 deviceUpdateFutures.emplace_back(
818 std::async(launchPolicy, deviceUpdateFunc, std::const_pointer_cast<core::Interface>(iface)));
820 for (
const auto& iface : allFoundInterfaces)
822 deviceUpdateFutures.emplace_back(std::async(launchPolicy, deviceUpdateFunc, iface));
824 for (
auto& future : deviceUpdateFutures)
826 auto foundLostDevicesTuple = future.get();
827 auto foundDevices = std::get<0>(foundLostDevicesTuple);
828 auto lostDevices = std::get<1>(foundLostDevicesTuple);
829 allFoundDevices.reserve(allFoundDevices.size() + foundDevices.size());
830 std::move(std::begin(foundDevices), std::end(foundDevices), std::back_inserter(allFoundDevices));
831 allLostDevices.reserve(allLostDevices.size() + lostDevices.size());
832 std::move(std::begin(lostDevices), std::end(lostDevices), std::back_inserter(allLostDevices));
836 for (
const auto& foundSystem : allFoundSystems)
838 TriggerSystemFoundCallbacks(foundSystem);
841 for (
const auto& foundInterface : allFoundInterfaces)
843 TriggerInterfaceFoundCallbacks(foundInterface);
845 std::unordered_set<std::string> allLostInterfacesLookUp;
846 for (
const auto& lostInterfaceKey : allLostInterfaces)
848 TriggerInterfaceLostCallbacks(lostInterfaceKey);
849 allLostInterfacesLookUp.emplace(lostInterfaceKey);
852 for (
const auto& foundDevice : allFoundDevices)
854 TriggerDeviceFoundCallbacks(foundDevice);
856 GetLostDevicesFromLostInterfaces(allLostInterfacesLookUp, allLostDevices);
857 for (
const auto& lostDeviceKey : allLostDevices)
859 TriggerDeviceLostCallbacks(lostDeviceKey);
864 std::lock_guard<std::mutex> lock(m_systemsMutex);
865 std::lock_guard<std::mutex> lock2(m_interfacesMutex);
866 std::lock_guard<std::mutex> lock3(m_devicesMutex);
868 m_systems.reserve(m_systems.size() + allFoundSystems.size());
869 std::move(std::begin(allFoundSystems), std::end(allFoundSystems), std::back_inserter(m_systems));
871 for (
const auto& lostInterfaceKey : allLostInterfaces)
873 m_interfaces.erase(std::find_if(std::begin(m_interfaces), std::end(m_interfaces),
874 [&lostInterfaceKey](
const std::shared_ptr<const core::Interface>& interfaceToCheck) ->
bool {
875 return interfaceToCheck->Key() == lostInterfaceKey;
878 m_interfaces.reserve(m_interfaces.size() + allFoundInterfaces.size());
879 std::move(std::begin(allFoundInterfaces), std::end(allFoundInterfaces), std::back_inserter(m_interfaces));
881 for (
const auto& lostDeviceKey : allLostDevices)
883 m_devices.erase(std::find_if(std::begin(m_devices), std::end(m_devices),
884 [&lostDeviceKey](
const std::shared_ptr<core::DeviceDescriptor>& deviceToCheck) ->
bool {
885 return deviceToCheck->Key() == lostDeviceKey;
888 m_devices.reserve(m_devices.size() + allFoundDevices.size());
889 std::move(std::begin(allFoundDevices), std::end(allFoundDevices), std::back_inserter(m_devices));
895 std::lock_guard<std::mutex> lockUpdate(m_updateMutex);
900 CheckDevicesOpened();
904 std::lock_guard<std::mutex> lock(m_systemsMutex);
905 std::lock_guard<std::mutex> lock2(m_interfacesMutex);
906 std::lock_guard<std::mutex> lock3(m_devicesMutex);
908 for (
const auto& lostDevice : m_devices)
910 TriggerDeviceLostCallbacks(lostDevice->Key());
914 for (
const auto& lostInterface : m_interfaces)
916 TriggerInterfaceLostCallbacks(lostInterface->Key());
918 m_interfaces.clear();
921 m_producerLibraries.clear();
925 std::lock_guard<std::mutex> lock(m_producerLibrariesToAddMutex);
926 m_producerLibrariesToAdd.clear();
930 inline void DeviceManager::CheckDevicesOpened()
const 932 size_t openDevicesFound = 0;
933 std::string deviceDisplayNames;
936 std::lock_guard<std::mutex> lock(m_openedDevicesMutex);
938 for (
const auto& openedDevice : m_openedDevices)
940 auto openDevice = openedDevice.device.lock();
944 deviceDisplayNames += openedDevice.displayName;
945 deviceDisplayNames +=
" ";
950 if (openDevicesFound > 0)
953 "Can't reset the device manager while there are devices open. The following devices (" 954 + std::to_string(openDevicesFound) +
") are open: " + deviceDisplayNames);
960 return m_interfaceUpdateTimeout_ms;
965 m_interfaceUpdateTimeout_ms = timeout_ms;
970 return m_deviceUpdateTimeout_ms;
975 m_deviceUpdateTimeout_ms = timeout_ms;
980 std::lock_guard<std::mutex> lock(m_systemsMutex);
987 std::lock_guard<std::mutex> lock(m_interfacesMutex);
994 std::lock_guard<std::mutex> lock(m_devicesMutex);
1002 return m_systemFoundCallbackManager.RegisterCallback(callback);
1007 m_systemFoundCallbackManager.UnregisterCallback(callbackHandle);
1013 return m_interfaceFoundCallbackManager.RegisterCallback(callback);
1018 m_interfaceFoundCallbackManager.UnregisterCallback(callbackHandle);
1024 return m_interfaceLostCallbackManager.RegisterCallback(callback);
1029 m_interfaceLostCallbackManager.UnregisterCallback(callbackHandle);
1035 return m_deviceFoundCallbackManager.RegisterCallback(callback);
1040 m_deviceFoundCallbackManager.UnregisterCallback(callbackHandle);
1046 return m_deviceLostCallbackManager.RegisterCallback(callback);
1051 m_deviceLostCallbackManager.UnregisterCallback(callbackHandle);
1054 inline void DeviceManager::GetLostDevicesFromLostInterfaces(
1055 const std::unordered_set<std::string>& lostInterfaces, std::vector<std::string>& lostDevices)
1057 std::lock_guard<std::mutex> lock(m_devicesMutex);
1059 for (
const auto& device : m_devices)
1061 if (lostInterfaces.count(device->ParentInterface()->Key()))
1063 lostDevices.emplace_back(device->Key());
1068 inline void DeviceManager::TriggerSystemFoundCallbacks(
const std::shared_ptr<const core::System>& foundSystem)
const 1070 m_systemFoundCallbackManager.TriggerCallbacks(foundSystem);
1073 inline void DeviceManager::TriggerInterfaceFoundCallbacks(
1074 const std::shared_ptr<const core::Interface>& foundInterface)
const 1076 m_interfaceFoundCallbackManager.TriggerCallbacks(foundInterface);
1079 inline void DeviceManager::TriggerInterfaceLostCallbacks(
const std::string& lostInterfaceKey)
const 1081 m_interfaceLostCallbackManager.TriggerCallbacks(lostInterfaceKey);
1084 inline void DeviceManager::TriggerDeviceFoundCallbacks(
const std::shared_ptr<core::DeviceDescriptor>& foundDevice)
const 1086 m_deviceFoundCallbackManager.TriggerCallbacks(foundDevice);
1089 inline void DeviceManager::TriggerDeviceLostCallbacks(
const std::string& lostDeviceKey)
const 1091 m_deviceLostCallbackManager.TriggerCallbacks(lostDeviceKey);
std::function< void(const std::string &errorDescription)> UpdateErrorCallback
Definition: peak_device_manager.hpp:108
void AddProducerLibrary(const std::string &ctiPath)
Adds the given producer library (CTI).
Definition: peak_device_manager.hpp:566
std::function< void(const std::string &lostInterfaceKey)> InterfaceLostCallback
Definition: peak_device_manager.hpp:96
static std::shared_ptr< ProducerLibrary > Open(const std::string &ctiPath)
Opens the given producer library (CTI).
Definition: peak_producer_library.hpp:109
std::vector< std::shared_ptr< core::DeviceDescriptor > > Devices() const
Returns the found devices.
Definition: peak_device_manager.hpp:992
void SetDeviceUpdateTimeout(core::Timeout timeout_ms)
Sets the device update timeout.
Definition: peak_device_manager.hpp:973
UpdatePolicy
Enum holding the possible update policies.
Definition: peak_device_manager.hpp:75
ResetPolicy
Enum holding the possible reset policies.
Definition: peak_device_manager.hpp:81
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition: peak_dynamic_loader.h:32
DeviceLostCallbackHandle RegisterDeviceLostCallback(const DeviceLostCallback &callback)
Registers a callback for signaling a lost device.
Definition: peak_device_manager.hpp:1043
The exception thrown for signaling that the library was not initialized.
Definition: peak_exception.hpp:123
std::function< void(const std::shared_ptr< const core::Interface > &foundInterface)> InterfaceFoundCallback
Definition: peak_device_manager.hpp:92
std::vector< std::shared_ptr< const core::Interface > > Interfaces() const
Returns the found and opened interfaces.
Definition: peak_device_manager.hpp:985
InterfaceLostCallback * InterfaceLostCallbackHandle
Definition: peak_device_manager.hpp:98
std::function< void(const std::shared_ptr< const core::System > &foundSystem)> SystemFoundCallback
Definition: peak_device_manager.hpp:88
SystemFoundCallbackHandle RegisterSystemFoundCallback(const SystemFoundCallback &callback)
Registers a callback for signaling a found system.
Definition: peak_device_manager.hpp:999
void Reset(ResetPolicy resetPolicy=ResetPolicy::ErrorOnOpenDevices)
Resets the DeviceManager.
Definition: peak_device_manager.hpp:893
void UnregisterSystemFoundCallback(SystemFoundCallbackHandle callbackHandle)
Unregisters a system found callback.
Definition: peak_device_manager.hpp:1005
A collection of global library functions.
Definition: peak_library.hpp:30
core::Timeout InterfaceUpdateTimeout() const
Returns the interface update timeout.
Definition: peak_device_manager.hpp:958
void UnregisterInterfaceFoundCallback(InterfaceFoundCallbackHandle callbackHandle)
Unregisters a interface found callback.
Definition: peak_device_manager.hpp:1016
InterfaceFoundCallbackHandle RegisterInterfaceFoundCallback(const InterfaceFoundCallback &callback)
Registers a callback for signaling a found interface.
Definition: peak_device_manager.hpp:1010
void Update(UpdatePolicy updatePolicy=UpdatePolicy::ScanEnvironmentForProducerLibraries, const UpdateErrorCallback &errorCallback=UpdateErrorCallback())
Starts an update.
Definition: peak_device_manager.hpp:573
static std::vector< std::string > CollectCTIPaths()
Collects producer library paths found in the current environment.
Definition: peak_environment_inspector.hpp:71
DeviceLostCallback * DeviceLostCallbackHandle
Definition: peak_device_manager.hpp:106
Represents a timeout value in milliseconds.
Definition: peak_timeout.hpp:30
The exception thrown for internal errors.
Definition: peak_exception.hpp:57
The base class for all exceptions thrown by the library.
Definition: peak_exception.hpp:25
DeviceFoundCallbackHandle RegisterDeviceFoundCallback(const DeviceFoundCallback &callback)
Registers a callback for signaling a found device.
Definition: peak_device_manager.hpp:1032
The global DeviceManager (singleton) searches all installed producer libraries (*.cti) and enumerates the modules contained in them.
Definition: peak_device_manager.hpp:71
std::function< void(const std::shared_ptr< core::DeviceDescriptor > &foundDevice)> DeviceFoundCallback
Definition: peak_device_manager.hpp:100
static DeviceManager & Instance()
Returns the global DeviceManager.
Definition: peak_device_manager.hpp:556
InterfaceLostCallbackHandle RegisterInterfaceLostCallback(const InterfaceLostCallback &callback)
Registers a callback for signaling a lost interface.
Definition: peak_device_manager.hpp:1021
std::function< void(const std::string &lostDeviceKey)> DeviceLostCallback
Definition: peak_device_manager.hpp:104
void UnregisterDeviceLostCallback(DeviceLostCallbackHandle callbackHandle)
Unregisters a device lost callback.
Definition: peak_device_manager.hpp:1049
SystemFoundCallback * SystemFoundCallbackHandle
Definition: peak_device_manager.hpp:90
The exception thrown for signaling a feature is not available in the device.
Definition: peak_exception.hpp:97
InterfaceFoundCallback * InterfaceFoundCallbackHandle
Definition: peak_device_manager.hpp:94
DeviceFoundCallback * DeviceFoundCallbackHandle
Definition: peak_device_manager.hpp:102
std::vector< std::shared_ptr< const core::System > > Systems() const
Returns the found and opened systems.
Definition: peak_device_manager.hpp:978
void UnregisterInterfaceLostCallback(InterfaceLostCallbackHandle callbackHandle)
Unregisters an interface lost callback.
Definition: peak_device_manager.hpp:1027
core::Timeout DeviceUpdateTimeout() const
Returns the device update timeout.
Definition: peak_device_manager.hpp:968
void UnregisterDeviceFoundCallback(DeviceFoundCallbackHandle callbackHandle)
Unregisters a device found callback.
Definition: peak_device_manager.hpp:1038
void SetInterfaceUpdateTimeout(core::Timeout timeout_ms)
Sets the interface update timeout.
Definition: peak_device_manager.hpp:963