open62541pp 0.19.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
Public Member Functions | List of all members
opcua::DataValue Class Reference

#include <types.hpp>

Inheritance diagram for opcua::DataValue:
[legend]

Detailed Description

UA_DataValue wrapper class.

See also
https://reference.opcfoundation.org/Core/Part4/v105/docs/7.11
Examples
client_async.cpp, client_subscription.cpp, server_datasource.cpp, and server_valuecallback.cpp.

Definition at line 1568 of file types.hpp.

Public Member Functions

 DataValue (Variant value) noexcept
 
 DataValue (Variant value, std::optional< DateTime > sourceTimestamp, std::optional< DateTime > serverTimestamp, std::optional< uint16_t > sourcePicoseconds, std::optional< uint16_t > serverPicoseconds, std::optional< StatusCode > status) noexcept
 
void setValue (const Variant &value)
 
void setValue (Variant &&value) noexcept
 
void setSourceTimestamp (DateTime sourceTimestamp) noexcept
 
void setServerTimestamp (DateTime serverTimestamp) noexcept
 
void setSourcePicoseconds (uint16_t sourcePicoseconds) noexcept
 
void setServerPicoseconds (uint16_t serverPicoseconds) noexcept
 
void setStatus (StatusCode status) noexcept
 
bool hasValue () const noexcept
 
bool hasSourceTimestamp () const noexcept
 
bool hasServerTimestamp () const noexcept
 
bool hasSourcePicoseconds () const noexcept
 
bool hasServerPicoseconds () const noexcept
 
bool hasStatus () const noexcept
 
Variantvalue () &noexcept
 
const Variantvalue () const &noexcept
 
Variant && value () &&noexcept
 
const Variant && value () const &&noexcept
 
DateTime sourceTimestamp () const noexcept
 
DateTime serverTimestamp () const noexcept
 
uint16_t sourcePicoseconds () const noexcept
 
uint16_t serverPicoseconds () const noexcept
 
StatusCode status () const noexcept
 
constexpr Wrapper () noexcept=default
 
constexpr Wrapper (const Wrapper &other)
 
constexpr Wrapper (const T &native)
 
constexpr Wrapper (Wrapper &&other) noexcept
 
constexpr Wrapper (T &&native) noexcept
 
- Public Member Functions inherited from opcua::Wrapper< T, Handler >
constexpr Wrapper () noexcept=default
 
constexpr Wrapper (const Wrapper &other)
 
constexpr Wrapper (const T &native)
 
constexpr Wrapper (Wrapper &&other) noexcept
 
constexpr Wrapper (T &&native) noexcept
 
 ~Wrapper () noexcept=default
 
constexpr Wrapperoperator= (const Wrapper &other)
 
constexpr Wrapperoperator= (const T &native)
 
constexpr Wrapperoperator= (Wrapper &&other) noexcept
 
constexpr Wrapperoperator= (T &&native) noexcept
 
constexpr operator T& () noexcept
 
constexpr operator const T & () const noexcept
 
constexpr T * operator-> () noexcept
 
constexpr const T * operator-> () const noexcept
 
constexpr T * handle () noexcept
 
constexpr const T * handle () const noexcept
 
constexpr void swap (Wrapper &other) noexcept
 
constexpr void swap (T &native) noexcept
 

Additional Inherited Members

- Public Types inherited from opcua::Wrapper< T, Handler >
using NativeType = T
 
using HandlerType = Handler
 
- Protected Member Functions inherited from opcua::Wrapper< T, Handler >
constexpr const T & native () const noexcept
 
constexpr T & native () noexcept
 
constexpr void clear () noexcept
 

Constructor & Destructor Documentation

◆ DataValue() [1/2]

opcua::DataValue::DataValue ( Variant  value)
inlineexplicitnoexcept

Definition at line 1572 of file types.hpp.

◆ DataValue() [2/2]

opcua::DataValue::DataValue ( Variant  value,
std::optional< DateTime sourceTimestamp,
std::optional< DateTime serverTimestamp,
std::optional< uint16_t >  sourcePicoseconds,
std::optional< uint16_t >  serverPicoseconds,
std::optional< StatusCode status 
)
inlinenoexcept

Definition at line 1576 of file types.hpp.

Member Function Documentation

◆ hasServerPicoseconds()

bool opcua::DataValue::hasServerPicoseconds ( ) const
inlinenoexcept

Definition at line 1659 of file types.hpp.

◆ hasServerTimestamp()

bool opcua::DataValue::hasServerTimestamp ( ) const
inlinenoexcept

Definition at line 1651 of file types.hpp.

◆ hasSourcePicoseconds()

bool opcua::DataValue::hasSourcePicoseconds ( ) const
inlinenoexcept

Definition at line 1655 of file types.hpp.

◆ hasSourceTimestamp()

