open62541pp 0.16.0
C++ wrapper of open62541
|
#include <types.hpp>
UA_ExtensionObject wrapper class.
ExtensionObjects may contain scalars of any data type. Even those that are unknown to the receiver. If the received data type is unknown, the encoded string and target NodeId is stored instead of the decoded data.
Public Member Functions | |
bool | isEmpty () const noexcept |
bool | isEncoded () const noexcept |
bool | isDecoded () const noexcept |
ExtensionObjectEncoding | getEncoding () const noexcept |
const NodeId * | getEncodedTypeId () const noexcept |
const ByteString * | getEncodedBody () const noexcept |
const UA_DataType * | getDecodedDataType () const noexcept |
template<typename T > | |
T * | getDecodedData () noexcept |
template<typename T > | |
const T * | getDecodedData () const noexcept |
void * | getDecodedData () noexcept |
const void * | getDecodedData () const noexcept |
constexpr | TypeWrapper ()=default |
constexpr | TypeWrapper (const T &native) |
constexpr | TypeWrapper (T &&native) noexcept |
constexpr | TypeWrapper (const TypeWrapper &other) |
constexpr | TypeWrapper (TypeWrapper &&other) noexcept |
Public Member Functions inherited from opcua::TypeWrapper< UA_ExtensionObject, UA_TYPES_EXTENSIONOBJECT > | |
constexpr | TypeWrapper ()=default |
constexpr | TypeWrapper (const UA_ExtensionObject &native) |
constexpr | TypeWrapper (UA_ExtensionObject &&native) noexcept |
constexpr | TypeWrapper (const TypeWrapper &other) |
constexpr | TypeWrapper (TypeWrapper &&other) noexcept |
~TypeWrapper () | |
constexpr TypeWrapper & | operator= (const TypeWrapper &other) |
constexpr TypeWrapper & | operator= (const UA_ExtensionObject &native) |
constexpr TypeWrapper & | operator= (TypeWrapper &&other) noexcept |
constexpr TypeWrapper & | operator= (UA_ExtensionObject &&native) noexcept |
constexpr void | swap (TypeWrapper &other) noexcept |
constexpr void | swap (UA_ExtensionObject &native) noexcept |
Public Member Functions inherited from opcua::Wrapper< UA_ExtensionObject > | |
constexpr | Wrapper ()=default |
constexpr | Wrapper (const UA_ExtensionObject &native) |
constexpr | Wrapper (UA_ExtensionObject &&native) noexcept |
constexpr | operator UA_ExtensionObject & () noexcept |
constexpr | operator const UA_ExtensionObject & () const noexcept |
constexpr UA_ExtensionObject * | operator-> () noexcept |
constexpr const UA_ExtensionObject * | operator-> () const noexcept |
constexpr UA_ExtensionObject * | handle () noexcept |
constexpr const UA_ExtensionObject * | handle () const noexcept |
Static Public Member Functions | |
template<typename T > | |
static ExtensionObject | fromDecoded (T &data) noexcept |
static ExtensionObject | fromDecoded (void *data, const UA_DataType &type) noexcept |
template<typename T > | |
static ExtensionObject | fromDecodedCopy (const T &data) |
static ExtensionObject | fromDecodedCopy (const void *data, const UA_DataType &type) |
Static Public Member Functions inherited from opcua::TypeWrapper< UA_ExtensionObject, UA_TYPES_EXTENSIONOBJECT > | |
static constexpr TypeIndex | getTypeIndex () |
Additional Inherited Members | |
Public Types inherited from opcua::Wrapper< UA_ExtensionObject > | |
using | NativeType |
Protected Member Functions inherited from opcua::TypeWrapper< UA_ExtensionObject, UA_TYPES_EXTENSIONOBJECT > | |
constexpr void | clear () noexcept |
Protected Member Functions inherited from opcua::Wrapper< UA_ExtensionObject > | |
constexpr const UA_ExtensionObject & | native () const noexcept |
constexpr UA_ExtensionObject & | native () noexcept |
|
inlinestaticnodiscardnoexcept |
Create an ExtensionObject from a decoded object (reference).
The data will not be deleted when the ExtensionObject is destructed.
data | Decoded data |
Definition at line 1672 of file types.hpp.
Referenced by fromDecoded(), and opcua::services::detail::wrapNodeAttributes().
|
inlinestaticnodiscardnoexcept |
Create an ExtensionObject from a decoded object (reference).
The data will not be deleted when the ExtensionObject is destructed.
data | Decoded data |
type | Data type of the decoded data |
|
inlinestaticnodiscard |
Create an ExtensionObject from a decoded object (copy).
Set the "decoded" data to a copy of the given object.
data | Decoded data |
Definition at line 1693 of file types.hpp.
Referenced by fromDecodedCopy(), and opcua::Subscription< Connection >::subscribeEvent().
|
inlinestaticnodiscard |
Create an ExtensionObject from a decoded object (copy).
data | Decoded data |
type | Data type of the decoded data |
|
inlinenoexcept |
Check if the ExtensionObject is empty.
|
inlinenoexcept |
Check if the ExtensionObject is encoded (usually if the data type is unknown).
Definition at line 1720 of file types.hpp.
Referenced by getEncodedBody(), and getEncodedTypeId().
|
inlinenoexcept |
Check if the ExtensionObject is decoded.
Definition at line 1726 of file types.hpp.
Referenced by getDecodedData(), getDecodedData(), and getDecodedDataType().
|
inlinenoexcept |
|
inlinenoexcept |
Get the encoded type id.
Returns nullptr
if ExtensionObject is not encoded.
|
inlinenoexcept |
Get the encoded body.
Returns nullptr
if ExtensionObject is not encoded.
|
inlinenoexcept |
Get the decoded data type.
Returns nullptr
if ExtensionObject is not decoded.
|
inlinenoexcept |
Get pointer to the decoded data with given template type.
Returns nullptr
if the ExtensionObject is either not decoded or the decoded data is not of type T
.
Definition at line 1764 of file types.hpp.
Referenced by getDecodedData(), and getDecodedData().
|
inlinenoexcept |
Get const pointer to the decoded data with given template type.
Returns nullptr
if the ExtensionObject is either not decoded or the decoded data is not of type T
.
|
inlinenoexcept |
Get pointer to the decoded data.
Returns nullptr
if the ExtensionObject is not decoded.
|
inlinenoexcept |
Get pointer to the decoded data.
Returns nullptr
if the ExtensionObject is not decoded.
|
constexprdefault |
|
inlineexplicitconstexpr |
Constructor with native object (deep copy).
Definition at line 31 of file typewrapper.hpp.
|
inlineconstexprnoexcept |
Constructor with native object (move rvalue).
Definition at line 35 of file typewrapper.hpp.
|
inlineconstexpr |
Copy constructor (deep copy).
Definition at line 43 of file typewrapper.hpp.
|
inlineconstexprnoexcept |
Move constructor.
Definition at line 47 of file typewrapper.hpp.