PLCnext API Documentation  22.9.0.33
SystemManagerStatePayload.hpp
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 #pragma once
7 #include "Arp/System/Core/Arp.h"
8 #include "Arp/System/Nm/SpecializedPayload.hpp"
9 #include "Arp/System/NmPayload/Acf/SystemManagerState.hpp"
10 #include <tuple>
11 
12 
13 namespace Arp { namespace System { namespace NmPayload { namespace Acf
14 {
15 
16 
20  : public Arp::System::Nm::SpecializedPayload<SystemManagerStatePayload>
21 {
22 public:
24  using ArgumentsType = std::tuple<SystemManagerState, bool, bool>;
25 
26  using SpecializedPayload::SpecializedPayload;
27 
31 
36  SystemManagerStatePayload(const SystemManagerState& state, bool error, bool warning);
37 
38  SystemManagerState GetState() const;
39  bool GetError() const;
40  bool GetWarning() const;
41 
42 private:
43  // Do not change the order of the field initialization!
44  const size_t indexState = this->AddField<SystemManagerState>();
45  const size_t indexError = this->AddField<bool>();
46  const size_t indexWarning = this->AddField<bool>();
47 };
48 
49 
50 }}}} // 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
SystemManagerStatePayload(const ArgumentsType &args)
Create payload with state and error information
SystemManagerStatePayload(const SystemManagerState &state, bool error, bool warning)
Create payload with state and error information
Base class for custom Payload classes
Definition: SpecializedPayload.hpp:43
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API