open62541pp 0.16.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
Wrapper classes

Detailed Description

All wrapper classes inherit from Wrapper (and optionally from TypeWrapper). Native open62541 objects can be accessed using the Wrapper::handle() method.

Wrapper types are pointer-interconvertible to the wrapped native type and vice versa:

According to the standard:

‍Two objects a and b are pointer-interconvertible if: One is a standard-layout class object [wrapper] and the other is the first non-static data member of that object [wrapped native type].

Derived classes must fulfill the requirements of standard-layout types to be convertible.

See also
https://en.cppreference.com/w/cpp/language/static_cast#pointer-interconvertible

Classes

class  opcua::StatusCode
 
class  opcua::String
 
class  opcua::DateTime
 
class  opcua::Guid
 
class  opcua::ByteString
 
class  opcua::XmlElement
 
class  opcua::NodeId
 
class  opcua::ExpandedNodeId
 
class  opcua::QualifiedName
 
class  opcua::LocalizedText
 
class  opcua::Variant
 
class  opcua::DataValue
 
class  opcua::ExtensionObject
 
class  opcua::DiagnosticInfo
 
class  opcua::EnumValueType
 
class  opcua::ApplicationDescription
 
class  opcua::RequestHeader
 
class  opcua::ResponseHeader
 
class  opcua::UserTokenPolicy
 
class  opcua::EndpointDescription
 
struct  opcua::IsBitmaskEnum< NodeAttributesMask >
 
class  opcua::NodeAttributes
 
class  opcua::ObjectAttributes
 
class  opcua::VariableAttributes
 
class  opcua::MethodAttributes
 
class  opcua::ObjectTypeAttributes
 
class  opcua::VariableTypeAttributes
 
class  opcua::ReferenceTypeAttributes
 
class  opcua::DataTypeAttributes
 
class  opcua::ViewAttributes
 
class  opcua::UserIdentityToken
 
class  opcua::AnonymousIdentityToken
 
class  opcua::UserNameIdentityToken
 
class  opcua::X509IdentityToken
 
class  opcua::IssuedIdentityToken
 
class  opcua::AddNodesItem
 
class  opcua::AddNodesResult
 
class  opcua::AddNodesRequest
 
class  opcua::AddNodesResponse
 
class  opcua::AddReferencesItem
 
class  opcua::AddReferencesRequest
 
class  opcua::AddReferencesResponse
 
class  opcua::DeleteNodesItem
 
class  opcua::DeleteNodesRequest
 
class  opcua::DeleteNodesResponse
 
class  opcua::DeleteReferencesItem
 
class  opcua::DeleteReferencesRequest
 
class  opcua::DeleteReferencesResponse
 
class  opcua::ViewDescription
 
struct  opcua::IsBitmaskEnum< BrowseResultMask >
 
class  opcua::BrowseDescription
 
class  opcua::BrowseRequest
 
class  opcua::ReferenceDescription
 
class  opcua::BrowseResult
 
class  opcua::BrowseResponse
 
class  opcua::BrowseNextRequest
 
class  opcua::BrowseNextResponse
 
class  opcua::RelativePathElement
 
class  opcua::RelativePath
 
class  opcua::BrowsePath
 
class  opcua::BrowsePathTarget
 
class  opcua::BrowsePathResult
 
class  opcua::TranslateBrowsePathsToNodeIdsRequest
 
class  opcua::TranslateBrowsePathsToNodeIdsResponse
 
class  opcua::RegisterNodesRequest
 
class  opcua::RegisterNodesResponse
 
class  opcua::UnregisterNodesRequest
 
class  opcua::UnregisterNodesResponse
 
class  opcua::ReadValueId
 
class  opcua::ReadRequest
 
class  opcua::ReadResponse
 
class  opcua::WriteValue
 
class  opcua::WriteRequest
 
class  opcua::WriteResponse
 
class  opcua::BuildInfo
 
class  opcua::Argument
 
class  opcua::CallMethodRequest
 
class  opcua::CallMethodResult
 
class  opcua::CallRequest
 
