| 121 | } |
| 122 | |
| 123 | std::vector<std::shared_ptr<Device>> getDevices() { |
| 124 | std::vector<std::shared_ptr<Device>> devices; |
| 125 | device_for_each_of_type(&HAL_DEVICE_TYPE, &devices ,[](auto* kernelDevice, auto* context) { |
| 126 | auto devices_ptr = static_cast<std::vector<std::shared_ptr<Device>>*>(context); |
| 127 | auto hal_device = hal_device_get_device(kernelDevice); |
| 128 | (*devices_ptr).push_back(hal_device); |
| 129 | return true; |
| 130 | }); |
| 131 | return devices; |
| 132 | } |
| 133 | |
| 134 | bool hasDevice(Device::Type type) { |
| 135 | auto scoped_mutex = mutex.asScopedLock(); |
no test coverage detected