PLCnext API Documentation 25.0.2.69
Operation.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8#include "Arp/System/Core/Enum.hxx"
9
10namespace Arp { namespace System { namespace Um { namespace Commons
11{
12
38enum class Operation : uint32
39{
43 None = 0,
53 Browse = 1, // (1 << 0)
54
58 ReadRoleOperations = 2, // (1 << 1)
59
63 WriteAttribute = 4, // (1 << 2)
64
68 WriteRoleOperations = 8, // (1 << 3)
69
73 WriteHistorizing = 16, // (1 << 4)
74
86 ReadValue = 32, // (1 << 5)
87
99 WriteValue = 64, // (1 << 6)
100
104 ReadHistory = 128, // (1 << 7)
105
109 InsertHistory = 256, // (1 << 8)
110
114 ModifyHistory = 512, // (1 << 9)
115
119 DeleteHistory = 1024, // (1 << 10)
120
124 ReceiveEvents = 2048, // (1 << 11)
125
136 Call = 4096, // (1 << 12)
137
141 AddReference = 8192, // (1 << 13)
142
146 RemoveReference = 16384, // (1 << 14)
147
151 DeleteNode = 32768, // (1 << 15)
152
156 AddNode = 65536, // (1 << 16)
157
161 Login = 131072, // (1 << 17)
162
166 Get = 262144, // (1 << 18)
167
171 Post = 524288, // (1 << 19)
172
176 Put = 1048576, // (1 << 20)
177
181 Patch = 2097152, // (1 << 21)
182
186 Delete = 4194304, // (1 << 22)
187
191 Head = 8388608, // (1 << 23),
192};
193
195// global stream operators of enum Operation for logging and parsing
196ARP_CXX_SYMBOL_EXPORT std::ostream& operator<<(std::ostream& os, Operation value);
197ARP_CXX_SYMBOL_EXPORT std::istream& operator>>(std::istream& is, Operation& value);
198
199constexpr Operation operator&(Operation lhs, Operation rhs)
200{
201 using U = std::underlying_type<Operation>::type;
202 return static_cast<Operation>(static_cast<U>(lhs) & static_cast<U>(rhs));
203}
204
205constexpr Operation operator|(Operation lhs, Operation rhs)
206{
207 using U = std::underlying_type<Operation>::type;
208 return static_cast<Operation>(static_cast<U>(lhs) | static_cast<U>(rhs));
209}
210
211constexpr Operation& operator&=(Operation& lhs, Operation rhs)
212{
213 lhs = lhs & rhs;
214 return lhs;
215}
216
217constexpr Operation& operator|=(Operation& lhs, Operation rhs)
218{
219 lhs = lhs | rhs;
220 return lhs;
221}
222
223constexpr Operation operator~(Operation arg)
224{
225 using U = std::underlying_type<Operation>::type;
226 return static_cast<Operation>(~static_cast<U>(arg));
227}
228}}}} // end of namespace Arp::System::Um::Commons
229
230template<> struct fmt::formatter<Arp::System::Um::Commons::Operation>: public fmt::ostream_formatter {};
std::uint32_t uint32
The Arp unsigned integer type of 4 byte size.
Definition: PrimitiveTypes.hpp:33
Operation
Allows to describe operations which are requested or allowed on objects.
Definition: Operation.hpp:39
@ Post
Request with POST METHOD (e.g. HTTP/REST)
@ Patch
Request with PATCH METHOD (e.g. HTTP/REST)
@ Browse
Following references from or to a specific object.
@ ReadRoleOperations
Reserved for future use - see the OPC UA specification.
@ WriteValue
Writing values of objects.
@ DeleteNode
Reserved for future use - see the OPC UA specification.
@ ModifyHistory
Reserved for future use - see the OPC UA specification.
@ WriteHistorizing
Reserved for future use - see the OPC UA specification.
@ AddNode
Reserved for future use - see the OPC UA specification.
@ InsertHistory
Reserved for future use - see the OPC UA specification.
@ Head
Request with HEAD METHOD (e.g. HTTP/REST)
@ Login
Login operation for remoting client like ssh.
@ ReadValue
Reading values of objects.
@ WriteRoleOperations
Reserved for future use - see the OPC UA specification.
@ ReceiveEvents
Reserved for future use - see the OPC UA specification.
@ RemoveReference
Reserved for future use - see the OPC UA specification.
@ ReadHistory
Reserved for future use - see the OPC UA specification.
@ Call
Calling methods on objects.
@ Get
Request with GET METHOD (e.g. HTTP/REST)
@ WriteAttribute
Reserved for future use - see the OPC UA specification.
@ AddReference
Reserved for future use - see the OPC UA specification.
@ Put
Request with PUT METHOD (e.g. HTTP/REST)
@ DeleteHistory
Reserved for future use - see the OPC UA specification.
@ Delete
Request with DELETE METHOD (e.g. HTTP/REST)
Root namespace for the PLCnext API