class  opcua::CallResponse
 
class  opcua::ElementOperand
 
class  opcua::LiteralOperand
 
class  opcua::AttributeOperand
 
class  opcua::SimpleAttributeOperand
 
class  opcua::ContentFilterElement
 
class  opcua::ContentFilter
 
class  opcua::DataChangeFilter
 
class  opcua::EventFilter
 
class  opcua::AggregateFilter
 
class  opcua::MonitoringParameters
 
class  opcua::MonitoredItemCreateRequest
 
class  opcua::MonitoredItemCreateResult
 
class  opcua::CreateMonitoredItemsRequest
 
class  opcua::CreateMonitoredItemsResponse
 
class  opcua::MonitoredItemModifyRequest
 
class  opcua::MonitoredItemModifyResult
 
class  opcua::ModifyMonitoredItemsRequest
 
class  opcua::ModifyMonitoredItemsResponse
 
class  opcua::SetMonitoringModeRequest
 
class  opcua::SetMonitoringModeResponse
 
class  opcua::SetTriggeringRequest
 
class  opcua::SetTriggeringResponse
 
class  opcua::DeleteMonitoredItemsRequest
 
class  opcua::DeleteMonitoredItemsResponse
 
class  opcua::CreateSubscriptionRequest
 
class  opcua::CreateSubscriptionResponse
 
class  opcua::ModifySubscriptionRequest
 
class  opcua::ModifySubscriptionResponse
 
class  opcua::SetPublishingModeRequest
 
class  opcua::SetPublishingModeResponse
 
class  opcua::StatusChangeNotification
 
class  opcua::DeleteSubscriptionsRequest
 
class  opcua::DeleteSubscriptionsResponse
 
class  opcua::StructureField
 
class  opcua::StructureDefinition
 
class  opcua::EnumField
 
class  opcua::EnumDefinition
 
class  opcua::TypeWrapper< T, typeIndex >
 
class  opcua::Wrapper< T >
 

Macros

#define UAPP_NODEATTR(Type, suffix, member, flag)
 
#define UAPP_NODEATTR_BITMASK(Type, suffix, member, flag)
 
#define UAPP_NODEATTR_CAST(Type, suffix, member, flag)
 
#define UAPP_NODEATTR_WRAPPER(Type, suffix, member, flag)
 
#define UAPP_NODEATTR_ARRAY(Type, suffix, member, memberSize, flag)
 
#define UAPP_NODEATTR_COMMON
 

Typedefs

using opcua::FilterOperand
 
using opcua::AggregateConfiguration = UA_AggregateConfiguration
 

Enumerations

enum class  opcua::UserTokenType : int32_t
 
enum class  opcua::NodeAttributesMask : uint32_t
 
enum class  opcua::BrowseResultMask : uint32_t
 
enum class  opcua::FilterOperator : int32_t
 
enum class  opcua::DataChangeTrigger : int32_t
 
enum class  opcua::DeadbandType : int32_t
 
enum class  opcua::PerformUpdateType : int32_t
 
enum class  opcua::StructureType : int32_t
 

Functions

ContentFilter opcua::operator! (const ContentFilterElement &filterElement)
 
ContentFilter opcua::operator! (const ContentFilter &filter)
 
ContentFilter opcua::operator&& (const ContentFilterElement &lhs, const ContentFilterElement &rhs)
 
ContentFilter opcua::operator&& (const ContentFilterElement &lhs, const ContentFilter &rhs)
 
ContentFilter opcua::operator&& (const ContentFilter &lhs, const ContentFilterElement &rhs)
 
ContentFilter opcua::operator&& (const ContentFilter &lhs, const ContentFilter &rhs)
 
ContentFilter opcua::operator|| (const ContentFilterElement &lhs, const ContentFilterElement &rhs)
 
ContentFilter opcua::operator|| (const ContentFilterElement &lhs, const ContentFilter &rhs)
 
ContentFilter opcua::operator|| (const ContentFilter &lhs, const ContentFilterElement &rhs)
 
