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




clientUpdateMode

Client update mode handling:
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.

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

exeStartupMode
Determines how the server starts when the EXE file is executed. This definitin has no effect when DCOM starts the server due to a client connect. The possible values are defined in the enumerator ExeStartMode.
lookupMode
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

Optional method. Called from DANSrv/XDARap 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 lookupMode As Integer, _
   ByRef notYetUsed3 As Integer, _
   ByRef notYetUsed4 As Integer, _
   ByRef notYetUsed5 As Integer, _
   ByRef notYetUsed6 As Integer _
) As Integer
Visual Basic (Usage)Copy Code
Dim instance As GenericServer
Dim clientUpdateMode As Integer
Dim writeCacheUpdateMode As Integer
Dim exeStartupMode As Integer
Dim lookupMode As Integer
Dim notYetUsed3 As Integer
Dim notYetUsed4 As Integer
Dim notYetUsed5 As Integer
Dim notYetUsed6 As Integer
Dim value As Integer
 
value = instance.GetModeDefinitions(clientUpdateMode, writeCacheUpdateMode, exeStartupMode, lookupMode, notYetUsed3, notYetUsed4, notYetUsed5, notYetUsed6)
C# 
public int GetModeDefinitions( 
   out int clientUpdateMode,
   out int writeCacheUpdateMode,
   out int exeStartupMode,
   out int lookupMode,
   out int notYetUsed3,
   out int notYetUsed4,
   out int notYetUsed5,
   out int notYetUsed6
)
Managed Extensions for C++ 
public: int GetModeDefinitions( 
   [PARAMFLAG::Out] int clientUpdateMode,
   [PARAMFLAG::Out] int writeCacheUpdateMode,
   [PARAMFLAG::Out] int exeStartupMode,
   [PARAMFLAG::Out] int lookupMode,
   [PARAMFLAG::Out] int notYetUsed3,
   [PARAMFLAG::Out] int notYetUsed4,
   [PARAMFLAG::Out] int notYetUsed5,
   [PARAMFLAG::Out] int notYetUsed6
) 
C++/CLI 
public:
int GetModeDefinitions( 
   [Out] int clientUpdateMode,
   [Out] int writeCacheUpdateMode,
   [Out] int exeStartupMode,
   [Out] int lookupMode,
   [Out] int notYetUsed3,
   [Out] int notYetUsed4,
   [Out] int notYetUsed5,
   [Out] int notYetUsed6
) 

Parameters

clientUpdateMode

Client update mode handling:
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.

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

exeStartupMode
Determines how the server starts when the EXE file is executed. This definitin has no effect when DCOM starts the server due to a client connect. The possible values are defined in the enumerator ExeStartMode.
lookupMode
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 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

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