Ferran Balaguer | af5c46b | 2019-08-30 15:49:15 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
| 8 | #include "CounterDirectory.hpp" |
| 9 | |
| 10 | namespace armnn |
| 11 | { |
| 12 | |
| 13 | namespace profiling |
| 14 | { |
| 15 | |
| 16 | class ISendCounterPacket |
| 17 | { |
| 18 | public: |
Francis Murtagh | 3a16198 | 2019-09-04 15:25:02 +0100 | [diff] [blame^] | 19 | using IndexValuePairsVector = std::vector<std::pair<uint16_t, uint32_t>>; |
| 20 | |
Ferran Balaguer | af5c46b | 2019-08-30 15:49:15 +0100 | [diff] [blame] | 21 | /// Create and write a StreamMetaDataPacket in the buffer |
| 22 | virtual void SendStreamMetaDataPacket() = 0; |
| 23 | |
| 24 | /// Create and write a CounterDirectoryPacket from the parameters to the buffer. |
| 25 | virtual void SendCounterDirectoryPacket(const Category& category, const std::vector<Counter>& counters) = 0; |
| 26 | |
| 27 | /// Create and write a PeriodicCounterCapturePacket from the parameters to the buffer. |
Francis Murtagh | 3a16198 | 2019-09-04 15:25:02 +0100 | [diff] [blame^] | 28 | virtual void SendPeriodicCounterCapturePacket(uint64_t timestamp, const IndexValuePairsVector& values) = 0; |
Ferran Balaguer | af5c46b | 2019-08-30 15:49:15 +0100 | [diff] [blame] | 29 | |
| 30 | /// Create and write a PeriodicCounterSelectionPacket from the parameters to the buffer. |
| 31 | virtual void SendPeriodicCounterSelectionPacket(uint32_t capturePeriod, |
| 32 | const std::vector<uint16_t>& selectedCounterIds) = 0; |
| 33 | |
| 34 | /// Set a "ready to read" flag in the buffer to notify the reading thread to start reading it. |
| 35 | virtual void SetReadyToRead() = 0; |
| 36 | |
| 37 | }; |
| 38 | |
| 39 | } // namespace profiling |
| 40 | |
| 41 | } // namespace armnn |
| 42 | |