ContentFilter opcua::operator|| (const ContentFilter &lhs, const ContentFilter &rhs)
 
template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
constexpr WrapperType * opcua::asWrapper (NativeType *native) noexcept
 
template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
constexpr const WrapperType * opcua::asWrapper (const NativeType *native) noexcept
 
template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
constexpr WrapperType & opcua::asWrapper (NativeType &native) noexcept
 
template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
constexpr const WrapperType & opcua::asWrapper (const NativeType &native) noexcept
 
template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
constexpr NativeType * opcua::asNative (WrapperType *wrapper) noexcept
 
template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
constexpr const NativeType * opcua::asNative (const WrapperType *wrapper) noexcept
 
template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
constexpr NativeType & opcua::asNative (WrapperType &wrapper) noexcept
 
template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
constexpr const NativeType & opcua::asNative (const WrapperType &wrapper) noexcept
 

Macro Definition Documentation

◆ UAPP_NODEATTR

#define UAPP_NODEATTR ( Type,
suffix,
member,
flag )
Value:
UAPP_GETTER(Type, get##suffix, member) \
auto& set##suffix(Type member) noexcept { \
handle()->specifiedAttributes |= flag; \
handle()->member = member; \
return *this; \
}
#define UAPP_GETTER(Type, getterName, member)

Definition at line 289 of file types_composed.hpp.

◆ UAPP_NODEATTR_BITMASK

#define UAPP_NODEATTR_BITMASK ( Type,
suffix,
member,
flag )
Value:
UAPP_GETTER(Type, get##suffix, member) \
auto& set##suffix(Type member) noexcept { \
handle()->specifiedAttributes |= flag; \
handle()->member = member.get(); \
return *this; \
}

Definition at line 296 of file types_composed.hpp.

◆ UAPP_NODEATTR_CAST

#define UAPP_NODEATTR_CAST ( Type,
suffix,
member,
flag )
Value:
UAPP_GETTER_CAST(Type, get##suffix, member) \
auto& set##suffix(Type member) noexcept { \
handle()->specifiedAttributes |= flag; \
handle()->member = static_cast<decltype(handle()->member)>(member); \
return *this; \
}
#define UAPP_GETTER_CAST(Type, getterName, member)

Definition at line 303 of file types_composed.hpp.

◆ UAPP_NODEATTR_WRAPPER

#define UAPP_NODEATTR_WRAPPER ( Type,
suffix,
member,
flag )
Value:
UAPP_GETTER_WRAPPER_CONST(Type, get##suffix, member) \
auto& set##suffix(const Type& member) { \
handle()->specifiedAttributes |= flag; \
asWrapper<Type>(handle()->member) = member; \
return *this; \
}
#define UAPP_GETTER_WRAPPER_CONST(Type, getterName, member)

Definition at line 310 of file types_composed.hpp.

◆ UAPP_NODEATTR_ARRAY

#define UAPP_NODEATTR_ARRAY ( Type,
suffix,
member,
memberSize,
flag )
Value:
UAPP_GETTER_SPAN(Type, get##suffix, member, memberSize) \
auto& set##suffix(Span<const Type> member) { \
const auto& dataType = opcua::getDataType<Type>(); \
handle()->specifiedAttributes |= flag; \
detail::deallocateArray(handle()->member, handle()->memberSize, dataType); \
handle()->member = detail::copyArray(member.data(), member.size(), dataType); \
handle()->memberSize = member.size(); \
return *this; \
}
const UA_DataType & getDataType() noexcept
#define UAPP_GETTER_SPAN(Type, getterName, memberArray, memberSize)

Definition at line 317 of file types_composed.hpp.

◆ UAPP_NODEATTR_COMMON

