blob: 7c77a8bfc93a6fbf780d1c3f6a4e258457c9202f [file] [log] [blame]
Teresa Charlin9bab4962019-09-06 12:28:35 +01001//
2// Copyright © 2019 Arm Ltd. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#include "IProfilingConnection.hpp"
7
8#include <poll.h>
9#include <Runtime.hpp>
10
11#pragma once
12
13namespace armnn
14{
15namespace profiling
16{
17
18class SocketProfilingConnection : public IProfilingConnection
19{
20public:
21 SocketProfilingConnection();
Matteo Martincigh54fb9572019-10-02 12:50:57 +010022 bool IsOpen() const final;
Teresa Charlin9bab4962019-09-06 12:28:35 +010023 void Close() final;
Matteo Martincigh24e8f922019-09-19 11:57:46 +010024 bool WritePacket(const unsigned char* buffer, uint32_t length) final;
Teresa Charlin9bab4962019-09-06 12:28:35 +010025 Packet ReadPacket(uint32_t timeout) final;
Matteo Martincigh24e8f922019-09-19 11:57:46 +010026
Teresa Charlin9bab4962019-09-06 12:28:35 +010027private:
28 // To indicate we want to use an abstract UDS ensure the first character of the address is 0.
29 const char* m_GatorNamespace = "\0gatord_namespace";
30 struct pollfd m_Socket[1]{};
31};
32
33} // namespace profiling
34} // namespace armnn