PLCnext API Documentation 25.0.2.69
SystemManagerStatePayload.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8#include "Arp/System/Nm/SpecializedPayload.hpp"
9#include "Arp/System/NmPayload/Acf/SystemManagerState.hpp"
10#include <tuple>
11
12
13namespace Arp { namespace System { namespace NmPayload { namespace Acf
14{
15
16
19class ARP_CXX_SYMBOL_EXPORT SystemManagerStatePayload
20 : public Arp::System::Nm::SpecializedPayload<SystemManagerStatePayload>
21{
22public:
24 using ArgumentsType = std::tuple<SystemManagerState, bool, bool>;
26 explicit SystemManagerStatePayload(const ArgumentsType& args);
27 SystemManagerStatePayload(const SystemManagerState& state, bool error, bool warning);
28
29 SystemManagerState GetState() const;
30 bool GetError() const;
31 bool GetWarning() const;
32
33private:
34 // Do not change the order of the field initialization!
35 const size_t indexState = this->AddField<SystemManagerState>();
36 const size_t indexError = this->AddField<bool>();
37 const size_t indexWarning = this->AddField<bool>();
38};
39
40
41}}}} // namespace Arp::System::NmPayload::Acf
Payload class to indicate the state of the system startup
Definition: SystemManagerStatePayload.hpp:21
std::tuple< SystemManagerState, bool, bool > ArgumentsType
ArgumentsType to be used with NonBlockingNotificationRegistration3
Definition: SystemManagerStatePayload.hpp:24
Base class for custom Payload classes
Definition: SpecializedPayload.hpp:44
SpecializedPayload(const Notification &notification)
Creates a view on a Notification object
Definition: SpecializedPayload.hpp:211
Root namespace for the PLCnext API