#define UAPP_NODEATTR_COMMON
Value:
UAPP_GETTER(Bitmask<NodeAttributesMask>, getSpecifiedAttributes, specifiedAttributes) \
UAPP_NODEATTR_WRAPPER( \
LocalizedText, DisplayName, displayName, UA_NODEATTRIBUTESMASK_DISPLAYNAME \
) \
UAPP_NODEATTR_WRAPPER( \
LocalizedText, Description, description, UA_NODEATTRIBUTESMASK_DESCRIPTION \
) \
UAPP_NODEATTR_BITMASK( \
Bitmask<WriteMask>, WriteMask, writeMask, UA_NODEATTRIBUTESMASK_WRITEMASK \
) \
UAPP_NODEATTR_BITMASK( \
Bitmask<WriteMask>, UserWriteMask, userWriteMask, UA_NODEATTRIBUTESMASK_USERWRITEMASK \
)

Definition at line 327 of file types_composed.hpp.

Typedef Documentation

◆ FilterOperand

Initial value:

Filter operand.

The FilterOperand is an extensible parameter and can be of type:

See also
https://reference.opcfoundation.org/Core/Part4/v105/docs/7.7.4

Definition at line 1707 of file types_composed.hpp.

◆ AggregateConfiguration

Enumeration Type Documentation

◆ UserTokenType

enum class opcua::UserTokenType : int32_t
strong

User identity token type.

See also
https://reference.opcfoundation.org/Core/Part4/v105/docs/7.43
Enumerator
Anonymous 

No token is required.

Username 

A username/password token.

Certificate 

An X.509 v3 certificate token.

IssuedToken 

Any token issued by an authorization service.

Definition at line 175 of file types_composed.hpp.

◆ NodeAttributesMask

enum class opcua::NodeAttributesMask : uint32_t
strong

Node attributes mask.

Bitmask used in the node attributes parameters to specify which attributes are set.

See also
UA_NodeAttributesMask
Enumerator
None 
AccessLevel 
ArrayDimensions 
BrowseName 
ContainsNoLoops 
DataType 
Description 
DisplayName 
EventNotifier 
Executable 
Historizing 
InverseName 
IsAbstract 
MinimumSamplingInterval 
NodeClass 
NodeId 
Symmetric 
UserAccessLevel 
UserExecutable 
UserWriteMask 
ValueRank 
WriteMask 
Value 
DataTypeDefinition 
RolePermissions 
AccessRestrictions 
All 
BaseNode 
Object 
ObjectType 
Variable 
VariableType 
Method 
ReferenceType 
View 

Definition at line 241 of file types_composed.hpp.

◆ BrowseResultMask

enum class opcua::BrowseResultMask : uint32_t
strong

Browse result mask.

The enum can be used as a bitmask and allows bitwise operations, e.g.:

Exposes the possibilities of a client to write the attributes of the node In contrast to the write mask
See also
UA_BrowseResultMask
https://reference.opcfoundation.org/Core/Part4/v105/docs/5.8.2
Enumerator
None 
ReferenceTypeId 
IsForward 
NodeClass 
BrowseName 
DisplayName 
TypeDefinition 
All 
ReferenceTypeInfo 
TargetInfo 

Definition at line 963 of file types_composed.hpp.

◆ FilterOperator

enum class opcua::FilterOperator : int32_t
strong

Filter operator.

See also
https://reference.opcfoundation.org/Core/Part4/v105/docs/7.7.3
Enumerator
Equals 
IsNull 
GreaterThan 
LessThan 
GreaterThanOrEqual 
LessThanOrEqual 
Like 
Not 
Between 
InList 
And 
Or 
Cast 
InView 
OfType 
RelatedTo 
BitwiseAnd 
BitwiseOr 

Definition at line 1574 of file types_composed.hpp.

◆ DataChangeTrigger

enum class opcua::DataChangeTrigger : int32_t
strong

Data change trigger.

See also
https://reference.opcfoundation.org/Core/Part4/v105/docs/7.10
Enumerator
Status 
StatusValue 
StatusValueTimestamp 

Definition at line 1773 of file types_composed.hpp.

◆ DeadbandType

enum class opcua::DeadbandType : int32_t
strong

Deadband type.

See also
https://reference.opcfoundation.org/Core/Part4/v105/docs/7.22.2
Enumerator
None 
Absolute 
Percent 

Definition at line 1785 of file types_composed.hpp.