bool opcua::DataValue::hasSourceTimestamp ( ) const
inlinenoexcept

Definition at line 1647 of file types.hpp.

◆ hasStatus()

bool opcua::DataValue::hasStatus ( ) const
inlinenoexcept

Definition at line 1663 of file types.hpp.

◆ hasValue()

bool opcua::DataValue::hasValue ( ) const
inlinenoexcept

Definition at line 1643 of file types.hpp.

◆ serverPicoseconds()

uint16_t opcua::DataValue::serverPicoseconds ( ) const
inlinenoexcept

Get picoseconds interval added to the server timestamp.

Definition at line 1703 of file types.hpp.

◆ serverTimestamp()

DateTime opcua::DataValue::serverTimestamp ( ) const
inlinenoexcept

Get server timestamp for the value.

Definition at line 1693 of file types.hpp.

◆ setServerPicoseconds()

void opcua::DataValue::setServerPicoseconds ( uint16_t  serverPicoseconds)
inlinenoexcept

Set picoseconds interval added to the server timestamp.

Definition at line 1632 of file types.hpp.

◆ setServerTimestamp()

void opcua::DataValue::setServerTimestamp ( DateTime  serverTimestamp)
inlinenoexcept

Set server timestamp for the value.

Definition at line 1620 of file types.hpp.

◆ setSourcePicoseconds()

void opcua::DataValue::setSourcePicoseconds ( uint16_t  sourcePicoseconds)
inlinenoexcept

Set picoseconds interval added to the source timestamp.

Definition at line 1626 of file types.hpp.

◆ setSourceTimestamp()

void opcua::DataValue::setSourceTimestamp ( DateTime  sourceTimestamp)
inlinenoexcept

Set source timestamp for the value.

Examples
server_datasource.cpp.

Definition at line 1614 of file types.hpp.

◆ setStatus()

void opcua::DataValue::setStatus ( StatusCode  status)
inlinenoexcept

Set status.

Definition at line 1638 of file types.hpp.

◆ setValue() [1/2]

void opcua::DataValue::setValue ( const Variant value)
inline

Set value (copy).

Examples
server_datasource.cpp.

Definition at line 1602 of file types.hpp.

◆ setValue() [2/2]

void opcua::DataValue::setValue ( Variant &&  value)
inlinenoexcept

Set value (move).

Definition at line 1608 of file types.hpp.

◆ sourcePicoseconds()

uint16_t opcua::DataValue::sourcePicoseconds ( ) const
inlinenoexcept

Get picoseconds interval added to the source timestamp.

Definition at line 1698 of file types.hpp.

◆ sourceTimestamp()

DateTime opcua::DataValue::sourceTimestamp ( ) const
inlinenoexcept

Get source timestamp for the value.

Definition at line 1688 of file types.hpp.

◆ status()

StatusCode opcua::DataValue::status ( ) const
inlinenoexcept

Get status.

Definition at line 1708 of file types.hpp.

◆ value() [1/4]

Variant && opcua::DataValue::value ( ) &&
inlinenoexcept

Get value (rvalue).

Definition at line 1678 of file types.hpp.

◆ value() [2/4]

Variant & opcua::DataValue::value ( ) &
inlinenoexcept

Get value.

Examples
server_datasource.cpp, and server_valuecallback.cpp.

Definition at line 1668 of file types.hpp.

Referenced by opcua::Node< Connection >::readDataValue().

◆ value() [3/4]

const Variant && opcua::DataValue::value ( ) const &&
inlinenoexcept

Get value (rvalue).

Definition at line 1683 of file types.hpp.

◆ value() [4/4]

const Variant & opcua::DataValue::value ( ) const &
inlinenoexcept

Get value.

Definition at line 1673 of file types.hpp.

◆ Wrapper() [1/5]

constexpr opcua::Wrapper< T, Handler >::Wrapper ( )
constexprdefaultnoexcept

◆ Wrapper() [2/5]

constexpr opcua::Wrapper< T, Handler >::Wrapper ( const T &  native)
inlineexplicitconstexpr

Copy constructor with native object.

Definition at line 151 of file wrapper.hpp.

◆ Wrapper() [3/5]

constexpr opcua::Wrapper< T, Handler >::Wrapper ( const Wrapper other)
inlineconstexpr

Copy constructor.

Definition at line 147 of file wrapper.hpp.

◆ Wrapper() [4/5]

constexpr opcua::Wrapper< T, Handler >::Wrapper ( T &&  native)
inlineconstexprnoexcept

Move constructor with native object.

Definition at line 159 of file wrapper.hpp.

◆ Wrapper() [5/5]

constexpr opcua::Wrapper< T, Handler >::Wrapper ( Wrapper &&  other)
inlineconstexprnoexcept

Move constructor.

Definition at line 155 of file wrapper.hpp.