diff options
Diffstat (limited to 'src/profiling/SocketProfilingConnection.hpp')
-rw-r--r-- | src/profiling/SocketProfilingConnection.hpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/profiling/SocketProfilingConnection.hpp b/src/profiling/SocketProfilingConnection.hpp new file mode 100644 index 0000000000..f58e1f4d5d --- /dev/null +++ b/src/profiling/SocketProfilingConnection.hpp @@ -0,0 +1,33 @@ +// +// Copyright © 2019 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#include "IProfilingConnection.hpp" + +#include <poll.h> +#include <Runtime.hpp> + +#pragma once + +namespace armnn +{ +namespace profiling +{ + +class SocketProfilingConnection : public IProfilingConnection +{ +public: + SocketProfilingConnection(); + bool IsOpen() final; + void Close() final; + bool WritePacket(const char* buffer, uint32_t length) final; + Packet ReadPacket(uint32_t timeout) final; +private: + // To indicate we want to use an abstract UDS ensure the first character of the address is 0. + const char* m_GatorNamespace = "\0gatord_namespace"; + struct pollfd m_Socket[1]{}; +}; + +} // namespace profiling +} // namespace armnn |