blob: d87a042d76aaa13997190255c08b581c91d2c1ed [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
Finn Williams032bc742020-02-12 11:02:34 +00008#include <armnn/backends/profiling/IBackendProfiling.hpp>
Matteo Martincigh42f9d9e2019-09-05 12:02:04 +01009#include "ICounterDirectory.hpp"
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010010
11namespace armnn
12{
13
14namespace profiling
15{
16
17class ISendCounterPacket
18{
19public:
Finn Williams032bc742020-02-12 11:02:34 +000020 using IndexValuePairsVector = std::vector<CounterValue>;
Francis Murtagh3a161982019-09-04 15:25:02 +010021
Matteo Martincigh2e7c8852019-09-09 09:23:53 +010022 virtual ~ISendCounterPacket() {}
23
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010024 /// Create and write a StreamMetaDataPacket in the buffer
25 virtual void SendStreamMetaDataPacket() = 0;
26
27 /// Create and write a CounterDirectoryPacket from the parameters to the buffer.
Matteo Martincigh42f9d9e2019-09-05 12:02:04 +010028 virtual void SendCounterDirectoryPacket(const ICounterDirectory& counterDirectory) = 0;
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010029
30 /// Create and write a PeriodicCounterCapturePacket from the parameters to the buffer.
Francis Murtagh3a161982019-09-04 15:25:02 +010031 virtual void SendPeriodicCounterCapturePacket(uint64_t timestamp, const IndexValuePairsVector& values) = 0;
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010032
33 /// Create and write a PeriodicCounterSelectionPacket from the parameters to the buffer.
34 virtual void SendPeriodicCounterSelectionPacket(uint32_t capturePeriod,
35 const std::vector<uint16_t>& selectedCounterIds) = 0;
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010036};
37
38} // namespace profiling
39
40} // namespace armnn
41