DANSrv Reference
GetServerParameters Method
See Also  Send Feedback
NSPluginNet4 Assembly > NSPlugin Namespace > AppPlugin Class : GetServerParameters Method

UpdatePeriod
This interval in ms is used by the generic server as the fastest possible client update rate and also uses this definition when determining the refresh need if no client defined a sampling rate for the item.
The default value is as defined in the wizard dialog. In the DANSrv.exe.config the value is defined as:
<add key="UpdatePeriod" value = "100" />
BrowseMode

Defines how client browse calls are handled. 0 (real mode) : all browse calls are handled in the generic server according the items defined in the server cache. 2 (virtual mode) : all client browse calls are handled in this plug-in and typically return the items that are or could be dynamically added to the server cache.
Only the DANSrv/XDASrv Professional Edition supports virtual mode browsing. The Standard Edition ignores this parameter.

The default value is as defined in the wizard dialog. In the file DANSrv.exe.config respectively web.config the value is defined as:
<add key="BrowseMode" value = "REAL" /> <!-- REAL or VIRTUAL -->

validateMode

This parameter controls how the generic server handles the ValidateItems client calls.
0 : The plug-in ValidateItems method is called for items that are not found in the generic server cache.
1 : The plug-in ValidateItems method is NEVER called. Requested items that are not defined in the generic server cache are treated as unknown items.
2 : The plug-in ValidateItems method is ALWAYS called. This allows the plug-in to determine the items access rights based on the client's credentials and return OPC_E_UNKNOWNITEMID for clients without the required privileges.

Only the DANSrv Professional Edition supports item validation and a dynamic address space. The DANSrv Standard Edition ignores this parameter.

The default value is as defined in the wizard dialog. In the file DANSrv.exe.config respectively web.config the value is defined as:
<add key="ValidateMode" value= "NEVER" /> <!-- NEVER, UNKNOWNITEMS or ALWAYS -->

BranchDelemitter

Character is used as the branch/item separator character in fully qualified item names. It is typically '.' or '/'.
This character must match the character used in the fully qualified item IDs specified in the AddItems method call.

The default value is as defined in the wizard dialog. In the file DANSrv.exe.config respectively web.config the value is defined as:
<add key="BranchDelemitter" value= "." />

Glossary Item Box

This method is called from the generic server at startup, when the first client connects.
It defines the application specific server parameters and operating modes.
The default implementation in IGeneric.cs/vb initializes default values and tries to read the configuration definitions from the file DANSrv.exe.config respectively web.config for XML DA servers.

The default method can be replaced by defining a method overload in ServerAdapt.cs/vb. The definitions can be made in the code to protect them from being changed without a recompilation.

Syntax

Visual Basic (Usage)Copy Code
Dim instance As AppPlugin
Dim UpdatePeriod As Integer
Dim BrowseMode As Integer
Dim validateMode As Integer
Dim BranchDelemitter As Char
Dim value As Integer
 
value = instance.GetServerParameters(UpdatePeriod, BrowseMode, validateMode, BranchDelemitter)
C# 
public new int GetServerParameters( 
   out int UpdatePeriod,
   out int BrowseMode,
   out int validateMode,
   out char BranchDelemitter
)

Parameters

UpdatePeriod
This interval in ms is used by the generic server as the fastest possible client update rate and also uses this definition when determining the refresh need if no client defined a sampling rate for the item.
The default value is as defined in the wizard dialog. In the DANSrv.exe.config the value is defined as:
<add key="UpdatePeriod" value = "100" />
BrowseMode

Defines how client browse calls are handled. 0 (real mode) : all browse calls are handled in the generic server according the items defined in the server cache. 2 (virtual mode) : all client browse calls are handled in this plug-in and typically return the items that are or could be dynamically added to the server cache.
Only the DANSrv/XDASrv Professional Edition supports virtual mode browsing. The Standard Edition ignores this parameter.

The default value is as defined in the wizard dialog. In the file DANSrv.exe.config respectively web.config the value is defined as:
<add key="BrowseMode" value = "REAL" /> <!-- REAL or VIRTUAL -->

validateMode

This parameter controls how the generic server handles the ValidateItems client calls.
0 : The plug-in ValidateItems method is called for items that are not found in the generic server cache.
1 : The plug-in ValidateItems method is NEVER called. Requested items that are not defined in the generic server cache are treated as unknown items.
2 : The plug-in ValidateItems method is ALWAYS called. This allows the plug-in to determine the items access rights based on the client's credentials and return OPC_E_UNKNOWNITEMID for clients without the required privileges.

Only the DANSrv Professional Edition supports item validation and a dynamic address space. The DANSrv Standard Edition ignores this parameter.

The default value is as defined in the wizard dialog. In the file DANSrv.exe.config respectively web.config the value is defined as:
<add key="ValidateMode" value= "NEVER" /> <!-- NEVER, UNKNOWNITEMS or ALWAYS -->

BranchDelemitter

Character is used as the branch/item separator character in fully qualified item names. It is typically '.' or '/'.
This character must match the character used in the fully qualified item IDs specified in the AddItems method call.

The default value is as defined in the wizard dialog. In the file DANSrv.exe.config respectively web.config the value is defined as:
<add key="BranchDelemitter" value= "." />

Return Value

Always returns S_OK

Remarks

The DANSrv/XDASrv project generation wizards create a configuration file with the definitions as specified in the wizard dialog. The default values in the code are the same.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2017 Copyright Advosol Inc. All Rights Reserved.