blob: d666f8bc3698edad532567f50d4b5ac9dc6035d5 [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
Matteo Martincigh42f9d9e2019-09-05 12:02:04 +01008#include "ICounterDirectory.hpp"
Ferran Balagueraf5c46b2019-08-30 15:49:15 +01009
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
Matteo Martincigh2e7c8852019-09-09 09:23:53 +010021 virtual ~ISendCounterPacket() {}
22
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010023 /// Create and write a StreamMetaDataPacket in the buffer
24 virtual void SendStreamMetaDataPacket() = 0;
25
26 /// Create and write a CounterDirectoryPacket from the parameters to the buffer.
Matteo Martincigh42f9d9e2019-09-05 12:02:04 +010027 virtual void SendCounterDirectoryPacket(const ICounterDirectory& counterDirectory) = 0;
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010028
29 /// Create and write a PeriodicCounterCapturePacket from the parameters to the buffer.
Francis Murtagh3a161982019-09-04 15:25:02 +010030 virtual void SendPeriodicCounterCapturePacket(uint64_t timestamp, const IndexValuePairsVector& values) = 0;
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010031
32 /// Create and write a PeriodicCounterSelectionPacket from the parameters to the buffer.
33 virtual void SendPeriodicCounterSelectionPacket(uint32_t capturePeriod,
34 const std::vector<uint16_t>& selectedCounterIds) = 0;
35
36 /// Set a "ready to read" flag in the buffer to notify the reading thread to start reading it.
37 virtual void SetReadyToRead() = 0;
38
39};
40
41} // namespace profiling
42
43} // namespace armnn
44