S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
libs2opc_server_config.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
26#ifndef LIBS2OPC_SERVER_CONFIG_H_
27#define LIBS2OPC_SERVER_CONFIG_H_
28
29#include <stdbool.h>
30
31#include "sopc_common.h"
32#include "sopc_encodeabletype.h"
33#include "sopc_types.h"
34#include "sopc_user_app_itf.h"
35
38#ifndef SOPC_DEFAULT_CURRENT_TIME_REFRESH_PERIOD_MS
39#define SOPC_DEFAULT_CURRENT_TIME_REFRESH_PERIOD_MS 1000
40#endif
41
56
62
69
95 const char* addressSpaceConfigPath,
96 const char* userConfigPath,
97 SOPC_ConfigServerXML_Custom* customConfig);
98
110typedef bool SOPC_GetServerKeyPassword_Fct(char** outPassword);
111
128
143
161typedef void SOPC_WriteNotif_Fct(const SOPC_CallContext* callCtxPtr,
162 OpcUa_WriteValue* writeValue,
163 SOPC_StatusCode writeStatus);
164
180
206typedef bool SOPC_CreateMI_NodeAvail_Fct(const SOPC_NodeId* nodeId,
207 OpcUa_NodeClass* outNodeClass,
208 SOPC_StatusCode* outBadStatus);
209
225
252typedef void SOPC_LocalServiceAsyncResp_Fct(SOPC_EncodeableType* type, void* response, uintptr_t userContext);
253
270
286
301
302#endif
SOPC_ReturnStatus SOPC_ServerConfigHelper_SetMonitItemNodeAvailCallback(SOPC_CreateMI_NodeAvail_Fct *nodeAvailCb)
Defines the callback called by CreateMonitoredItem service when a NodeId is not already part of serve...
bool SOPC_CreateMI_NodeAvail_Fct(const SOPC_NodeId *nodeId, OpcUa_NodeClass *outNodeClass, SOPC_StatusCode *outBadStatus)
Type of the callback called by CreateMonitoredItem service when a NodeId is not already part of serve...
Definition libs2opc_server_config.h:206
struct SOPC_ConfigServerXML_Custom SOPC_ConfigServerXML_Custom
Structure reserved for future use in order to customize the configuration through XML....
Definition libs2opc_server_config.h:68
SOPC_ReturnStatus SOPC_ServerConfigHelper_SetLocalServiceAsyncResponse(SOPC_LocalServiceAsyncResp_Fct *asyncRespCb)
Defines the local service response callback to be used.
SOPC_ReturnStatus SOPC_ServerConfigHelper_SetWriteNotifCallback(SOPC_WriteNotif_Fct *writeNotifCb)
Defines the write notification callback to be used.
SOPC_ReturnStatus SOPC_ServerConfigHelper_ConfigureFromXML(const char *serverConfigPath, const char *addressSpaceConfigPath, const char *userConfigPath, SOPC_ConfigServerXML_Custom *customConfig)
Configures server from XML configuration files for: server endpoints, address space and users credent...
SOPC_ReturnStatus SOPC_ServerConfigHelper_SetKeyPasswordCallback(SOPC_GetServerKeyPassword_Fct *getServerKeyPassword)
Defines the callback to retrieve password for decryption of the server private key.
bool SOPC_GetServerKeyPassword_Fct(char **outPassword)
Type of callback to retrieve password for decryption of the server private key.
Definition libs2opc_server_config.h:110
void SOPC_WriteNotif_Fct(const SOPC_CallContext *callCtxPtr, OpcUa_WriteValue *writeValue, SOPC_StatusCode writeStatus)
Type of callback to provide to receive write notification on address space.
Definition libs2opc_server_config.h:161
SOPC_ReturnStatus SOPC_ServerConfigHelper_SetMethodCallManager(SOPC_MethodCallManager *mcm)
Method Call service configuration.
void SOPC_LocalServiceAsyncResp_Fct(SOPC_EncodeableType *type, void *response, uintptr_t userContext)
Type of callback to provide to receive asynchronous local service response.
Definition libs2opc_server_config.h:252
SOPC_ReturnStatus SOPC_ServerConfigHelper_SetCurrentTimeRefreshInterval(uint16_t intervalMs)
Defines interval in milliseconds used to refresh the server status current time information.
SOPC_ReturnStatus SOPC_ServerConfigHelper_Initialize(void)
Initializes the S2OPC Server frontend configuration Call to SOPC_ServerConfigHelper_Initialize is req...
SOPC_ReturnStatus SOPC_ServerConfigHelper_SetShutdownCountdown(uint16_t secondsTillShutdown)
Defines duration of the shutdown phase when stopping the server.
void SOPC_ServerConfigHelper_Clear(void)
Clears the S2OPC Server frontend configuration It shall be done before a call to SOPC_CommonHelper_Cl...
uint32_t SOPC_StatusCode
Definition sopc_builtintypes.h:36
EncodeableType and services on encodeable object.
enum _OpcUa_NodeClass OpcUa_NodeClass
enum _SOPC_ReturnStatus SOPC_ReturnStatus
Common enumerations for S2OPC.
Contains the types to be used by the user application to use the Toolkit.
Definition app_cb_call_context_internal.h:28
Encodeable object type structure definition. It provides all the services functions associated with t...
Definition sopc_encodeabletype.h:177
The SOPC_MethodCallManager object defines the common interface for the method manager.
Definition sopc_call_method_manager.h:114
This structure describes a basic NodeID in OPC UA.
Definition sopc_builtintypes.h:189
Definition sopc_types.h:4982