aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/SendCounterPacket.hpp
diff options
context:
space:
mode:
authorFerran Balaguer <ferran.balaguer@arm.com>2019-09-02 16:39:42 +0100
committerFerran Balaguer Arm <ferran.balaguer@arm.com>2019-09-03 12:31:08 +0000
commit7388217c07ccbd387d3bcfbde76cca744c4fd6fe (patch)
tree5967ab190d339adb54ceaedf10a75455ba0eed5b /src/profiling/SendCounterPacket.hpp
parentaf5c46bde858e88392214be41361588c1ebee5f0 (diff)
downloadarmnn-7388217c07ccbd387d3bcfbde76cca744c4fd6fe.tar.gz
IVGCVSW-3693 Implement SendCounterPacket.SendPeriodicCounterSelectionPacket() function
Signed-off-by: Ferran Balaguer <ferran.balaguer@arm.com> Change-Id: Ib034a4f5ca589759d925e3dd0ca50e5a3dfa74c5
Diffstat (limited to 'src/profiling/SendCounterPacket.hpp')
-rw-r--r--src/profiling/SendCounterPacket.hpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/profiling/SendCounterPacket.hpp b/src/profiling/SendCounterPacket.hpp
new file mode 100644
index 0000000000..c1432b315d
--- /dev/null
+++ b/src/profiling/SendCounterPacket.hpp
@@ -0,0 +1,43 @@
+//
+// Copyright © 2017 Arm Ltd. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+
+#pragma once
+
+#include "IBufferWrapper.hpp"
+#include "ISendCounterPacket.hpp"
+#include "CounterDirectory.hpp"
+
+namespace armnn
+{
+
+namespace profiling
+{
+
+class SendCounterPacket : public ISendCounterPacket
+{
+public:
+ SendCounterPacket(IBufferWrapper& buffer) : m_Buffer(buffer), m_ReadyToRead(false) {}
+
+ void SendStreamMetaDataPacket() override;
+
+ void SendCounterDirectoryPacket(const Category& category, const std::vector<Counter>& counters) override;
+
+ void SendPeriodicCounterCapturePacket(uint64_t timestamp, const std::vector<uint32_t>& counterValues,
+ const std::vector<uint16_t>& counterUids) override;
+
+ void SendPeriodicCounterSelectionPacket(uint32_t capturePeriod,
+ const std::vector<uint16_t>& selectedCounterIds) override;
+
+ void SetReadyToRead() override;
+
+private:
+ IBufferWrapper& m_Buffer;
+ bool m_ReadyToRead;
+};
+
+} // namespace profiling
+
+} // namespace armnn
+