PLCnext API Documentation  21.0.0.35466
SystemManagerStatePayload.hpp
1 //
3 // Copyright PHOENIX CONTACT Electronics GmbH
4 //
6 
7 #pragma once
8 
9 
10 #include "Arp/System/Core/Arp.h"
11 #include "Arp/System/Nm/SpecializedPayload.hpp"
12 #include "Arp/System/NmPayload/Acf/SystemManagerState.hpp"
13 
14 
15 namespace Arp { namespace System { namespace NmPayload { namespace Acf
16 {
17 
18 
22  : public Arp::System::Nm::SpecializedPayload<SystemManagerStatePayload>
23 {
24 public:
25  using SpecializedPayload::SpecializedPayload;
26 
31  SystemManagerStatePayload(const SystemManagerState& state, bool error, bool warning);
32 
33  SystemManagerState GetState() const;
34  bool GetError() const;
35  bool GetWarning() const;
36 
37 private:
38  // Do not change the order of the field initialization!
39  const size_t indexState = this->AddField<SystemManagerState>();
40  const size_t indexError = this->AddField<bool>();
41  const size_t indexWarning = this->AddField<bool>();
42 };
43 
44 
45 }}}} // namespace Arp::System::NmPayload::Acf
SystemManagerStatePayload(const SystemManagerState &state, bool error, bool warning)
Create payload with state and error iformation
Base class for custom Payload classes
Definition: SpecializedPayload.hpp:42
Root namespace for the PLCnext API
Payload class to indicate the state of the system startup
Definition: SystemManagerStatePayload.hpp:21
System components used by the System, Device, Plc or Io domains.