open62541pp 0.16.0
C++ wrapper of open62541
|
#include <session.hpp>
High-level session class to manage client sessions.
Sessions are identified by a server-assigned session id (of type NodeId). A session carries attributes in a key-value list. Custom attributes/meta-data can be attached to a session as key-value pairs of QualifiedName and Variant.
Definition at line 20 of file session.hpp.
Public Member Functions | |
Session (Server &connection, NodeId sessionId) noexcept | |
Server & | connection () noexcept |
const Server & | connection () const noexcept |
const NodeId & | id () const noexcept |
Variant | getSessionAttribute (const QualifiedName &key) |
void | setSessionAttribute (const QualifiedName &key, const Variant &value) |
void | deleteSessionAttribute (const QualifiedName &key) |
void | close () |
Definition at line 22 of file session.hpp.
|
inlinenoexcept |
Get the server instance.
Definition at line 27 of file session.hpp.
|
inlinenoexcept |
Get the server instance.
Definition at line 32 of file session.hpp.
|
inlinenoexcept |
Get the session identifier.
Definition at line 37 of file session.hpp.
Variant opcua::Session::getSessionAttribute | ( | const QualifiedName & | key | ) |
Get a session attribute by its key.
void opcua::Session::setSessionAttribute | ( | const QualifiedName & | key, |
const Variant & | value ) |
Attach a session attribute as a key-value pair.
void opcua::Session::deleteSessionAttribute | ( | const QualifiedName & | key | ) |
Delete a session attribute by its key.
void opcua::Session::close | ( | ) |
Manually close this session.