diff options
author | Teresa Charlin <teresa.charlinreyes@arm.com> | 2019-09-06 12:28:35 +0100 |
---|---|---|
committer | Teresa Charlin <teresa.charlinreyes@arm.com> | 2019-09-12 12:39:49 +0000 |
commit | 9bab49686a091d61fd06a05bbf7286f559fdae3d (patch) | |
tree | 9a56bcbc3268c4f4792583aaccbdff4af688d4d3 /src/profiling/SocketProfilingConnection.hpp | |
parent | 0280785b00cd84f14249d3545a15b93627acf57b (diff) | |
download | armnn-9bab49686a091d61fd06a05bbf7286f559fdae3d.tar.gz |
IVGCVSW-3580: Extend the IProfilingConnection to connect to a Socket
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
Signed-off-by: Aron Virginas-Tar <aron.virginas-tar@arm.com>
Change-Id: I72e099ee00052f7a0907c055c7bff02c7d8fde86
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 |