Files
MuditaOS/module-sys/SystemManager/messages/SentinelRegistrationMessage.hpp
Maciej-Mudita 11aa4c7ffb [EGD-5382] Add LowPower CpuSentinels
In order to synchronize the Low Power mode, the services were
immediately informed about the frequency change,
so that they can update their resources (e.g. PWM filling)
and services may request the maximum CPU frequency in order
to perform a task (e.g. screen redraw, telephone conversation)
2021-02-12 09:40:36 +01:00

27 lines
728 B
C++

// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include <Service/Message.hpp>
#include "Service/CpuSentinel.hpp"
namespace sys
{
class SentinelRegistrationMessage : public sys::DataMessage
{
public:
SentinelRegistrationMessage(std::shared_ptr<CpuSentinel> sentinelPtr)
: sys::DataMessage(MessageType::SystemManagerRegistration), sentinel(sentinelPtr)
{}
[[nodiscard]] auto getSentinel() const noexcept -> std::shared_ptr<CpuSentinel>
{
return sentinel;
};
private:
std::shared_ptr<CpuSentinel> sentinel;
};
} // namespace sys