Functions | |
void | OpcUa_ProxyStubConfiguration_InitializeDefault (OpcUa_ProxyStubConfiguration *a_pProxyStubConfiguration) |
Initialize UA stack configuration structure with default values. | |
OpcUa_StatusCode | UaServer_Module_InitializeUaStack (OpcUa_Handle *a_phProxyStubPlatformLayer, OpcUa_ProxyStubConfiguration *a_pProxyStubConfiguration) |
Initialize UA stack. | |
OpcUa_StatusCode | UaServer_Module_ClearUaStack (OpcUa_Handle *a_phProxyStubPlatformLayer) |
Clear UA stack. | |
OpcUa_StatusCode | UaServer_EndpointEvent_Callback (OpcUa_Endpoint a_hEndpoint, OpcUa_Void *a_pCallbackData, OpcUa_Endpoint_Event a_eEvent, OpcUa_StatusCode a_uStatus, OpcUa_UInt32 a_uSecureChannelId, OpcUa_ByteString *a_pbsClientCertificate, OpcUa_String *a_pSecurityPolicy, OpcUa_UInt16 a_uSecurityMode) |
A callback function for Endpoint events. | |
OpcUa_StatusCode | UaServer_SetPKIConfiguration (UaServer *a_pUaServer, OpcUa_P_PKI_Types a_ePkiType, OpcUa_StringA a_sPrivateKey, OpcUa_StringA a_sServerCert, OpcUa_StringA a_sCrl, OpcUa_StringA a_sCertDir, OpcUa_StringA a_sRejectedCertLocation) |
Initializes the PKI configuartion of the Server. | |
OpcUa_StatusCode | UaServer_Initialize (UaServer *a_pUaServer, OpcUa_StringA a_sEndpointUrl, OpcUa_StringA a_sApplicationUri, OpcUa_StringA a_sProductUri, OpcUa_StringA a_sApplicationName, OpcUa_P_PKI_Types a_ePKIType, OpcUa_StringA a_sPKIPrivateKey, OpcUa_StringA a_sPKIServerCert, OpcUa_StringA a_sPKICrl, OpcUa_StringA a_sPKICertDir, OpcUa_StringA a_sPKIRejectedDir) |
Initialize the UaServer object structure with the base settings. | |
OpcUa_StatusCode | UaServer_StartUp (UaServer *a_pUaServer) |
Start the UaServer to enable OPC UA connection establishment from clients. | |
OpcUa_Void | UaServer_Clear (UaServer *a_pUaServer) |
Cleans up application and used resources. | |
OpcUa_Void | UaServer_Module_SaveClientCertificate (OpcUa_ByteString *a_pbsClientCertificate) |
Save client certificate in rejected folder. |
void OpcUa_ProxyStubConfiguration_InitializeDefault | ( | OpcUa_ProxyStubConfiguration * | a_pProxyStubConfiguration | ) |
Initialize UA stack configuration structure with default values.
The configuration structure is used to initialize the UA Stack. The default values are set by the stack configuration e.g. in the stack file opcua_config.h
The structure contains the following settings:
Trace settings
bProxyStub_Trace_Enabled - Flag that indicates if the stack trace is activated. This requires that the traces are not disabled with the stack compiler switch. The trace is also used by the Server SDK
uProxyStub_Trace_Level - Tracelevel used if trace is activated. Possible settings are
OPCUA_TRACE_OUTPUT_LEVEL_ERROR
OPCUA_TRACE_OUTPUT_LEVEL_WARNING
OPCUA_TRACE_OUTPUT_LEVEL_SYSTEM
OPCUA_TRACE_OUTPUT_LEVEL_INFO
OPCUA_TRACE_OUTPUT_LEVEL_DEBUG
OPCUA_TRACE_OUTPUT_LEVEL_CONTENT
OPCUA_TRACE_OUTPUT_LEVEL_ALL
Serializer settings
This part of the configuration defines the OPC UA Stack serializer settings. These are the Security constraints for the serializer. The settings are also relevant for the resource consuption of the UA stack. Set this values carefully.
iSerializer_MaxAlloc - The largest size for a memory block the serializer can do when deserializing a message
iSerializer_MaxStringLength - The largest string accepted by the serializer
iSerializer_MaxByteStringLength - The largest byte string accepted by the serializer
iSerializer_MaxArrayLength - Maximum number of elements in an array accepted by the serializer
iSerializer_MaxMessageSize - The maximum number of bytes per message in total
The other settings should not be changed since they are set for the SDK and changing them will cause undifined behaviour.
a_pProxyStubConfiguration | Configuration structure for the UA Stack. |
OpcUa_Void UaServer_Clear | ( | UaServer * | a_pUaServer | ) |
Cleans up application and used resources.
a_pUaServer | a pointer to the servers object. |
OpcUa_StatusCode UaServer_EndpointEvent_Callback | ( | OpcUa_Endpoint | a_hEndpoint, | |
OpcUa_Void * | a_pCallbackData, | |||
OpcUa_Endpoint_Event | a_eEvent, | |||
OpcUa_StatusCode | a_uStatus, | |||
OpcUa_UInt32 | a_uSecureChannelId, | |||
OpcUa_ByteString * | a_pbsClientCertificate, | |||
OpcUa_String * | a_pSecurityPolicy, | |||
OpcUa_UInt16 | a_uSecurityMode | |||
) |
A callback function for Endpoint events.
a_hEndpoint | handle to the endpoint. | |
a_pCallbackData | the callback data. | |
a_eEvent | the fired event. | |
a_uStatus | Error code. | |
a_uSecureChannelId | the id of the secure channel. | |
a_pbsClientCertificate | the certificate from the client to compare to. | |
a_pSecurityPolicy | the created security policy. | |
a_uSecurityMode | the security mode. |
OpcUa_StatusCode UaServer_Initialize | ( | UaServer * | a_pUaServer, | |
OpcUa_StringA | a_sEndpointUrl, | |||
OpcUa_StringA | a_sApplicationUri, | |||
OpcUa_StringA | a_sProductUri, | |||
OpcUa_StringA | a_sApplicationName, | |||
OpcUa_P_PKI_Types | a_ePKIType, | |||
OpcUa_StringA | a_sPKIPrivateKey, | |||
OpcUa_StringA | a_sPKIServerCert, | |||
OpcUa_StringA | a_sPKICrl, | |||
OpcUa_StringA | a_sPKICertDir, | |||
OpcUa_StringA | a_sPKIRejectedDir | |||
) |
Initialize the UaServer object structure with the base settings.
a_pUaServer | A pointer to the UaServer object. | |
a_sEndpointUrl | URL of the UA server endpoint. This URL is used by the server to open the endpoint in the UA stack and by clients to connect to the server. | |
a_sApplicationUri | Globally unique identifier for the server instance. | |
a_sProductUri | Globally unique identifier for the server application. | |
a_sApplicationName | Human readable name for the server application. |
OpcUa_StatusCode UaServer_Module_ClearUaStack | ( | OpcUa_Handle * | a_phProxyStubPlatformLayer | ) |
Clear UA stack.
If this function was called, no UA stack functionality can be used anymore.
a_hProxyStubPlatformLayer | UA Stack platfrom layer handle. |
OpcUa_StatusCode UaServer_Module_InitializeUaStack | ( | OpcUa_Handle * | a_phProxyStubPlatformLayer, | |
OpcUa_ProxyStubConfiguration * | a_pProxyStubConfiguration | |||
) |
Initialize UA stack.
This function must be called before any UA stack functionality is used.
a_hProxyStubPlatformLayer | UA Stack platfrom layer handle. | |
a_pProxyStubConfiguration | Configuration structure for the UA Stack. |
OpcUa_Void UaServer_Module_SaveClientCertificate | ( | OpcUa_ByteString * | a_pbsClientCertificate | ) |
Save client certificate in rejected folder.
a_pbsClientCertificate | a pointer to the client certificate |
OpcUa_StatusCode UaServer_SetPKIConfiguration | ( | UaServer * | a_pUaServer, | |
OpcUa_P_PKI_Types | a_ePkiType, | |||
OpcUa_StringA | a_sPrivateKey, | |||
OpcUa_StringA | a_sServerCert, | |||
OpcUa_StringA | a_sCrl, | |||
OpcUa_StringA | a_sCertDir, | |||
OpcUa_StringA | a_sRejectedCertLocation | |||
) |
Initializes the PKI configuartion of the Server.
a_pUaServer | a pointer to the servers description. | |
a_sConfigName | name of the PKI configuration | |
a_sPrivateKey | path to private key | |
a_sServerCert | path to server certificate | |
a_sCrl | path to crl | |
a_sCertDir | path of cert directory |
OpcUa_StatusCode UaServer_StartUp | ( | UaServer * | a_pUaServer | ) |
Start the UaServer to enable OPC UA connection establishment from clients.
a_pUaServer | a pointer to the UaServer object. |