PLCnext API Documentation 24.0.0.71
SystemManagerStatePayload.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
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>;
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
42private:
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:44
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API