PLCnext API Documentation 26.0.1.58
UpdateBehavior.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8#include "Arp/Base/Core/Enum.hxx"
9
10// DO NOT MODIFY THIS FILE, THIS FILE IS AUTOGENERATED
11
12namespace Arp::Services::SoftwareUpdate::Services
13{
14
20enum class UpdateBehavior : uint32
21{
25 None = 0,
26
31 KeepsParameters = 1, // (1 << 0)
32
37 WillDisconnect = 2, // (1 << 1)
38
42 RequiresPowerCycle = 4, // (1 << 2)
43
48 WillReboot = 8, // (1 << 3)
49
54 NeedsPreparation = 16, // (1 << 4)
55};
56
57constexpr UpdateBehavior operator|(UpdateBehavior lhs, UpdateBehavior rhs)
58{
59 return static_cast<UpdateBehavior>(static_cast<uint32>(lhs) | static_cast<uint32>(rhs));
60}
61
62constexpr UpdateBehavior operator&(UpdateBehavior lhs, UpdateBehavior rhs)
63{
64 return static_cast<UpdateBehavior>(static_cast<uint32>(lhs) & static_cast<uint32>(rhs));
65}
66
67constexpr UpdateBehavior& operator|=(UpdateBehavior& lhs, UpdateBehavior rhs)
68{
69 return (lhs = static_cast<UpdateBehavior>(static_cast<uint32>(lhs) | static_cast<uint32>(rhs)));
70}
71
72constexpr UpdateBehavior& operator&=(UpdateBehavior& lhs, UpdateBehavior rhs)
73{
74 return (lhs = static_cast<UpdateBehavior>(static_cast<uint32>(lhs) & static_cast<uint32>(rhs)));
75}
76
77constexpr UpdateBehavior operator~(UpdateBehavior arg)
78{
79 return static_cast<UpdateBehavior>(~static_cast<uint32>(arg));
80}
81
83// global stream operators of enum UpdateBehavior for logging and parsing
84ARP_EXPORT std::ostream& operator<<(std::ostream& os, UpdateBehavior value);
85ARP_EXPORT std::istream& operator>>(std::istream& is, UpdateBehavior& value);
86
87} // end of namespace Arp::Services::SoftwareUpdate::Services
88
90// template specialization of UpdateBehavior formatter
91template<> struct fmt::formatter<Arp::Services::SoftwareUpdate::Services::UpdateBehavior> : public fmt::ostream_formatter {};
std::uint32_t uint32
The Arp unsigned integer type of 4 byte size.
Definition: PrimitiveTypes.hpp:33
Root namespace for the PLCnext API