ArmNN
 22.05
StreamMetadataCommandHandler Class Reference

#include <StreamMetadataCommandHandler.hpp>

Inheritance diagram for StreamMetadataCommandHandler:

Public Member Functions

 StreamMetadataCommandHandler (uint32_t familyId, uint32_t packetId, uint32_t version, bool quietOperation=false)
 
void operator() (const arm::pipe::Packet &packet) override
 

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  {}

Member Function Documentation

◆ operator()()

void operator() ( const arm::pipe::Packet &  packet)
override

Definition at line 19 of file StreamMetadataCommandHandler.cpp.

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

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