uaPLUS Reference
GetModeDefinitions Method
See Also  Send Feedback
NSPlugin Namespace > GenericServer Class : GetModeDefinitions Method

clientUpdateMode

Client update mode handling in the DANSrv generic DA server:
0 (CachePoll): The client update thread periodically checks all items in active groups for changes
1 (Queue): The cache write method adds changed items to the OPC group assigned queue for each group having the item.

The default value is 0 (CachePoll). In the DANSrv.exe.config the value can be defined as:
<add key="ClientUpdateMode" value="CachePoll"/> <!-- CachePoll (0) or Queue (1) -->

writeCacheUpdateMode

Controls the cache update in the handling of client write calls:
0 (Generic): The cache is updated in the generic server after returning from the customization WiteItems method. Items with write error are not updated in the cache.
1 (Custom): The generic server does NOT update the cache. The customization module has to update the cache by executing the SetItemValue callback method for each written item.

exeStartupMode
Determines how the DANSrv server starts when the EXE file is executed. This definition has no effect in uaPLUS or when DCOM starts DANSrv due to a client connect. The possible values are defined in the enumerator exeStartupMode.
notYetUsed2
Can be used later without having to change the DLL interface
notYetUsed3
Can be used later without having to change the DLL interface
notYetUsed4
Can be used later without having to change the DLL interface
notYetUsed5
Can be used later without having to change the DLL interface
notYetUsed6
Can be used later without having to change the DLL interface

Glossary Item Box

Optional method. Called from DANSrv/uaPLUS Professional Edition generic server only.
Get working mode definitions for the generic server.
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 in XML DA servers.

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

Syntax

Visual Basic (Declaration) 
Public Function GetModeDefinitions( _
   ByRef clientUpdateMode As Integer, _
   ByRef writeCacheUpdateMode As Integer, _
   ByRef exeStartupMode As Integer, _
   ByRef notYetUsed2 As Integer, _
   ByRef notYetUsed3 As Integer, _
   ByRef notYetUsed4 As Integer, _
   ByRef notYetUsed5 As Integer, _
   ByRef notYetUsed6 As Integer _
) As Integer
C# 
public int GetModeDefinitions( 
   out int clientUpdateMode,
   out int writeCacheUpdateMode,
   out int exeStartupMode,
   out int notYetUsed2,
   out int notYetUsed3,
   out int notYetUsed4,
   out int notYetUsed5,
   out int notYetUsed6
)

Parameters

clientUpdateMode

Client update mode handling in the DANSrv generic DA server:
0 (CachePoll): The client update thread periodically checks all items in active groups for changes
1 (Queue): The cache write method adds changed items to the OPC group assigned queue for each group having the item.

The default value is 0 (CachePoll). In the DANSrv.exe.config the value can be defined as:
<add key="ClientUpdateMode" value="CachePoll"/> <!-- CachePoll (0) or Queue (1) -->

writeCacheUpdateMode

Controls the cache update in the handling of client write calls:
0 (Generic): The cache is updated in the generic server after returning from the customization WiteItems method. Items with write error are not updated in the cache.
1 (Custom): The generic server does NOT update the cache. The customization module has to update the cache by executing the SetItemValue callback method for each written item.

exeStartupMode
Determines how the DANSrv server starts when the EXE file is executed. This definition has no effect in uaPLUS or when DCOM starts DANSrv due to a client connect. The possible values are defined in the enumerator exeStartupMode.
notYetUsed2
Can be used later without having to change the DLL interface
notYetUsed3
Can be used later without having to change the DLL interface
notYetUsed4
Can be used later without having to change the DLL interface
notYetUsed5
Can be used later without having to change the DLL interface
notYetUsed6
Can be used later without having to change the DLL interface

Return Value

Always returns S_OKAlways returns S_OK

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows 7, Windows Server 2008 family

See Also

© 2010-2018 Copyright Advosol Inc. All Rights Reserved.