S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
libs2opc_client.h
Go to the documentation of this file.
1/*
2 * Licensed to Systerel under one or more contributor license
3 * agreements. See the NOTICE file distributed with this work
4 * for additional information regarding copyright ownership.
5 * Systerel licenses this file to you under the Apache
6 * License, Version 2.0 (the "License"); you may not use this
7 * file except in compliance with the License. You may obtain
8 * a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
43#ifndef LIBS2OPC_CLIENT_H_
44#define LIBS2OPC_CLIENT_H_
45
46#include <stdbool.h>
47#include <stdint.h>
48
49#include "sopc_types.h"
50
52
57
74
86 SOPC_StatusCode status);
87
123 void* request,
124 uintptr_t userContext);
125
170 void* request,
171 void** response);
190 SOPC_ClientConnectionEvent_Fct* connectEventCb,
191 SOPC_ClientConnection** secureConnection);
192
210
250 void* request,
251 uintptr_t userContext);
252
304 void* request,
305 void** response);
306
308
332 SOPC_StatusCode status,
333 SOPC_EncodeableType* notificationType,
334 uint32_t nbNotifElts,
335 const void* notification,
336 uintptr_t* monitoredItemCtxArray);
337
359 SOPC_ClientConnection* secureConnection,
362 uintptr_t userParam);
363
374
391 uint32_t nbPublishTokens);
392
405 double* revisedPublishingInterval,
406 uint32_t* revisedLifetimeCount,
407 uint32_t* revisedMaxKeepAliveCount);
408
418
427
440 uint32_t* pSubscriptionId);
441
472 const SOPC_ClientHelper_Subscription* subscription,
473 OpcUa_CreateMonitoredItemsRequest* monitoredItemsReq,
474 const uintptr_t* monitoredItemCtxArray,
475 OpcUa_CreateMonitoredItemsResponse* monitoredItemsResp);
476
497 const SOPC_ClientHelper_Subscription* subscription,
498 OpcUa_DeleteMonitoredItemsRequest* delMonitoredItemsReq,
499 OpcUa_DeleteMonitoredItemsResponse* delMonitoredItemsResp);
500
542 void* subOrMIrequest,
543 void** subOrMIresponse);
544
580 void* subOrMIrequest,
581 uintptr_t userContext);
582
583#endif
SOPC_ReturnStatus SOPC_ClientHelper_ServiceSync(SOPC_ClientConnection *secureConnection, void *request, void **response)
Executes an OPC UA service on server (read, write, browse, discovery service, etc....
SOPC_ReturnStatus SOPC_ClientHelper_Subscription_DeleteMonitoredItems(const SOPC_ClientHelper_Subscription *subscription, OpcUa_DeleteMonitoredItemsRequest *delMonitoredItemsReq, OpcUa_DeleteMonitoredItemsResponse *delMonitoredItemsResp)
Deletes monitored items on the given subscription using the server monitored item ids....
SOPC_ClientHelper_Subscription * SOPC_ClientHelper_CreateSubscription(SOPC_ClientConnection *secureConnection, OpcUa_CreateSubscriptionRequest *subParams, SOPC_ClientSubscriptionNotification_Fct *subNotifCb, uintptr_t userParam)
Creates a subscription on the server.
SOPC_ReturnStatus SOPC_ClientHelper_Subscription_CreateMonitoredItems(const SOPC_ClientHelper_Subscription *subscription, OpcUa_CreateMonitoredItemsRequest *monitoredItemsReq, const uintptr_t *monitoredItemCtxArray, OpcUa_CreateMonitoredItemsResponse *monitoredItemsResp)
Creates new monitored items on the given subscription. A context array might be provided and context ...
SOPC_ClientConnection * SOPC_ClientHelper_GetSecureConnection(const SOPC_ClientHelper_Subscription *subscription)
Gets the secure connection on which the subscription rely on.
SOPC_ReturnStatus SOPC_ClientHelper_Subscription_SyncService(const SOPC_ClientHelper_Subscription *subscription, void *subOrMIrequest, void **subOrMIresponse)
Executes an OPC UA service on server related to the given subscription synchronously.
struct SOPC_ClientConnection SOPC_ClientConnection
Structure representing a secure connection to a server.
Definition libs2opc_client.h:56
uintptr_t SOPC_ClientHelper_Subscription_GetUserParam(const SOPC_ClientHelper_Subscription *subscription)
Returns the user parameter defined in SOPC_ClientHelper_CreateSubscription.
SOPC_ReturnStatus SOPC_ClientHelper_Connect(SOPC_SecureConnection_Config *secConnConfig, SOPC_ClientConnectionEvent_Fct *connectEventCb, SOPC_ClientConnection **secureConnection)
Establishes the connection in a blocking way (synchronously).
SOPC_ReturnStatus SOPC_ClientHelper_DiscoveryServiceSync(SOPC_SecureConnection_Config *secConnConfig, void *request, void **response)
Sends a discovery request without user session creation and activation and retrieve response synchron...
SOPC_ReturnStatus SOPC_ClientHelper_GetSubscriptionId(const SOPC_ClientHelper_Subscription *subscription, uint32_t *pSubscriptionId)
Gets the subscription Id associated to the subscription. It should only be used in the context of ser...
void SOPC_ClientConnectionEvent_Fct(SOPC_ClientConnection *conn, SOPC_ClientConnectionEvent event, SOPC_StatusCode status)
Type of callback called on client connection event.
Definition libs2opc_client.h:84
SOPC_ReturnStatus SOPC_ClientHelper_Subscription_AsyncService(const SOPC_ClientHelper_Subscription *subscription, void *subOrMIrequest, uintptr_t userContext)
Executes an OPC UA service on server related to the given subscription asynchronously....
SOPC_ClientConnectionEvent
Definition libs2opc_client.h:59
@ SOPC_ClientConnectionEvent_Connected
Definition libs2opc_client.h:66
@ SOPC_ClientConnectionEvent_Disconnected
Definition libs2opc_client.h:60
@ SOPC_ClientConnectionEvent_Reconnecting
Definition libs2opc_client.h:70
SOPC_ReturnStatus SOPC_ClientHelper_DeleteSubscription(SOPC_ClientHelper_Subscription **subscription)
Deletes a subscription on the server.
struct SOPC_ClientHelper_Subscription SOPC_ClientHelper_Subscription
Definition libs2opc_client.h:307
SOPC_ReturnStatus SOPC_ClientHelper_Subscription_GetRevisedParameters(SOPC_ClientHelper_Subscription *subscription, double *revisedPublishingInterval, uint32_t *revisedLifetimeCount, uint32_t *revisedMaxKeepAliveCount)
Gets the created subscription parameters values revised by the server.
SOPC_ReturnStatus SOPC_ClientHelper_Disconnect(SOPC_ClientConnection **secureConnection)
Disconnects the connection established with SOPC_ClientHelper_Connect in a blocking way (synchronousl...
SOPC_ReturnStatus SOPC_ClientHelper_Subscription_SetAvailableTokens(SOPC_ClientHelper_Subscription *subscription, uint32_t nbPublishTokens)
Sets the number of publish tokens to be used for the subscription. This number shall be greater than ...
void SOPC_ClientSubscriptionNotification_Fct(const SOPC_ClientHelper_Subscription *subscription, SOPC_StatusCode status, SOPC_EncodeableType *notificationType, uint32_t nbNotifElts, const void *notification, uintptr_t *monitoredItemCtxArray)
Type of callback called on Subscription Notification.
Definition libs2opc_client.h:331
SOPC_ReturnStatus SOPC_ClientHelper_DiscoveryServiceAsync(SOPC_SecureConnection_Config *secConnConfig, void *request, uintptr_t userContext)
Sends a discovery request without user session creation and activation and retrieve response asynchro...
SOPC_ReturnStatus SOPC_ClientHelper_ServiceAsync(SOPC_ClientConnection *secureConnection, void *request, uintptr_t userContext)
Executes an OPC UA service on server (read, write, browse, discovery service, etc....
High level interface to configure an OPC UA client.
uint32_t SOPC_StatusCode
Definition sopc_builtintypes.h:36
enum _SOPC_ReturnStatus SOPC_ReturnStatus
Common enumerations for S2OPC.
Encodeable object type structure definition. It provides all the services functions associated with t...
Definition sopc_encodeabletype.h:177
Structure representing a secure connection configuration (secure channel + session) which allow to es...
Definition sopc_user_app_itf.h:216
Definition sopc_types.h:5562
Definition sopc_types.h:5586
Definition sopc_types.h:5868
Definition sopc_types.h:5818
Definition sopc_types.h:5841