OPCAE.NET Reference Manual
GetEnableStateBySource Method
See Also  Send Feedback
OPCAE.NET Namespace > OpcEventServer Class : GetEnableStateBySource Method

Sources
An array of source names, as returned by GetQualifiedSourceName.
Enabled
Array of bool indicating the current enable state of the corresponding source. TRUE if the source is enabled, FALSE if it is disabled.
Note this value reflects the state as a result of the last call to EnableConditionBySource2 or DisableConditionBySource2. In other words, it does not reflect the enable state of the containing areas in its hierarchy.
EffectivelyEnabled
Array of bool indicating the effective enable state of the corresponding source. TRUE if the source is enabled and all areas within the hierarchy of its containing areas are enabled. FALSE if the source is disabled or any area within the hierarchy of its containing areas is disabled.
Errors
Array of HRESULTS indicating the success of retrieving the enable state of the source. The errors correspond to the sources passed into the method.

Glossary Item Box

Returns the current enable state and the effective enable state for each specified source.
This is an optional function that's not supported by all servers.

Syntax

Visual Basic (Declaration) 
Public Function GetEnableStateBySource( _
   ByVal Sources() As String, _
   ByRef Enabled As Boolean(), _
   ByRef EffectivelyEnabled As Boolean(), _
   ByRef Errors As Integer() _
) As Integer
C# 
public int GetEnableStateBySource( 
   string[] Sources,
   out bool[] Enabled,
   out bool[] EffectivelyEnabled,
   out int[] Errors
)

Parameters

Sources
An array of source names, as returned by GetQualifiedSourceName.
Enabled
Array of bool indicating the current enable state of the corresponding source. TRUE if the source is enabled, FALSE if it is disabled.
Note this value reflects the state as a result of the last call to EnableConditionBySource2 or DisableConditionBySource2. In other words, it does not reflect the enable state of the containing areas in its hierarchy.
EffectivelyEnabled
Array of bool indicating the effective enable state of the corresponding source. TRUE if the source is enabled and all areas within the hierarchy of its containing areas are enabled. FALSE if the source is disabled or any area within the hierarchy of its containing areas is disabled.
Errors
Array of HRESULTS indicating the success of retrieving the enable state of the source. The errors correspond to the sources passed into the method.

Return Value

HRESULTS error/success code.

Requirements

Target Platforms: Windows 7/8/10, Windows Server 2003/2008/2012/2016, .NET 4.x

See Also

© 2002-2018 Advosol Inc. All Rights Reserved.