C++ Based OPC UA Client/Server/PubSub SDK  1.8.3.628

Platform layer handling class. More...

#include <uaplatformlayer.h>

Static Public Member Functions

static int init ()
 Initialize UA Stack platform layer.
 
static int reInitConfig ()
 Change configuration settings for UA Stack platform layer.
 
static void cleanup ()
 Clean up UA Stack platform layer.
 
static void changeTraceSettings (OpcUa_Boolean bTraceEnabled, OpcUa_UInt32 uTraceLevel)
 Change default trace settings.
 
static void changeSerializerSettings (OpcUa_Int32 iMaxAlloc, OpcUa_Int32 iMaxStringLength, OpcUa_Int32 iMaxByteStringLength, OpcUa_Int32 iMaxArrayLength, OpcUa_Int32 iMaxMessageSize)
 Change default serializer settings.
 
static void changeThreadPoolSettings (OpcUa_Boolean bEnabled, OpcUa_Int32 iMinThreads, OpcUa_Int32 iMaxThreads, OpcUa_Int32 iMaxJobs, OpcUa_Boolean bBlockOnAdd, OpcUa_UInt32 nTimeout)
 Change default thread pool settings.
 
static void changeOpenSecureChannelThreadPoolSettings (OpcUa_Boolean bEnabled, OpcUa_Int32 iMinThreads, OpcUa_Int32 iMaxThreads, OpcUa_Int32 iMaxJobs)
 Change default thread pool settings.
 
static void changeTransportSettings (OpcUa_Boolean bTcpListener_ClientThreadsEnabled, OpcUa_Int32 iTcpListener_DefaultChunkSize, OpcUa_Int32 iTcpConnection_DefaultChunkSize, OpcUa_Int32 iTcpTransport_MaxMessageLength, OpcUa_Int32 iTcpTransport_MaxChunkCount)
 Change default transport settings.
 
static void changeSecureConnectionSettings (OpcUa_Int32 iSecureConnection_MinRevisedSecureChannelLifetime, OpcUa_Int32 iSecureConnection_MaxRevisedSecureChannelLifetime)
 Change default SecureConnection settings.
 
static OpcUa_UInt32 nMaxMessageSize ()
 Get the current maxMessageSize setting for the serializer.
 
static OpcUa_UInt32 nMaxArrayLength ()
 Get the current maxArrayLength setting for the serializer.
 
static OpcUa_UInt32 nMaxByteStringLength ()
 Get the current maxByteStringLength setting for the serializer.
 
static OpcUa_UInt32 nMaxStringLength ()
 Get the current maxStringLength setting for the serializer.
 
static OpcUa_UInt32 nMaxAlloc ()
 Get the largest size for a memory block the serializer can do when deserializing a message.
 
static OpcUa_UInt32 nListenerDefaultChunkSize ()
 The default and maximum size for message chunks in the server.
 
static OpcUa_UInt32 nConnectionDefaultChunkSize ()
 The default and maximum size for message chunks in the client.
 
static OpcUa_UInt32 nMaxChunkCount ()
 The default and maximum number of message chunks per message.
 
static OpcUa_UInt32 nTcpMaxMessageLength ()
 The default and maximum size for messages.
 
static OpcUa_Boolean bClientThreadsEnabled ()
 If true, the TcpListener request a thread per client from the underlying socketmanager.
 
static OpcUa_Boolean bThreadPoolEnabled ()
 Controls wether the secure listener uses a thread pool to dispatch received requests.
 
static OpcUa_UInt32 nThreadPoolMinThreads ()
 The minimum number of threads in the thread pool.
 
static OpcUa_UInt32 nThreadPoolMaxThreads ()
 The maximum number of threads in the thread pool.
 
static OpcUa_UInt32 nThreadPoolMaxJobs ()
 The length of the queue with jobs waiting for a free thread.
 
static OpcUa_Boolean bThreadPoolBlockOnAdd ()
 If MaxJobs is reached the add operation can block or return an error.
 
static OpcUa_UInt32 nThreadPoolTimeout ()
 If the add operation blocks on a full job queue, this value sets the max waiting time.
 
static OpcUa_Boolean bThreadPoolOpenSecureChannelEnabled ()
 Controls wether the secure listener uses a thread pool to dispatch open secure channel requests.
 
static OpcUa_UInt32 nThreadPoolOpenSecureChannelMinThreads ()
 The minimum number of threads in the secure listeners open secure channel thread pool.
 
static OpcUa_UInt32 nThreadPoolOpenSecureChannelMaxThreads ()
 The maximum number of threads in the secure listeners open secure channel thread pool.
 
static OpcUa_UInt32 nThreadPoolOpenSecureChannelMaxJobs ()
 The length of the queue with open secure channel jobs waiting for a free thread.
 
static OpcUa_UInt32 nMinSecureChannelLifetime ()
 The minimum revised lifetime of a secure channel security token in milliseconds.
 
static OpcUa_UInt32 nMaxSecureChannelLifetime ()
 The maximum revised lifetime of a secure channel security token in milliseconds.
 

Detailed Description

Platform layer handling class.

Member Function Documentation

◆ bClientThreadsEnabled()

static OpcUa_Boolean UaPlatformLayer::bClientThreadsEnabled ( )
inlinestatic

If true, the TcpListener request a thread per client from the underlying socketmanager.

Must not work with all platform layers.

◆ changeOpenSecureChannelThreadPoolSettings()

void UaPlatformLayer::changeOpenSecureChannelThreadPoolSettings ( OpcUa_Boolean  bEnabled,
OpcUa_Int32  iMinThreads,
OpcUa_Int32  iMaxThreads,
OpcUa_Int32  iMaxJobs 
)
static

Change default thread pool settings.

