18#define UA_MAXCONTINUATIONPOINTS 5
30#ifdef UA_ENABLE_SUBSCRIPTIONS
61#ifdef UA_ENABLE_SUBSCRIPTIONS
75#ifdef UA_ENABLE_DIAGNOSTICS
76 UA_SessionSecurityDiagnosticsDataType securityDiagnostics;
77 UA_SessionDiagnosticsDataType diagnostics;
94#ifdef UA_ENABLE_SUBSCRIPTIONS
123#define UA_LOG_SESSION_INTERNAL(LOGGER, LEVEL, SESSION, MSG, ...) \
125 int nameLen = (SESSION) ? (int)(SESSION)->sessionName.length : 0; \
126 const char *nameStr = (SESSION) ? \
127 (const char*)(SESSION)->sessionName.data : NULL; \
128 UA_UInt32 chanId = ((SESSION) && (SESSION)->header.channel) ? \
129 (SESSION)->header.channel->securityToken.channelId : 0; \
130 UA_LOG_##LEVEL(LOGGER, UA_LOGCATEGORY_SESSION, \
131 "SecureChannel %" PRIu32 " | Session \"%.*s\" | " MSG "%.0s", \
132 chanId, nameLen, nameStr, __VA_ARGS__); \
135#if UA_LOGLEVEL <= 100
136# define UA_LOG_TRACE_SESSION(LOGGER, SESSION, ...) \
137 UA_MACRO_EXPAND(UA_LOG_SESSION_INTERNAL(LOGGER, TRACE, SESSION, __VA_ARGS__, ""))
139# define UA_LOG_TRACE_SESSION(LOGGER, SESSION, ...)
142#if UA_LOGLEVEL <= 200
143# define UA_LOG_DEBUG_SESSION(LOGGER, SESSION, ...) \
144 UA_MACRO_EXPAND(UA_LOG_SESSION_INTERNAL(LOGGER, DEBUG, SESSION, __VA_ARGS__, ""))
146# define UA_LOG_DEBUG_SESSION(LOGGER, SESSION, ...)
149#if UA_LOGLEVEL <= 300
150# define UA_LOG_INFO_SESSION(LOGGER, SESSION, ...) \
151 UA_MACRO_EXPAND(UA_LOG_SESSION_INTERNAL(LOGGER, INFO, SESSION, __VA_ARGS__, ""))
153# define UA_LOG_INFO_SESSION(LOGGER, SESSION, ...)
156#if UA_LOGLEVEL <= 400
157# define UA_LOG_WARNING_SESSION(LOGGER, SESSION, ...) \
158 UA_MACRO_EXPAND(UA_LOG_SESSION_INTERNAL(LOGGER, WARNING, SESSION, __VA_ARGS__, ""))
160# define UA_LOG_WARNING_SESSION(LOGGER, SESSION, ...)
163#if UA_LOGLEVEL <= 500
164# define UA_LOG_ERROR_SESSION(LOGGER, SESSION, ...) \
165 UA_MACRO_EXPAND(UA_LOG_SESSION_INTERNAL(LOGGER, ERROR, SESSION, __VA_ARGS__, ""))
167# define UA_LOG_ERROR_SESSION(LOGGER, SESSION, ...)
170#if UA_LOGLEVEL <= 600
171# define UA_LOG_FATAL_SESSION(LOGGER, SESSION, ...) \
172 UA_MACRO_EXPAND(UA_LOG_SESSION_INTERNAL(LOGGER, FATAL, SESSION, __VA_ARGS__, ""))
174# define UA_LOG_FATAL_SESSION(LOGGER, SESSION, ...)
#define _UA_BEGIN_DECLS
#undef UA_DEBUG_DUMP_PKGS
UA_PublishResponse response
SIMPLEQ_ENTRY(UA_PublishResponseEntry) listEntry
UA_UInt32 maxResponseMessageSize
SIMPLEQ_HEAD(, UA_PublishResponseEntry) responseQueue
size_t totalRetransmissionQueueSize
UA_ByteString serverNonce
ContinuationPoint * continuationPoints
TAILQ_HEAD(, UA_Subscription) subscriptions
UA_ApplicationDescription clientDescription
UA_UInt32 maxRequestMessageSize
UA_UInt16 availableContinuationPoints
Subscriptions are managed in a server-wide linked list.
_UA_BEGIN_DECLS typedef bool UA_Boolean
This Source Code Form is subject to the terms of the Mozilla Public License, v.
void UA_Session_queuePublishReq(UA_Session *session, UA_PublishResponseEntry *entry, UA_Boolean head)
void UA_Session_attachSubscription(UA_Session *session, UA_Subscription *sub)
void UA_Session_attachToSecureChannel(UA_Session *session, UA_SecureChannel *channel)
void UA_Session_updateLifetime(UA_Session *session)
If any activity on a session happens, the timeout is extended.
UA_PublishResponseEntry * UA_Session_dequeuePublishReq(UA_Session *session)
ContinuationPoint * ContinuationPoint_clear(ContinuationPoint *cp)
Returns the next entry in the linked list.
UA_StatusCode UA_Session_generateNonce(UA_Session *session)
void UA_Session_clear(UA_Session *session, UA_Server *server)
void UA_Session_detachFromSecureChannel(UA_Session *session)
void UA_Session_detachSubscription(UA_Server *server, UA_Session *session, UA_Subscription *sub, UA_Boolean releasePublishResponses)
If releasePublishResponses is true and the last subscription is removed, all outstanding PublishRespo...
void UA_Session_init(UA_Session *session)
struct ContinuationPoint ContinuationPoint
struct UA_PublishResponseEntry UA_PublishResponseEntry
UA_Subscription * UA_Session_getSubscriptionById(UA_Session *session, UA_UInt32 subscriptionId)