| 25 | } |
| 26 | |
| 27 | void RequestCountersPacketHandler::HandlePacket(const arm::pipe::Packet& packet) |
| 28 | { |
| 29 | if (packet.GetHeader() != m_CounterDirectoryMessageHeader) |
| 30 | { |
| 31 | return; |
| 32 | } |
| 33 | arm::pipe::PacketVersionResolver packetVersionResolver; |
| 34 | DirectoryCaptureCommandHandler directoryCaptureCommandHandler( |
| 35 | "ARMNN", 0, 2, packetVersionResolver.ResolvePacketVersion(0, 2).GetEncodedValue()); |
| 36 | directoryCaptureCommandHandler.operator()(packet); |
| 37 | const ICounterDirectory& counterDirectory = directoryCaptureCommandHandler.GetCounterDirectory(); |
| 38 | for (auto& category : counterDirectory.GetCategories()) |
| 39 | { |
| 40 | // Remember we need to translate the Uid's from our CounterDirectory instance to the parent one. |
| 41 | std::vector<uint16_t> translatedCounters; |
| 42 | for (auto const& copyUid : category->m_Counters) |
| 43 | { |
| 44 | translatedCounters.emplace_back(directoryCaptureCommandHandler.TranslateUIDCopyToOriginal(copyUid)); |
| 45 | } |
| 46 | m_IdList.insert(std::end(m_IdList), std::begin(translatedCounters), std::end(translatedCounters)); |
| 47 | } |
| 48 | SendCounterSelectionPacket(); |
| 49 | } |
| 50 | |
| 51 | void RequestCountersPacketHandler::SendCounterSelectionPacket() |
| 52 | { |
nothing calls this directly
no test coverage detected