◆ PerformUpdateType

enum class opcua::PerformUpdateType : int32_t
strong

Perform update type for structured data history updates.

See also
UA_PerformUpdateType
https://reference.opcfoundation.org/Core/Part11/v104/docs/6.8.3
Enumerator
Insert 
Replace 
Update 
Remove 

Definition at line 2390 of file types_composed.hpp.

◆ StructureType

enum class opcua::StructureType : int32_t
strong

Structure type.

See also
https://reference.opcfoundation.org/Core/Part3/v105/docs/8.49
Enumerator
Structure 
StructureWithOptionalFields 
Union 

Definition at line 2407 of file types_composed.hpp.

Function Documentation

◆ operator!() [1/2]

ContentFilter opcua::operator! ( const ContentFilterElement & filterElement)

◆ operator!() [2/2]

ContentFilter opcua::operator! ( const ContentFilter & filter)

◆ operator&&() [1/4]

◆ operator&&() [2/4]

ContentFilter opcua::operator&& ( const ContentFilterElement & lhs,
const ContentFilter & rhs )

◆ operator&&() [3/4]

ContentFilter opcua::operator&& ( const ContentFilter & lhs,
const ContentFilterElement & rhs )

◆ operator&&() [4/4]

ContentFilter opcua::operator&& ( const ContentFilter & lhs,
const ContentFilter & rhs )

◆ operator||() [1/4]

◆ operator||() [2/4]

ContentFilter opcua::operator|| ( const ContentFilterElement & lhs,
const ContentFilter & rhs )

◆ operator||() [3/4]

ContentFilter opcua::operator|| ( const ContentFilter & lhs,
const ContentFilterElement & rhs )

◆ operator||() [4/4]

ContentFilter opcua::operator|| ( const ContentFilter & lhs,
const ContentFilter & rhs )

◆ asWrapper() [1/4]

template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
WrapperType * opcua::asWrapper ( NativeType * native)
constexprnoexcept

Cast native object pointers to Wrapper object pointers.

This is especially helpful to avoid copies in getter methods of composed types.

See also
https://github.com/open62541pp/open62541pp/issues/30

Definition at line 165 of file wrapper.hpp.

◆ asWrapper() [2/4]

template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
const WrapperType * opcua::asWrapper ( const NativeType * native)
constexprnoexcept

Cast native object pointers to Wrapper object pointers.

This is especially helpful to avoid copies in getter methods of composed types.

See also
https://github.com/open62541pp/open62541pp/issues/30

Definition at line 171 of file wrapper.hpp.

◆ asWrapper() [3/4]

template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
WrapperType & opcua::asWrapper ( NativeType & native)
constexprnoexcept

Cast native object references to Wrapper object references.

This is especially helpful to avoid copies in getter methods of composed types.

See also
https://github.com/open62541pp/open62541pp/issues/30

Definition at line 178 of file wrapper.hpp.

◆ asWrapper() [4/4]

template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
const WrapperType & opcua::asWrapper ( const NativeType & native)
constexprnoexcept

Cast native object references to Wrapper object references.

This is especially helpful to avoid copies in getter methods of composed types.

See also
https://github.com/open62541pp/open62541pp/issues/30

Definition at line 184 of file wrapper.hpp.

◆ asNative() [1/4]

◆ asNative() [2/4]

template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
const NativeType * opcua::asNative ( const WrapperType * wrapper)
constexprnoexcept

Cast Wrapper object pointers to native object pointers.

Definition at line 197 of file wrapper.hpp.

◆ asNative() [3/4]

template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
NativeType & opcua::asNative ( WrapperType & wrapper)
constexprnoexcept

Cast Wrapper object references to native object references.

Definition at line 204 of file wrapper.hpp.

◆ asNative() [4/4]

template<typename WrapperType , typename NativeType = typename WrapperType::NativeType>
const NativeType & opcua::asNative ( const WrapperType & wrapper)
constexprnoexcept

Cast Wrapper object references to native object references.

Definition at line 210 of file wrapper.hpp.