C# Class Opc.Ua.ConditionState

ファイルを表示 Open project: OPCFoundation/UA-.NETStandardLibrary Class Usage Examples

Public Properties

Property Type Description
OnAddComment ConditionAddCommentEventHandler
OnEnableDisable ConditionEnableEventHandler

Public Methods

Method Description
ConditionRefresh ( ISystemContext context, List events, bool includeChildren ) : void

Handles a condition refresh.

SetComment ( ISystemContext context, Opc.Ua.LocalizedText comment, string clientUserId ) : void

Updates the condition after adding a comment.

SetEffectiveSubState ( ISystemContext context, Opc.Ua.LocalizedText displayName, System.DateTime transitionTime ) : void

Called when one or more sub-states change state.

SetEnableState ( ISystemContext context, bool enabled ) : void

Sets the enable state for the condition without raising events.

This method ensures all related variables are set correctly.

SetSeverity ( ISystemContext context, EventSeverity severity ) : void

Sets the severity for the condition without raising events.

This method ensures all related variables are set correctly.

Protected Methods

Method Description
GetCurrentUserId ( ISystemContext context ) : string

Gets the current user id from the system context.

OnAddCommentCalled ( ISystemContext context, MethodState method, Opc.Ua.NodeId objectId, byte eventId, Opc.Ua.LocalizedText comment ) : ServiceResult

Called when the add comment method is called.

OnAfterCreate ( ISystemContext context, NodeState node ) : void

Called after a node is created.

OnDisableCalled ( ISystemContext context, MethodState method, IList inputArguments, IList outputArguments ) : ServiceResult

Handles the Disable method.

OnEnableCalled ( ISystemContext context, MethodState method, IList inputArguments, IList outputArguments ) : ServiceResult

Handles the Enable method.

ProcessBeforeAddComment ( ISystemContext context, byte eventId, Opc.Ua.LocalizedText comment ) : ServiceResult

Does any processing before adding a comment to a condition.

ProcessBeforeEnableDisable ( ISystemContext context, bool enabling ) : ServiceResult

Does any processing before a condition is enabled or disabled.

ReportStateChange ( ISystemContext context, bool ignoreDisabledState ) : void

Reports the state change for the condition.

UpdateEffectiveState ( ISystemContext context ) : void

Updates the effective state for the condition.

UpdateStateAfterDisable ( ISystemContext context ) : void

Updates the condition state after disabling.

UpdateStateAfterEnable ( ISystemContext context ) : void

Updates the condition state after enabling.

Method Details

ConditionRefresh() public method

Handles a condition refresh.
public ConditionRefresh ( ISystemContext context, List events, bool includeChildren ) : void
context ISystemContext
events List
includeChildren bool
return void

GetCurrentUserId() protected method

Gets the current user id from the system context.
protected GetCurrentUserId ( ISystemContext context ) : string
context ISystemContext The system context.
return string

OnAddCommentCalled() protected method

Called when the add comment method is called.
protected OnAddCommentCalled ( ISystemContext context, MethodState method, Opc.Ua.NodeId objectId, byte eventId, Opc.Ua.LocalizedText comment ) : ServiceResult
context ISystemContext The system context.
method MethodState The method being called.
objectId Opc.Ua.NodeId The id of the object.
eventId byte The identifier for the event which is the target for the comment.
comment Opc.Ua.LocalizedText The comment.
return ServiceResult

OnAfterCreate() protected method

Called after a node is created.
protected OnAfterCreate ( ISystemContext context, NodeState node ) : void
context ISystemContext
node NodeState
return void

OnDisableCalled() protected method

Handles the Disable method.
protected OnDisableCalled ( ISystemContext context, MethodState method, IList inputArguments, IList outputArguments ) : ServiceResult
context ISystemContext
method MethodState
inputArguments IList
outputArguments IList
return ServiceResult

OnEnableCalled() protected method

Handles the Enable method.
protected OnEnableCalled ( ISystemContext context, MethodState method, IList inputArguments, IList outputArguments ) : ServiceResult
context ISystemContext
method MethodState
inputArguments IList
outputArguments IList
return ServiceResult

ProcessBeforeAddComment() protected method

Does any processing before adding a comment to a condition.
protected ProcessBeforeAddComment ( ISystemContext context, byte eventId, Opc.Ua.LocalizedText comment ) : ServiceResult
context ISystemContext The system context.
eventId byte The identifier for the event which is the target for the comment.
comment Opc.Ua.LocalizedText The comment.
return ServiceResult

ProcessBeforeEnableDisable() protected method

Does any processing before a condition is enabled or disabled.
protected ProcessBeforeEnableDisable ( ISystemContext context, bool enabling ) : ServiceResult
context ISystemContext The system context.
enabling bool True is the condition is being enabled.
return ServiceResult

ReportStateChange() protected method

Reports the state change for the condition.
protected ReportStateChange ( ISystemContext context, bool ignoreDisabledState ) : void
context ISystemContext The context.
ignoreDisabledState bool if set to true the event is reported event if the condition is in the disabled state.
return void

SetComment() public method

Updates the condition after adding a comment.
public SetComment ( ISystemContext context, Opc.Ua.LocalizedText comment, string clientUserId ) : void
context ISystemContext The system context.
comment Opc.Ua.LocalizedText The comment.
clientUserId string The user that added the comment.
return void

SetEffectiveSubState() public method

Called when one or more sub-states change state.
public SetEffectiveSubState ( ISystemContext context, Opc.Ua.LocalizedText displayName, System.DateTime transitionTime ) : void
context ISystemContext The context.
displayName Opc.Ua.LocalizedText The display name for the effective state.
transitionTime System.DateTime The transition time.
return void

SetEnableState() public method

Sets the enable state for the condition without raising events.
This method ensures all related variables are set correctly.
public SetEnableState ( ISystemContext context, bool enabled ) : void
context ISystemContext The system context.
enabled bool If true the condition is put into the Enabled state.
return void

SetSeverity() public method

Sets the severity for the condition without raising events.
This method ensures all related variables are set correctly.
public SetSeverity ( ISystemContext context, EventSeverity severity ) : void
context ISystemContext The system context.
severity EventSeverity The event severity.
return void

UpdateEffectiveState() protected method

Updates the effective state for the condition.
protected UpdateEffectiveState ( ISystemContext context ) : void
context ISystemContext The context.
return void

UpdateStateAfterDisable() protected method

Updates the condition state after disabling.
protected UpdateStateAfterDisable ( ISystemContext context ) : void
context ISystemContext The system context.
return void

UpdateStateAfterEnable() protected method

Updates the condition state after enabling.
protected UpdateStateAfterEnable ( ISystemContext context ) : void
context ISystemContext The system context.
return void

Property Details

OnAddComment public_oe property

Raised when a comment is added to the condition.
Return code can be used to cancel the operation.
public ConditionAddCommentEventHandler OnAddComment
return ConditionAddCommentEventHandler

OnEnableDisable public_oe property

Raised when the condition is enabled or disabled.
Return code can be used to cancel the operation.
public ConditionEnableEventHandler OnEnableDisable
return ConditionEnableEventHandler