29#ifndef LIBS2OPC_SERVER_CONFIG_INTERNAL_H_
30#define LIBS2OPC_SERVER_CONFIG_INTERNAL_H_
45#ifndef SOPC_HELPER_LOCAL_RESPONSE_TIMEOUT_MS
46#define SOPC_HELPER_LOCAL_RESPONSE_TIMEOUT_MS 5000
49#ifndef SOPC_DEFAULT_SHUTDOWN_PHASE_IN_SECONDS
50#define SOPC_DEFAULT_SHUTDOWN_PHASE_IN_SECONDS 5
53#ifndef SOPC_DEFAULT_CURRENT_TIME_REFERSH_FREQ_MS
54#define SOPC_DEFAULT_CURRENT_TIME_REFERSH_FREQ_MS 1000
59 SOPC_SERVER_STATE_INITIALIZING = 0,
60 SOPC_SERVER_STATE_CONFIGURING = 1,
61 SOPC_SERVER_STATE_CONFIGURED = 2,
62 SOPC_SERVER_STATE_STARTED = 3,
63 SOPC_SERVER_STATE_SHUTDOWN_PHASE = 4,
64 SOPC_SERVER_STATE_STOPPING = 5,
65 SOPC_SERVER_STATE_STOPPED = 6,
66} SOPC_HelperServer_State;
69typedef struct SOPC_ServerHelper_Config
76 SOPC_HelperServer_State state;
98 uint32_t syncLocalServiceId;
109 int32_t serverRequestedToStop;
110 bool serverAllEndpointsClosed;
119 uint16_t configuredSecondsTillShutdown;
121 uint16_t configuredCurrentTimeRefreshIntervalMs;
122 uint32_t currentTimeRefreshTimerId;
131 uint32_t* endpointIndexes;
132 bool* endpointClosed;
135 SOPC_Server_RuntimeVariables runtimeVariables;
137} SOPC_ServerHelper_Config;
140typedef struct SOPC_HelperConfigInternal_Ctx
143 uintptr_t userContext;
149 struct LocalServiceCtx
155 bool isHelperInternal;
157 const char* internalErrorMsg;
160} SOPC_HelperConfigInternal_Ctx;
163extern SOPC_ServerHelper_Config sopc_server_helper_config;
166bool SOPC_ServerInternal_IsConfiguring(
void);
169bool SOPC_ServerInternal_IsStarted(
void);
172bool SOPC_ServerInternal_IsStopped(
void);
176bool SOPC_ServerInternal_IsConfigClearable(
void);
179bool SOPC_ServerInternal_CheckConfigAndSetConfiguredState(
void);
182bool SOPC_ServerInternal_SetStartedState(
void);
185bool SOPC_ServerInternal_SetStoppingState(
void);
188void SOPC_ServerInternal_SetStoppedState(
void);
191bool SOPC_ServerInternal_GetKeyPassword(
char** outPassword);
196 SOPC_HelperConfigInternal_Ctx* helperCtx);
201 SOPC_HelperConfigInternal_Ctx* helperCtx);
204void SOPC_ServerInternal_ClosedEndpoint(uint32_t epConfigIdx,
SOPC_ReturnStatus status);
210void SOPC_ServerInternal_KeyCertPairUpdateCb(uintptr_t updateParam);
213void SOPC_ServerInternal_PKIProviderUpdateCb(uintptr_t updateParam);
High level interface to run an OPC UA server.
void SOPC_ServerStopped_Fct(SOPC_ReturnStatus status)
Type of callback called when server stopped.
Definition libs2opc_server.h:55
High level interface to configure an OPC UA server.
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
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
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
Internal module used to manage the server runtime node variable changes (Server information nodes)
struct _SOPC_AddressSpace SOPC_AddressSpace
Definition sopc_address_space.h:68
enum _SOPC_ReturnStatus SOPC_ReturnStatus
Common enumerations for S2OPC.
Contains the interface to configure events in the server. This interface is intended to be used by th...
Contains the types to be used by the user application to use the Toolkit.
enum _SOPC_App_Com_Event SOPC_App_Com_Event
Client and Server communication events to be managed by applicative code.
Definition p_sopc_synchronisation.h:57
Encodeable object type structure definition. It provides all the services functions associated with t...
Definition sopc_encodeabletype.h:177
Server configuration of a Endpoint connection listener.
Definition sopc_user_app_itf.h:140
Definition p_sopc_synchronisation.h:64
Definition sopc_types.h:6403