blob: 80951288a977bc20e2ba4fc5f9d6d9d2c4fd76e3 [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
Jim Flynn3e9bc192022-03-23 23:01:26 +00008#include "CounterValue.hpp"
Jim Flynn27761832022-03-20 21:52:17 +00009
Jim Flynnc454ac92022-03-16 18:43:18 +000010#include <common/include/ICounterDirectory.hpp>
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010011
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000012namespace arm
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010013{
14
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000015namespace pipe
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010016{
17
18class ISendCounterPacket
19{
20public:
Finn Williams032bc742020-02-12 11:02:34 +000021 using IndexValuePairsVector = std::vector<CounterValue>;
Francis Murtagh3a161982019-09-04 15:25:02 +010022
Matteo Martincigh2e7c8852019-09-09 09:23:53 +010023 virtual ~ISendCounterPacket() {}
24
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010025 /// Create and write a StreamMetaDataPacket in the buffer
26 virtual void SendStreamMetaDataPacket() = 0;
27
28 /// Create and write a CounterDirectoryPacket from the parameters to the buffer.
Matteo Martincigh42f9d9e2019-09-05 12:02:04 +010029 virtual void SendCounterDirectoryPacket(const ICounterDirectory& counterDirectory) = 0;
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010030
31 /// Create and write a PeriodicCounterCapturePacket from the parameters to the buffer.
Francis Murtagh3a161982019-09-04 15:25:02 +010032 virtual void SendPeriodicCounterCapturePacket(uint64_t timestamp, const IndexValuePairsVector& values) = 0;
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010033
34 /// Create and write a PeriodicCounterSelectionPacket from the parameters to the buffer.
35 virtual void SendPeriodicCounterSelectionPacket(uint32_t capturePeriod,
36 const std::vector<uint16_t>& selectedCounterIds) = 0;
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010037};
38
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000039} // namespace pipe
Ferran Balagueraf5c46b2019-08-30 15:49:15 +010040
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000041} // namespace arm