aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/NullProfilingConnection.hpp
blob: a5f8dae90d15b5f3f8a4fb3518d7cc447efe9d2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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