Be careful! Enabling the thread pool has severe implications on the behavior of your server!

Parameters
bEnabledThis parameter ontrols whether the secure listener uses a thread pool to dispatch received requests.
iMinThreadsThe minimum number of threads in the thread pool; if -1 is passed, the default setting is used.
iMaxThreadsThe maximum number of threads in the thread pool; if -1 is passed, the default setting is used.
iMaxJobsThe length of the queue with jobs waiting for a free thread; if -1 is passed, the default setting is used.

◆ changeSecureConnectionSettings()

void UaPlatformLayer::changeSecureConnectionSettings ( OpcUa_Int32  iSecureConnection_MinRevisedSecureChannelLifetime,
OpcUa_Int32  iSecureConnection_MaxRevisedSecureChannelLifetime 
)
static

Change default SecureConnection settings.

Parameters
iSecureConnection_MinRevisedSecureChannelLifetimeMinimum revised lifetime of SecureChannels; if -1 is passed, the default setting is used.
iSecureConnection_MaxRevisedSecureChannelLifetimeMaximum revised lifetime of SecureChannels; if -1 is passed, the default setting is used.

◆ changeSerializerSettings()

void UaPlatformLayer::changeSerializerSettings ( OpcUa_Int32  iMaxAlloc,
OpcUa_Int32  iMaxStringLength,
OpcUa_Int32  iMaxByteStringLength,
OpcUa_Int32  iMaxArrayLength,
OpcUa_Int32  iMaxMessageSize 
)
static

Change default serializer settings.

These are the Security constraints for the serializer. Set this values carefully.

Parameters
iMaxAllocThe largest size for a memory block the serializer can do when deserializing a message; if -1 is passed, the default setting is used.
iMaxStringLengthThe largest string accepted by the serializer; if -1 is passed, the default setting is used.
iMaxByteStringLengthThe largest byte string accepted by the serializer; if -1 is passed, the default setting is used.
iMaxArrayLengthMaximum number of elements in an array accepted by the serializer; if -1 is passed, the default setting is used.
iMaxMessageSizeThe maximum number of bytes per message in total; if -1 is passed, the default setting is used.

◆ changeThreadPoolSettings()

void UaPlatformLayer::changeThreadPoolSettings ( OpcUa_Boolean  bEnabled,
OpcUa_Int32  iMinThreads,
OpcUa_Int32  iMaxThreads,
OpcUa_Int32  iMaxJobs,
OpcUa_Boolean  bBlockOnAdd,
OpcUa_UInt32  nTimeout 
)
static

Change default thread pool settings.

Be careful! Enabling the thread pool has severe implications on the behavior of your server!

Parameters
bEnabledThis parameter ontrols whether the secure listener uses a thread pool to dispatch received requests.
iMinThreadsThe minimum number of threads in the thread pool; if -1 is passed, the default setting is used.
iMaxThreadsThe maximum number of threads in the thread pool; if -1 is passed, the default setting is used.
iMaxJobsThe length of the queue with jobs waiting for a free thread; if -1 is passed, the default setting is used.
bBlockOnAddIf MaxJobs is reached, the add operation can block or return an error.
nTimeoutIf the add operation blocks on a full job queue, this value sets the max waiting time.

◆ changeTraceSettings()

void UaPlatformLayer::changeTraceSettings ( OpcUa_Boolean  bTraceEnabled,
OpcUa_UInt32  uTraceLevel 
)
static

Change default trace settings.

Parameters
bTraceEnabledGlobally enable/disable trace output from the stack (exclude platform layer)
uTraceLevelConfigure the level of messages traced; the following values are possible:
OPCUA_TRACE_OUTPUT_LEVEL_NONE
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

◆ changeTransportSettings()

void UaPlatformLayer::changeTransportSettings ( OpcUa_Boolean  bTcpListener_ClientThreadsEnabled,
OpcUa_Int32  iTcpListener_DefaultChunkSize,
OpcUa_Int32  iTcpConnection_DefaultChunkSize,
OpcUa_Int32  iTcpTransport_MaxMessageLength,
OpcUa_Int32  iTcpTransport_MaxChunkCount 
)
static

Change default transport settings.

Parameters
bTcpListener_ClientThreadsEnabledThis parameter activates the feature to use a thread-per-client connection.
iTcpListener_DefaultChunkSizeDefault chunk size used for the TCP listener; if -1 is passed, the default setting is used.
iTcpConnection_DefaultChunkSizeDefault chunk size used for the TCP connection; if -1 is passed, the default setting is used.
iTcpTransport_MaxMessageLengthMaximum message length on transport layer; if -1 is passed, the default setting is used.
iTcpTransport_MaxChunkCountMaximum number of chunks possible on transport layer; if -1 is passed, the default setting is used.

◆ cleanup()

void UaPlatformLayer::cleanup ( )
static

Clean up UA Stack platform layer.

None of the OpcUa_xxx functions can be used after calling this method.

◆ init()

int UaPlatformLayer::init ( )
static

Initialize UA Stack platform layer.

None of the OpcUa_xxx functions can be used before the platform layer is assigned to the stack with this method.

◆ nMaxChunkCount()

static OpcUa_UInt32 UaPlatformLayer::nMaxChunkCount ( )
inlinestatic

The default and maximum number of message chunks per message.

Affects memory usage.

◆ nTcpMaxMessageLength()

static OpcUa_UInt32 UaPlatformLayer::nTcpMaxMessageLength ( )
inlinestatic

The default and maximum size for messages.

Affects memory usage.

◆ reInitConfig()

int UaPlatformLayer::reInitConfig ( )
static

Change configuration settings for UA Stack platform layer.

This method should be called to change settings before UA communication is started.


The documentation for this class was generated from the following files: