blob: 7f9e192b9d89c8ed4f27aae84870c811c246d601 [file] [log] [blame]
Ferran Balagueraf5c46b2019-08-30 15:49:15 +01001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#pragma once
7
8#include "CounterDirectory.hpp"
9
10namespace armnn
11{
12
13namespace profiling
14{
15
16class ISendCounterPacket
17{
18public:
Francis Murtagh3a161982019-09-04 15:25:02 +010019 using IndexValuePairsVector = std::vector<std::pair<uint16_t, uint32_t>>;
20
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010021 /// 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 Murtagh3a161982019-09-04 15:25:02 +010028 virtual void SendPeriodicCounterCapturePacket(uint64_t timestamp, const IndexValuePairsVector& values) = 0;
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010029
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