S2OPC OPCUA Toolkit
|
This module shall be used to initialize, configure and clear/terminate the toolkit execution. More...
#include "sopc_address_space.h"
#include "sopc_user_app_itf.h"
#include "sopc_builtintypes.h"
#include "sopc_common_build_info.h"
#include "sopc_types.h"
Go to the source code of this file.
Typedefs | |
typedef uint32_t | SOPC_SecureChannelConfigIdx |
Index type for client secure channel configuration, 0 is an invalid index. | |
typedef uint32_t | SOPC_EndpointConfigIdx |
Index type for server endpoint configuration, 0 is an invalid index. | |
typedef uint32_t | SOPC_ReverseEndpointConfigIdx |
Index type for reverse endpoint configuration, 0 is an invalid index. | |
Functions | |
SOPC_ReturnStatus | SOPC_Toolkit_Initialize (SOPC_ComEvent_Fct *pAppFct) |
Initialize the toolkit configuration, libraries and threads. | |
SOPC_ReturnStatus | SOPC_ToolkitServer_Configured (void) |
Define toolkit configuration as configured and lock its state until toolkit clear operation. | |
void | SOPC_Toolkit_Clear (void) |
Clear the stack configuration. | |
SOPC_ReturnStatus | SOPC_ToolkitServer_SetAddressSpaceConfig (SOPC_AddressSpace *addressSpace) |
Set the given Address Space for the current toolkit server (SOPC_Toolkit_Initialize required and prior to SOPC_ToolkitServer_Configured call). Note: only one address space can be set, further call will be refused. | |
SOPC_ReturnStatus | SOPC_ToolkitServer_SetAddressSpaceNotifCb (SOPC_AddressSpaceNotif_Fct *pAddSpaceNotifFct) |
Set the given Address Space modification notification callback for the current toolkit server (SOPC_Toolkit_Initialize required and prior to SOPC_ToolkitServer_Configured call). | |
SOPC_SecureChannelConfigIdx | SOPC_ToolkitClient_AddSecureChannelConfig (SOPC_SecureChannel_Config *scConfig) |
Record the given secure channel configuration for endpoint connection in returned index (SOPC_Toolkit_Initialize required and prior to SOPC_ToolkitServer_Configured call). | |
SOPC_EndpointConfigIdx | SOPC_ToolkitServer_AddEndpointConfig (SOPC_Endpoint_Config *config) |
Record the given endpoint configuration in given index (SOPC_Toolkit_Initialize required and prior to SOPC_ToolkitServer_Configured call). | |
SOPC_ReverseEndpointConfigIdx | SOPC_ToolkitClient_AddReverseEndpointConfig (const char *reverseEndpointURL) |
Record the given client reverse endpoint configuration in returned index (SOPC_Toolkit_Initialize required). | |
SOPC_Toolkit_Build_Info | SOPC_ToolkitConfig_GetBuildInfo (void) |
Get Toolkit build information. | |
void | SOPC_ToolkitClient_ClearAllSCs (void) |
Close all Secure Channels established as client and clear associated configurations added by SOPC_ToolkitClient_AddSecureChannelConfig. All previous index returned by SOPC_ToolkitClient_AddSecureChannelConfig are invalid after calling this function. | |
This module shall be used to initialize, configure and clear/terminate the toolkit execution.
It is in charge to initialize each event based layer (sockets, secure channels, services) which will start the associated threads. It is also necessary to configure the endpoint description configuration and address space of a toolkit server instance, or the endpoint connection configuration of a toolkit client instance.
typedef uint32_t SOPC_SecureChannelConfigIdx |
Index type for client secure channel configuration, 0 is an invalid index.
typedef uint32_t SOPC_EndpointConfigIdx |
Index type for server endpoint configuration, 0 is an invalid index.
typedef uint32_t SOPC_ReverseEndpointConfigIdx |
Index type for reverse endpoint configuration, 0 is an invalid index.
SOPC_ReturnStatus SOPC_Toolkit_Initialize | ( | SOPC_ComEvent_Fct * | pAppFct | ) |
Initialize the toolkit configuration, libraries and threads.
pAppFct | Pointer to applicative code function in charge of toolkit communication events |
pAppFct
== NULL or SOPC_STATUS_INVALID_STATE if toolkit already initialized and SOPC_STATUS_NOK otherwise SOPC_ReturnStatus SOPC_ToolkitServer_Configured | ( | void | ) |
Define toolkit configuration as configured and lock its state until toolkit clear operation.
void SOPC_Toolkit_Clear | ( | void | ) |
Clear the stack configuration.
SOPC_ReturnStatus SOPC_ToolkitServer_SetAddressSpaceConfig | ( | SOPC_AddressSpace * | addressSpace | ) |
Set the given Address Space for the current toolkit server (SOPC_Toolkit_Initialize required and prior to SOPC_ToolkitServer_Configured call). Note: only one address space can be set, further call will be refused.
addressSpace | The address space definition |
SOPC_ReturnStatus SOPC_ToolkitServer_SetAddressSpaceNotifCb | ( | SOPC_AddressSpaceNotif_Fct * | pAddSpaceNotifFct | ) |
Set the given Address Space modification notification callback for the current toolkit server (SOPC_Toolkit_Initialize required and prior to SOPC_ToolkitServer_Configured call).
Note: only one callback can be set, further call will be refused.
pAddSpaceNotifFct | The address space notification event callback definition |
SOPC_SecureChannelConfigIdx SOPC_ToolkitClient_AddSecureChannelConfig | ( | SOPC_SecureChannel_Config * | scConfig | ) |
Record the given secure channel configuration for endpoint connection in returned index (SOPC_Toolkit_Initialize required and prior to SOPC_ToolkitServer_Configured call).
SOPC_EndpointConfigIdx SOPC_ToolkitServer_AddEndpointConfig | ( | SOPC_Endpoint_Config * | config | ) |
Record the given endpoint configuration in given index (SOPC_Toolkit_Initialize required and prior to SOPC_ToolkitServer_Configured call).
Note1: it is forbidden to have 2 configurations with same endpointURL Note2: if security policy None is not activated, less than SOPC_MAX_SECU_POLICIES_CFG shall be defined to allow discovery services access to be added.
SOPC_ReverseEndpointConfigIdx SOPC_ToolkitClient_AddReverseEndpointConfig | ( | const char * | reverseEndpointURL | ) |
Record the given client reverse endpoint configuration in returned index (SOPC_Toolkit_Initialize required).
reverseEndpointURL | The client endpointURL for reverse connections from server(s) |
Note1: it is forbidden to have 2 configurations with same endpointURL
SOPC_Toolkit_Build_Info SOPC_ToolkitConfig_GetBuildInfo | ( | void | ) |
Get Toolkit build information.
void SOPC_ToolkitClient_ClearAllSCs | ( | void | ) |
Close all Secure Channels established as client and clear associated configurations added by SOPC_ToolkitClient_AddSecureChannelConfig. All previous index returned by SOPC_ToolkitClient_AddSecureChannelConfig are invalid after calling this function.