43 : m_HandlerRegistry(registry)
44 , m_EchoPackets(echoPackets)
45 , m_CloseReceivingThread(
false)
47 m_PacketsReceivedCount.store(0, std::memory_order_relaxed);
60 bool OpenListeningSocket(std::string udsNamespace);
64 armnnUtils::Sockets::Socket BlockForOneClient();
69 bool WaitForStreamMetaData();
72 void SendConnectionAck();
75 void SendRequestCounterDir();
78 bool LaunchReceivingThread();
84 return m_PacketsReceivedCount.load(std::memory_order_acquire);
89 void WaitForReceivingThread();
94 return !m_CloseReceivingThread.load();
98 void SendPeriodicCounterSelectionList(uint32_t period, std::vector<uint16_t> counters);
101 void WaitCommand(uint32_t timeout);
105 return m_StreamMetaDataVersion;
110 return m_StreamMetaDataMaxDataLen;
115 return m_StreamMetaDataPid;
128 bool SendPacket(uint32_t packetFamily, uint32_t packetId,
const uint8_t* data, uint32_t dataLength);
130 void EchoPacket(
PacketDirection direction, uint8_t* packet,
size_t lengthInBytes);
132 bool ReadHeader(uint32_t headerAsWords[2]);
134 bool ReadFromSocket(uint8_t* packetData, uint32_t expectedLength);
140 static const uint32_t PIPE_MAGIC = 0x45495434;
142 std::atomic<uint32_t> m_PacketsReceivedCount;
144 uint32_t m_StreamMetaDataVersion;
145 uint32_t m_StreamMetaDataMaxDataLen;
146 uint32_t m_StreamMetaDataPid;
151 armnnUtils::Sockets::Socket m_ListeningSocket;
152 armnnUtils::Sockets::Socket m_ClientConnection;
153 std::thread m_ListeningThread;
154 std::atomic<bool> m_CloseReceivingThread;
uint32_t GetPacketsReceivedCount()
uint32_t GetStreamMetadataVersion()
GatordMockService(armnn::profiling::CommandHandlerRegistry ®istry, bool echoPackets)
uint32_t GetStreamMetadataPid()
uint32_t GetStreamMetadataMaxDataLen()
bool ReceiveThreadRunning()