open62541pp 0.16.0
C++ wrapper of open62541
Loading...
Searching...
No Matches
server_context.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <functional>
5#include <memory>
6#include <mutex>
7#include <set>
8#include <utility> // pair
9#include <vector>
10
11#include "open62541pp/config.hpp"
15#include "open62541pp/detail/open62541/common.h" // UA_AccessControl
18#include "open62541pp/types.hpp" // NodeId, Variant
19
20namespace opcua::detail {
21
25#ifdef UA_ENABLE_METHODCALLS
26 std::function<void(Span<const Variant> input, Span<Variant> output)> methodCallback;
27#endif
28};
29
35
36/**
37 * Internal storage for Server class.
38 */
42 std::atomic<bool> running{false};
43 std::mutex mutexRun;
44
45 std::vector<DataType> dataTypes;
46 std::unique_ptr<UA_DataTypeArray> dataTypeArray;
47
48#ifdef UA_ENABLE_SUBSCRIPTIONS
49 using SubId = uint32_t; // always 0
50 using MonId = uint32_t;
51 using SubMonId = std::pair<uint32_t, uint32_t>;
53#endif
54
56};
57
58} // namespace opcua::detail
View to a contiguous sequence of objects, similar to std::span in C++20.
Definition span.hpp:26
Thread-safe map for context objects.
Catch & store exceptions from user-defined callbacks in an exception-unaware context (open62541).
void(* closeSession)(UA_Server *server, UA_AccessControl *ac, const UA_NodeId *sessionId, void *sessionContext)
UA_StatusCode(* activateSession)(UA_Server *server, UA_AccessControl *ac, const UA_EndpointDescription *endpointDescription, const UA_ByteString *secureChannelRemoteCertificate, const UA_NodeId *sessionId, const UA_ExtensionObject *userIdentityToken, void **sessionContext)
Data source backend for variable nodes.
Definition nodestore.hpp:45
Value callbacks for variable nodes.
Definition nodestore.hpp:16
ValueBackendDataSource dataSource
std::function< void(Span< const Variant > input, Span< Variant > output)> methodCallback
Internal storage for Server class.
std::pair< uint32_t, uint32_t > SubMonId
ContextMap< NodeId, NodeContext > nodeContexts
ContextMap< SubMonId, services::detail::MonitoredItemContext > monitoredItems
std::vector< DataType > dataTypes
std::unique_ptr< UA_DataTypeArray > dataTypeArray
decltype(UA_AccessControl::activateSession) activateSessionUser
decltype(UA_AccessControl::closeSession) closeSessionUser