| 67 | } |
| 68 | |
| 69 | Device* DriverManager::RealGetDevice(const dev_id_t& dev_id) |
| 70 | { |
| 71 | auto ir = begin(); |
| 72 | auto ir_end = end(); |
| 73 | |
| 74 | while(ir != ir_end) |
| 75 | { |
| 76 | Driver* driver = ir->second; |
| 77 | |
| 78 | int dev_num = driver->GetDeviceNum(); |
| 79 | |
| 80 | for(int i = 0; i < dev_num; i++) |
| 81 | { |
| 82 | Device* dev = driver->GetDevice(i); |
| 83 | |
| 84 | if(dev->GetDeviceID() == dev_id) |
| 85 | return dev; |
| 86 | } |
| 87 | |
| 88 | ir++; |
| 89 | } |
| 90 | |
| 91 | return nullptr; |
| 92 | } |
| 93 | |
| 94 | Device* DriverManager::GetDevice(const dev_id_t& dev_id) |
| 95 | { |
no test coverage detected