C# Класс Opc.Ua.ConditionState

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
OnAddComment ConditionAddCommentEventHandler
OnEnableDisable ConditionEnableEventHandler

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Описание методов

ConditionRefresh() публичный Метод

Handles a condition refresh.
public ConditionRefresh ( ISystemContext context, List events, bool includeChildren ) : void
context ISystemContext
events List
includeChildren bool
Результат void

GetCurrentUserId() защищенный Метод

Gets the current user id from the system context.
protected GetCurrentUserId ( ISystemContext context ) : string
context ISystemContext The system context.
Результат string

OnAddCommentCalled() защищенный Метод

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.
Результат ServiceResult

OnAfterCreate() защищенный Метод

Called after a node is created.
protected OnAfterCreate ( ISystemContext context, NodeState node ) : void
context ISystemContext
node NodeState
Результат void

OnDisableCalled() защищенный Метод

Handles the Disable method.
protected OnDisableCalled ( ISystemContext context, MethodState method, IList inputArguments, IList outputArguments ) : ServiceResult
context ISystemContext
method MethodState
inputArguments IList
outputArguments IList
Результат ServiceResult

OnEnableCalled() защищенный Метод

Handles the Enable method.
protected OnEnableCalled ( ISystemContext context, MethodState method, IList inputArguments, IList outputArguments ) : ServiceResult
context ISystemContext
method MethodState
inputArguments IList
outputArguments IList
Результат ServiceResult

ProcessBeforeAddComment() защищенный Метод

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.
Результат ServiceResult

ProcessBeforeEnableDisable() защищенный Метод

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.
Результат ServiceResult

ReportStateChange() защищенный Метод

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.
Результат void

SetComment() публичный Метод

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.
Результат void

SetEffectiveSubState() публичный Метод

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.
Результат void

SetEnableState() публичный Метод

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.
Результат void

SetSeverity() публичный Метод

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.
Результат void

UpdateEffectiveState() защищенный Метод

Updates the effective state for the condition.
protected UpdateEffectiveState ( ISystemContext context ) : void
context ISystemContext The context.
Результат void

UpdateStateAfterDisable() защищенный Метод

Updates the condition state after disabling.
protected UpdateStateAfterDisable ( ISystemContext context ) : void
context ISystemContext The system context.
Результат void

UpdateStateAfterEnable() защищенный Метод

Updates the condition state after enabling.
protected UpdateStateAfterEnable ( ISystemContext context ) : void
context ISystemContext The system context.
Результат void

Описание свойств

OnAddComment публичное свойство

Raised when a comment is added to the condition.
Return code can be used to cancel the operation.
public ConditionAddCommentEventHandler OnAddComment
Результат ConditionAddCommentEventHandler

OnEnableDisable публичное свойство

Raised when the condition is enabled or disabled.
Return code can be used to cancel the operation.
public ConditionEnableEventHandler OnEnableDisable
Результат ConditionEnableEventHandler