PLCnext API Documentation 24.0.0.71
Operation.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
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};
163
165// global stream operators of enum Operation for logging and parsing
166ARP_CXX_SYMBOL_EXPORT std::ostream& operator<<(std::ostream& os, Operation value);
167ARP_CXX_SYMBOL_EXPORT std::istream& operator>>(std::istream& is, Operation& value);
168
169constexpr Operation operator&(Operation lhs, Operation rhs)
170{
171 using U = std::underlying_type<Operation>::type;
172 return static_cast<Operation>(static_cast<U>(lhs) & static_cast<U>(rhs));
173}
174
175constexpr Operation operator|(Operation lhs, Operation rhs)
176{
177 using U = std::underlying_type<Operation>::type;
178 return static_cast<Operation>(static_cast<U>(lhs) | static_cast<U>(rhs));
179}
180
181constexpr Operation& operator&=(Operation& lhs, Operation rhs)
182{
183 lhs = lhs & rhs;
184 return lhs;
185}
186
187constexpr Operation& operator|=(Operation& lhs, Operation rhs)
188{
189 lhs = lhs | rhs;
190 return lhs;
191}
192
193constexpr Operation operator~(Operation arg)
194{
195 using U = std::underlying_type<Operation>::type;
196 return static_cast<Operation>(~static_cast<U>(arg));
197}
198}}}} // end of namespace Arp::System::Um::Commons
std::uint32_t uint32
The Arp unsigned integer type of 4 byte size.
Definition: PrimitiveTypes.hpp:36
@ System
System components used by the System, Device, Plc or Io domains.
Operation
Allows to describe operations which are requested or allowed on objects.
Definition: Operation.hpp:39
@ 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.
@ 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.
@ WriteAttribute
Reserved for future use - see the OPC UA specification.
@ AddReference
Reserved for future use - see the OPC UA specification.
@ DeleteHistory
Reserved for future use - see the OPC UA specification.
Root namespace for the PLCnext API