PLCnext API Documentation 25.0.2.69
SystemStateEnum.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8#include "Arp/Base/Acf/Commons/SystemState.hpp"
9#include "Arp/Base/Acf/Commons/SystemEvent.hpp"
10
11namespace Arp { namespace Base { namespace Acf { namespace Commons
12{
13
15class ARP_EXPORT SystemStateEnum : public Enum<SystemState>
16{
17public: // construction/destruction/assignment
18 SystemStateEnum(SystemState value = SystemState::None); // no explicit here, implicit conversion is desired
19
20public: // static operations
21 static SystemStateEnum CreateFrom(SystemEvent systemEvent);
22
23public: // setter/getter operations
24 bool HasError(void)const;
25 bool HasSystemError(void)const;
26
27public: // operations
28 void Assign(SystemState newValue, bool keepErrors);
29 void SetFlags(SystemState flags);
30 void ResetFlags(SystemState flags);
31
32private: // static methods
33 static SystemState GetStateFrom(SystemEvent systemEvent);
34 static SystemState GetStateFlagsFrom(SystemEvent systemEvent);
35};
36
37}}}} // end of namespace Arp::Base::Acf::Commons
This wrapper class extends the SystemState enum by some special operations.
Definition: SystemStateEnum.hpp:16
Adapter class for enums to make them loggable and parsable from e.g. XML files.
Definition: Enum.hxx:21
Root namespace for the PLCnext API