blob: a5f8dae90d15b5f3f8a4fb3518d7cc447efe9d2a [file] [log] [blame]
Jim Flynn4e755a52020-03-29 17:48:26 +01001//
2// Copyright © 2020 Arm Ltd. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#pragma once
7
8#include "IProfilingConnection.hpp"
9
Jim Flynn9265a882022-03-10 23:35:26 +000010#include <common/include/IgnoreUnused.hpp>
Jim Flynn4e755a52020-03-29 17:48:26 +010011
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000012namespace arm
Jim Flynn4e755a52020-03-29 17:48:26 +010013{
14
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000015namespace pipe
Jim Flynn4e755a52020-03-29 17:48:26 +010016{
17
18class NullProfilingConnection : public IProfilingConnection
19{
20 virtual bool IsOpen() const override { return true; };
21
22 virtual void Close() override {};
23
24 virtual bool WritePacket(const unsigned char* buffer, uint32_t length) override
25 {
Jim Flynn9265a882022-03-10 23:35:26 +000026 arm::pipe::IgnoreUnused(buffer);
27 arm::pipe::IgnoreUnused(length);
Jim Flynn4e755a52020-03-29 17:48:26 +010028 return true;
29 };
30
31 virtual Packet ReadPacket(uint32_t timeout) override
32 {
Jim Flynn9265a882022-03-10 23:35:26 +000033 arm::pipe::IgnoreUnused(timeout);
Jim Flynn4e755a52020-03-29 17:48:26 +010034 return Packet(0);
35 }
36
37};
38
Cathal Corbett5aa9fd72022-02-25 15:33:28 +000039} // namespace pipe
Jim Flynn4e755a52020-03-29 17:48:26 +010040
Jim Flynn9265a882022-03-10 23:35:26 +000041} // namespace arm