aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/Packet.hpp
diff options
context:
space:
mode:
authorMatteo Martincigh <matteo.martincigh@arm.com>2019-10-02 12:50:57 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-10-08 15:53:43 +0100
commit54fb957c9640d61ab575d7acfc4c430a15123315 (patch)
tree51ce829032913af068071be0dcfff7c7bef409b7 /src/profiling/Packet.hpp
parentc4728ad356b73915588c971f6de38f4493078397 (diff)
downloadarmnn-54fb957c9640d61ab575d7acfc4c430a15123315.tar.gz
IVGCVSW-3937 Add the necessary components to the ProfilingService class to
process a connection to an external profiling service (e.g. gatord) * Added the required components (CommandHandlerRegistry, CommandHandler, SendCounterPacket, ...) to the ProfilingService class * Reworked the ProfilingService::Run procedure and renamed it to Update * Handling all states but Active in the Run method (future work) * Updated the unit and tests accordingly * Added component tests to check that the Connection Acknowledged packet is handled correctly * Added test util classes, made the default constructor/destructor protected to superclass a ProfilingService object * Added IProfilingConnectionFactory interface Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I010d94b18980c9e6394253f4b2bbe4fe5bb3fe4f
Diffstat (limited to 'src/profiling/Packet.hpp')
-rw-r--r--src/profiling/Packet.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/profiling/Packet.hpp b/src/profiling/Packet.hpp
index 7d70a48366..2aae14b741 100644
--- a/src/profiling/Packet.hpp
+++ b/src/profiling/Packet.hpp
@@ -23,6 +23,15 @@ public:
, m_Data(nullptr)
{}
+ Packet(uint32_t header)
+ : m_Header(header)
+ , m_Length(0)
+ , m_Data(nullptr)
+ {
+ m_PacketId = ((header >> 16) & 1023);
+ m_PacketFamily = (header >> 26);
+ }
+
Packet(uint32_t header, uint32_t length, std::unique_ptr<char[]>& data)
: m_Header(header)
, m_Length(length)
@@ -47,6 +56,7 @@ public:
Packet(const Packet& other) = delete;
Packet& operator=(const Packet&) = delete;
+ Packet& operator=(Packet&&) = default;
uint32_t GetHeader() const;
uint32_t GetPacketFamily() const;