diff options
Diffstat (limited to 'profiling/client/src/NullProfilingConnection.hpp')
-rw-r--r-- | profiling/client/src/NullProfilingConnection.hpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/profiling/client/src/NullProfilingConnection.hpp b/profiling/client/src/NullProfilingConnection.hpp new file mode 100644 index 0000000000..a5f8dae90d --- /dev/null +++ b/profiling/client/src/NullProfilingConnection.hpp @@ -0,0 +1,41 @@ +// +// Copyright © 2020 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#pragma once + +#include "IProfilingConnection.hpp" + +#include <common/include/IgnoreUnused.hpp> + +namespace arm +{ + +namespace pipe +{ + +class NullProfilingConnection : public IProfilingConnection +{ + virtual bool IsOpen() const override { return true; }; + + virtual void Close() override {}; + + virtual bool WritePacket(const unsigned char* buffer, uint32_t length) override + { + arm::pipe::IgnoreUnused(buffer); + arm::pipe::IgnoreUnused(length); + return true; + }; + + virtual Packet ReadPacket(uint32_t timeout) override + { + arm::pipe::IgnoreUnused(timeout); + return Packet(0); + } + +}; + +} // namespace pipe + +} // namespace arm |