ArmNN
 20.02
StreamMetadataCommandHandler Class Reference

#include <StreamMetadataCommandHandler.hpp>

Inheritance diagram for StreamMetadataCommandHandler:
CommandHandlerFunctor

Public Member Functions

 StreamMetadataCommandHandler (uint32_t familyId, uint32_t packetId, uint32_t version, bool quietOperation=false)
 
void operator() (const armnn::profiling::Packet &packet) override
 
- Public Member Functions inherited from CommandHandlerFunctor
 CommandHandlerFunctor (uint32_t familyId, uint32_t packetId, uint32_t version)
 
uint32_t GetFamilyId () const
 
uint32_t GetPacketId () const
 
uint32_t GetVersion () const
 
virtual ~CommandHandlerFunctor ()
 

Detailed Description

Definition at line 26 of file StreamMetadataCommandHandler.hpp.

Constructor & Destructor Documentation

◆ StreamMetadataCommandHandler()

StreamMetadataCommandHandler ( uint32_t  familyId,
uint32_t  packetId,
uint32_t  version,
bool  quietOperation = false 
)
inline
Parameters
familyIdThe family of the packets this handler will service
packetIdThe id of packets this handler will process
versionThe version of that id
quietOperationOptional parameter to turn off printouts. This is useful for unit tests

Definition at line 36 of file StreamMetadataCommandHandler.hpp.

40  : CommandHandlerFunctor(familyId, packetId, version)
41  , m_QuietOperation(quietOperation)
42  {}
CommandHandlerFunctor(uint32_t familyId, uint32_t packetId, uint32_t version)

Member Function Documentation

◆ operator()()

void operator() ( const armnn::profiling::Packet packet)
overridevirtual

Implements CommandHandlerFunctor.

Definition at line 23 of file StreamMetadataCommandHandler.cpp.

24 {
25  ParseData(packet);
26 
27  if (m_QuietOperation)
28  {
29  return;
30  }
31 
32  std::stringstream ss;
33 
34  ss << "Stream metadata packet received" << std::endl << std::endl;
35 
36  ss << "Pipe magic: " << m_PipeMagic << std::endl;
37  ss << "Stream metadata version: " << m_StreamMetadataVersion << std::endl;
38  ss << "Max data len: " << m_MaxDataLen << std::endl;
39  ss << "Pid: " << m_Pid << std::endl;
40  ss << "Software info: " << m_SoftwareInfo << std::endl;
41  ss << "Hardware version: " << m_HardwareVersion << std::endl;
42  ss << "Software version: " << m_SoftwareVersion << std::endl;
43  ss << "Process name: " << m_ProcessName << std::endl;
44  ss << "Packet versions: " << m_PacketVersionTable.size() << std::endl;
45 
46  for (const auto& packetVersion : m_PacketVersionTable)
47  {
48  ss << "-----------------------" << std::endl;
49  ss << "Packet family: " << packetVersion.m_PacketFamily << std::endl;
50  ss << "Packet id: " << packetVersion.m_PacketId << std::endl;
51  ss << "Packet version: " << packetVersion.m_PacketVersion << std::endl;
52  }
53 
54  std::cout << ss.str() << std::endl;
55 }

The documentation for this class was generated from the following files: