open62541 1.3.12
Open source implementation of OPC UA
Loading...
Searching...
No Matches
ua_client_internal.h
Go to the documentation of this file.
1/** This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 *
5 * Copyright 2015-2016 (c) Sten GrĂ¼ner
6 * Copyright 2015-2017 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
7 * Copyright 2015 (c) Oleksiy Vasylyev
8 * Copyright 2016-2017 (c) Florian Palm
9 * Copyright 2017 (c) Stefan Profanter, fortiss GmbH
10 * Copyright 2017 (c) Mark Giraud, Fraunhofer IOSB
11 */
12
13#ifndef UA_CLIENT_INTERNAL_H_
14#define UA_CLIENT_INTERNAL_H_
15
16#define UA_INTERNAL
17#include <open62541/client.h>
20
21#include "open62541_queue.h"
22#include "ua_securechannel.h"
23#include "ua_timer.h"
24
26
27
28/** Subscriptions Handling */
29
30
31#ifdef UA_ENABLE_SUBSCRIPTIONS
32
37
50
63
64void
66
67/** Exposed for fuzzing */
70
71void
73
74void
76
77#endif /* UA_ENABLE_SUBSCRIPTIONS */
78
79
80/** Client */
81
82
93
94void
96 UA_StatusCode statusCode);
97
98void
100
109
110struct UA_Client {
113
114 /* Overall connection status */
116
117 /* Old status to notify only changes */
121
122 UA_Boolean findServersHandshake; /* Ongoing FindServers */
123 UA_Boolean endpointsHandshake; /* Ongoing GetEndpoints */
124 UA_Boolean noSession; /* Don't open a session */
125
126 /* Connection */
128 UA_String endpointUrl; /* Used to extract address and port */
129 UA_String discoveryUrl; /* The discoveryUrl (also used to signal which
130 application we want to connect to in the HEL/ACK
131 handshake). */
132
133 /* SecureChannel */
137
138 /* Session */
144
145 /* Connectivity check */
148
149 /* Async Service */
151
152 /* Subscriptions */
153#ifdef UA_ENABLE_SUBSCRIPTIONS
158#endif
159};
160
161UA_StatusCode connectSync(UA_Client *client); /* Only exposed for unit tests */
163void processERRResponse(UA_Client *client, const UA_ByteString *chunk);
164void processACKResponse(UA_Client *client, const UA_ByteString *chunk);
167
170
173
174void
176 const UA_GetEndpointsResponse *response,
177 const UA_String *endpointUrl);
178
180
181#endif /* UA_CLIENT_INTERNAL_H_ */
void(* UA_ClientAsyncServiceCallback)(UA_Client *client, void *userdata, UA_UInt32 requestId, void *response)
Use the type versions of this method.
Definition client.h:486
void(* UA_Client_EventNotificationCallback)(UA_Client *client, UA_UInt32 subId, void *subContext, UA_UInt32 monId, void *monContext, size_t nEventFields, UA_Variant *eventFields)
Callback for Event notifications.
void(* UA_Client_DeleteMonitoredItemCallback)(UA_Client *client, UA_UInt32 subId, void *subContext, UA_UInt32 monId, void *monContext)
Callback for the deletion of a MonitoredItem.
void(* UA_Client_StatusChangeNotificationCallback)(UA_Client *client, UA_UInt32 subId, void *subContext, UA_StatusChangeNotification *notification)
_UA_BEGIN_DECLS typedef void(* UA_Client_DeleteSubscriptionCallback)(UA_Client *client, UA_UInt32 subId, void *subContext)
This Source Code Form is subject to the terms of the Mozilla Public License, v.
void(* UA_Client_DataChangeNotificationCallback)(UA_Client *client, UA_UInt32 subId, void *subContext, UA_UInt32 monId, void *monContext, UA_DataValue *value)
Callback for DataChange notifications.
UA_SessionState
Definition common.h:132
UA_SecureChannelState
Definition common.h:120
#define _UA_BEGIN_DECLS
#undef UA_DEBUG_DUMP_PKGS
Definition config.h:89
#define _UA_END_DECLS
Definition config.h:96
#define LIST_HEAD(name, type)
#define LIST_ENTRY(type)
struct AsyncServiceCall::@33 pointers
const UA_DataType * responseType
UA_ClientAsyncServiceCallback callback
UA_ClientAsyncServiceCallback userCallback
This Source Code Form is subject to the terms of the Mozilla Public License, v.
Definition client.h:35
struct UA_Client_MonitoredItem::@29 listEntry
UA_Client_DeleteMonitoredItemCallback deleteCallback
union UA_Client_MonitoredItem::@30 handler
UA_Client_EventNotificationCallback eventCallback
UA_Client_DataChangeNotificationCallback dataChangeCallback
UA_SubscriptionAcknowledgement subAck
struct UA_Client_NotificationsAckNumber::@28 listEntry
struct UA_Client_Subscription::@32 monitoredItems
struct UA_Client_Subscription::@31 listEntry
UA_Client_DeleteSubscriptionCallback deleteCallback
UA_Client_StatusChangeNotificationCallback statusChangeCallback
UA_UInt32 requestId
UA_ByteString remoteNonce
UA_String endpointUrl
UA_SecureChannel channel
UA_UInt16 currentlyOutStandingPublishRequests
UA_NodeId authenticationToken
UA_StatusCode oldConnectStatus
UA_Boolean endpointsHandshake
UA_Boolean noSession
UA_SecureChannelState oldChannelState
struct UA_Client::@34 asyncServiceCalls
UA_DateTime nextChannelRenewal
UA_ByteString localNonce
UA_DateTime lastConnectivityCheck
struct UA_Client::@35 pendingNotificationsAcks
UA_Boolean findServersHandshake
UA_Boolean pendingConnectivityCheck
UA_ClientConfig config
UA_StatusCode connectStatus
struct UA_Client::@36 subscriptions
UA_Connection connection
UA_SessionState sessionState
UA_UInt32 requestHandle
UA_SessionState oldSessionState
UA_String discoveryUrl
UA_UInt32 monitoredItemHandles
_UA_BEGIN_DECLS typedef bool UA_Boolean
This Source Code Form is subject to the terms of the Mozilla Public License, v.
Definition types.h:26
uint16_t UA_UInt16
Definition types.h:46
uint32_t UA_UInt32
Definition types.h:56
int64_t UA_DateTime
Definition types.h:144
uint32_t UA_StatusCode
Definition types.h:77
double UA_Double
Definition types.h:74
void UA_Client_Subscriptions_backgroundPublishInactivityCheck(UA_Client *client)
struct CustomCallback CustomCallback
UA_StatusCode UA_Client_preparePublishRequest(UA_Client *client, UA_PublishRequest *request)
Exposed for fuzzing.
void Client_warnEndpointsResult(UA_Client *client, const UA_GetEndpointsResponse *response, const UA_String *endpointUrl)
void processOPNResponse(UA_Client *client, const UA_ByteString *message)
struct AsyncServiceCall AsyncServiceCall
Client.
void UA_Client_Subscriptions_backgroundPublish(UA_Client *client)
void UA_Client_Subscriptions_clean(UA_Client *client)
void processACKResponse(UA_Client *client, const UA_ByteString *chunk)
UA_StatusCode connectSync(UA_Client *client)
void UA_Client_AsyncService_removeAll(UA_Client *client, UA_StatusCode statusCode)
void processERRResponse(UA_Client *client, const UA_ByteString *chunk)
UA_StatusCode receiveResponseAsync(UA_Client *client, UA_UInt32 timeout)
_UA_BEGIN_DECLS struct UA_Client_NotificationsAckNumber UA_Client_NotificationsAckNumber
Subscriptions Handling.
struct UA_Client_Subscription UA_Client_Subscription
struct UA_Client_MonitoredItem UA_Client_MonitoredItem
UA_StatusCode connectIterate(UA_Client *client, UA_UInt32 timeout)
void UA_Client_AsyncService_cancel(UA_Client *client, AsyncServiceCall *ac, UA_StatusCode statusCode)
void closeSecureChannel(UA_Client *client)
void notifyClientState(UA_Client *client)