ArmNN
 20.02
SocketProfilingConnection.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2019 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
7 
8 #include <Runtime.hpp>
9 #include <NetworkSockets.hpp>
10 
11 #pragma once
12 
13 namespace armnn
14 {
15 namespace profiling
16 {
17 
19 {
20 public:
22  bool IsOpen() const final;
23  void Close() final;
24  bool WritePacket(const unsigned char* buffer, uint32_t length) final;
25  Packet ReadPacket(uint32_t timeout) final;
26 
27 private:
28 
29  // Read a full packet from the socket.
30  Packet ReceivePacket();
31 
32  // To indicate we want to use an abstract UDS ensure the first character of the address is 0.
33  const char* m_GatorNamespace = "\0gatord_namespace";
34  armnnUtils::Sockets::PollFd m_Socket[1]{};
35 };
36 
37 } // namespace profiling
38 } // namespace armnn
Copyright (c) 2020 ARM Limited.
bool WritePacket(const unsigned char *buffer, uint32_t length) final