S2OPC OPCUA Toolkit
sopc_toolkit_async_api.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 
30 #ifndef SOPC_TOOLKIT_ASYNC_API_H_
31 #define SOPC_TOOLKIT_ASYNC_API_H_
32 
33 #include <stdbool.h>
34 #include <stdint.h>
35 
36 #include "sopc_builtintypes.h"
37 #include "sopc_enums.h"
38 #include "sopc_toolkit_config.h"
39 #include "sopc_user_app_itf.h"
40 
52 
64 
79  void* requestStruct,
80  uintptr_t requestContext);
106 
114 
116 {
118  reverseEndpointConfigIdx; /*<< Index of the Reverse Endpoint configuration to listen for server connection
119  returned by ::SOPC_ToolkitClient_AddReverseEndpointConfig().
120  It shall be 0 for a classic connection and > 0 for a reverse connection. */
122  secureChannelConfigIdx; /*<< Index of the Secure Channel configuration for endpoint connection
123  returned by ::SOPC_ToolkitClient_AddSecureChannelConfig().
124  It shall not be 0. */
126 
134 
144  SOPC_ReverseEndpointConfigIdx reverseEndpointConfigIdx,
145  SOPC_SecureChannelConfigIdx secureChannelConfigIdx);
146 
180  const char* sessionName,
181  uintptr_t sessionContext,
182  SOPC_ExtensionObject* userToken,
183  void* userTokenCtx);
184 
198  const char* sessionName,
199  uintptr_t sessionContext,
200  const char* policyId);
201 
226  SOPC_EndpointConnectionCfg endpointConnectionCfg,
227  const char* sessionName,
228  uintptr_t sessionContext,
229  const char* policyId,
230  const char* username,
231  const uint8_t* password,
232  int32_t length_password);
233 
251  const char* sessionName,
252  uintptr_t sessionContext,
253  const char* policyId,
254  const SOPC_SerializedCertificate* pCertX509,
256 
270  void* requestStruct,
271  uintptr_t requestContext);
272 
281 
298  void* discoveryReqStruct,
299  uintptr_t requestContext);
311 
323 
340 
341 #endif /* SOPC_TOOLKIT_ASYNC_API_H_ */
SOPC_ReverseEndpointConfigIdx
uint32_t SOPC_ReverseEndpointConfigIdx
Index type for reverse endpoint configuration, 0 is an invalid index.
Definition: sopc_toolkit_config.h:136
SOPC_ToolkitClient_AsyncActivateSession
SOPC_ReturnStatus SOPC_ToolkitClient_AsyncActivateSession(SOPC_EndpointConnectionCfg endpointConnectionCfg, const char *sessionName, uintptr_t sessionContext, SOPC_ExtensionObject *userToken, void *userTokenCtx)
Request to activate a new session for the given endpoint connection configuration as client.
SOPC_ToolkitClient_AsyncOpenReverseEndpoint
void SOPC_ToolkitClient_AsyncOpenReverseEndpoint(SOPC_ReverseEndpointConfigIdx reverseEndpointConfigIdx)
Request to open a connection listener for the given reverse endpoint description configuration as a c...
SOPC_EndpointConnectionCfg
struct SOPC_EndpointConnectionCfg SOPC_EndpointConnectionCfg
SOPC_SessionId
uint32_t SOPC_SessionId
Session identifier type, instances are generated by SE_ACTIVATED_SESSION.
Definition: sopc_user_app_itf.h:375
SOPC_EndpointConnectionCfg::secureChannelConfigIdx
SOPC_SecureChannelConfigIdx secureChannelConfigIdx
Definition: sopc_toolkit_async_api.h:122
SOPC_EndpointConnectionCfg
Definition: sopc_toolkit_async_api.h:116
SOPC_ExtensionObject
An ExtensionObject is a container for any Structured DataTypes which cannot be encoded as one of the ...
Definition: sopc_builtintypes.h:260
SOPC_ToolkitServer_AsyncReEvalUserCertSessions
void SOPC_ToolkitServer_AsyncReEvalUserCertSessions(void)
Request to re-evaluate X509IdentityToken certificates for all active sessions due to user PKI trustli...
SOPC_ToolkitServer_AsyncReEvalSecureChannels
void SOPC_ToolkitServer_AsyncReEvalSecureChannels(bool ownCert)
Configuration parameters for a connection to a server endpoint. The connection is either initiated by...
SOPC_EndpointConfigIdx
uint32_t SOPC_EndpointConfigIdx
Index type for server endpoint configuration, 0 is an invalid index.
Definition: sopc_toolkit_config.h:118
SOPC_SerializedAsymmetricKey
SOPC_SecretBuffer SOPC_SerializedAsymmetricKey
A serialized representation of an asymmetric key.
Definition: sopc_crypto_decl.h:70
SOPC_ToolkitClient_AsyncCloseSession
void SOPC_ToolkitClient_AsyncCloseSession(SOPC_SessionId sessionId)
Request to close the given session.
SOPC_Buffer
Bytes buffer structure.
Definition: sopc_buffer.h:38
sopc_enums.h
sopc_builtintypes.h
SOPC_EndpointConnectionCfg::reverseEndpointConfigIdx
SOPC_ReverseEndpointConfigIdx reverseEndpointConfigIdx
Definition: sopc_toolkit_async_api.h:118
SOPC_SecureChannelConfigIdx
uint32_t SOPC_SecureChannelConfigIdx
Index type for client secure channel configuration, 0 is an invalid index.
Definition: sopc_toolkit_config.h:103
SOPC_ToolkitServer_AsyncOpenEndpoint
void SOPC_ToolkitServer_AsyncOpenEndpoint(SOPC_EndpointConfigIdx endpointConfigIdx)
Request to open a connection listener for the given endpoint description configuration as a server.
SOPC_ToolkitClient_AsyncSendRequestOnSession
void SOPC_ToolkitClient_AsyncSendRequestOnSession(SOPC_SessionId sessionId, void *requestStruct, uintptr_t requestContext)
Request to send a service request on given active session.
SOPC_ToolkitServer_AsyncLocalServiceRequest
void SOPC_ToolkitServer_AsyncLocalServiceRequest(SOPC_EndpointConfigIdx endpointConfigIdx, void *requestStruct, uintptr_t requestContext)
Request to execute locally the given service request on server and receive response.
sopc_user_app_itf.h
Contains the types to be used by the user application to use the Toolkit.
SOPC_EndpointConnectionCfg_CreateClassic
SOPC_EndpointConnectionCfg SOPC_EndpointConnectionCfg_CreateClassic(SOPC_SecureChannelConfigIdx secureChannelConfigIdx)
Create an endpoint connection configuration for a classic connection (initiated by client)
SOPC_EndpointConnectionCfg_CreateReverse
SOPC_EndpointConnectionCfg SOPC_EndpointConnectionCfg_CreateReverse(SOPC_ReverseEndpointConfigIdx reverseEndpointConfigIdx, SOPC_SecureChannelConfigIdx secureChannelConfigIdx)
Create an endpoint connection configuration for a reverse connection (initiated by server)
sopc_toolkit_config.h
This module shall be used to initialize, configure and clear/terminate the toolkit execution.
SOPC_ToolkitClient_AsyncSendDiscoveryRequest
SOPC_ReturnStatus SOPC_ToolkitClient_AsyncSendDiscoveryRequest(SOPC_EndpointConnectionCfg endpointConnectionCfg, void *discoveryReqStruct, uintptr_t requestContext)
Request to send a discovery service request without using session.
SOPC_ToolkitClient_AsyncCloseReverseEndpoint
void SOPC_ToolkitClient_AsyncCloseReverseEndpoint(SOPC_ReverseEndpointConfigIdx reverseEndpointConfigIdx)
Request to close a connection listener for the given endpoint description configuration.
SOPC_ToolkitClient_AsyncActivateSession_Certificate
SOPC_ReturnStatus SOPC_ToolkitClient_AsyncActivateSession_Certificate(SOPC_EndpointConnectionCfg endpointConnectionCfg, const char *sessionName, uintptr_t sessionContext, const char *policyId, const SOPC_SerializedCertificate *pCertX509, SOPC_SerializedAsymmetricKey *pKey)
Request to activate a session with a x509IdentityToken. See SOPC_ToolkitClient_AsyncActivateSession()...
SOPC_ToolkitClient_AsyncReEvalSecureChannels
void SOPC_ToolkitClient_AsyncReEvalSecureChannels(bool ownCert)
Request to re-evaluate the client secure channels due to client certificate / key update (force SC re...
SOPC_ToolkitServer_AsyncCloseEndpoint
void SOPC_ToolkitServer_AsyncCloseEndpoint(SOPC_EndpointConfigIdx endpointConfigIdx)
Request to close a connection listener for the given endpoint description configuration.
SOPC_ToolkitClient_AsyncActivateSession_Anonymous
SOPC_ReturnStatus SOPC_ToolkitClient_AsyncActivateSession_Anonymous(SOPC_EndpointConnectionCfg endpointConnectionCfg, const char *sessionName, uintptr_t sessionContext, const char *policyId)
Request to activate an anonymous session. See SOPC_ToolkitClient_AsyncActivateSession()
SOPC_ToolkitClient_AsyncActivateSession_UsernamePassword
SOPC_ReturnStatus SOPC_ToolkitClient_AsyncActivateSession_UsernamePassword(SOPC_EndpointConnectionCfg endpointConnectionCfg, const char *sessionName, uintptr_t sessionContext, const char *policyId, const char *username, const uint8_t *password, int32_t length_password)
Request to activate a session with a UserNameIdentityToken. See SOPC_ToolkitClient_AsyncActivateSessi...
SOPC_ReturnStatus
SOPC_ReturnStatus
Definition: libs2opc_client.h:64