C# Class Opc.Ua.FiniteStateMachineState

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

Public Properties

Property Type Description
OnAfterTransition StateMachineTransitionHandler
OnBeforeTransition StateMachineTransitionHandler
OnCheckUserPermission StateMachineTransitionHandler

Public Methods

Method Description
CauseProcessingCompleted ( ISystemContext context, uint causeId ) : void

Updates the state machine to reflect the successful processing of a method.

DoCause ( ISystemContext context, MethodState causeMethod, uint causeId, IList inputArguments, IList outputArguments ) : ServiceResult

Invokes the specified cause.

DoTransition ( ISystemContext context, uint transitionId, uint causeId, IList inputArguments, IList outputArguments ) : ServiceResult

Causes the specified transition to occur.

IsCausePermitted ( ISystemContext context, uint causeId, bool checkUserAccessRights ) : bool

Checks if the cause is permitted given the current state and returns the associated transition.

SetState ( ISystemContext context, uint newState ) : void

Forces the machine into the specified state.

Protected Methods

Method Description
CreateAuditEvent ( ISystemContext context, MethodState causeMethod, uint causeId ) : AuditUpdateStateEventState

Creates an instance of an audit event.

CreateTransitionEvent ( ISystemContext context, uint transitionId, uint causeId ) : TransitionEventState

Creates an instance of an transition event.

GetCurrentStateId ( ) : uint

Returns the current state of for the state machine.

GetNewStateForTransition ( ISystemContext context, uint transitionId ) : uint

Returns the new state for the specified transition. Returns 0 if the transition is not allowed.

GetTransitionForCause ( ISystemContext context, uint causeId ) : uint

Returns the transition for the cause given the current state.

GetTransitionToState ( ISystemContext context, uint targetStateId ) : uint

Returns the transition from the current state to the target state.

InvokeCallback ( StateMachineTransitionHandler callback, ISystemContext context, StateMachineState machine, uint transitionId, uint causeId, IList inputArguments, IList outputArguments ) : ServiceResult

Invokes the callback function if it has been specified.

OnAfterCreate ( ISystemContext context, NodeState node ) : void

Initializes the object as a collection of counters which change value on read.

TransitionHasEffect ( ISystemContext context, uint transitionId ) : bool

Checks if the transition has an effect.

UpdateAuditEvent ( ISystemContext context, MethodState causeMethod, uint causeId, AuditUpdateStateEventState e, ServiceResult result ) : void

Updates an audit event after the method is invoked.

UpdateStateVariable ( ISystemContext context, uint stateId, FiniteStateVariableState variable ) : void

Updates the current state variable.

UpdateTransitionEvent ( ISystemContext context, uint transitionId, uint causeId, TransitionEventState e ) : void

Updates a transition event after the transition is complete.

UpdateTransitionVariable ( ISystemContext context, uint transitionId, FiniteTransitionVariableState variable ) : void

Updates the last transition variable.

Method Details

CauseProcessingCompleted() public method

Updates the state machine to reflect the successful processing of a method.
public CauseProcessingCompleted ( ISystemContext context, uint causeId ) : void
context ISystemContext The context.
causeId uint The cause id.
return void

CreateAuditEvent() protected method

Creates an instance of an audit event.
protected CreateAuditEvent ( ISystemContext context, MethodState causeMethod, uint causeId ) : AuditUpdateStateEventState
context ISystemContext
causeMethod MethodState
causeId uint
return AuditUpdateStateEventState

CreateTransitionEvent() protected method

Creates an instance of an transition event.
protected CreateTransitionEvent ( ISystemContext context, uint transitionId, uint causeId ) : TransitionEventState
context ISystemContext
transitionId uint
causeId uint
return TransitionEventState

DoCause() public method

Invokes the specified cause.
public DoCause ( ISystemContext context, MethodState causeMethod, uint causeId, IList inputArguments, IList outputArguments ) : ServiceResult
context ISystemContext
causeMethod MethodState
causeId uint
inputArguments IList
outputArguments IList
return ServiceResult

DoTransition() public method

Causes the specified transition to occur.
public DoTransition ( ISystemContext context, uint transitionId, uint causeId, IList inputArguments, IList outputArguments ) : ServiceResult
context ISystemContext
transitionId uint
causeId uint
inputArguments IList
outputArguments IList
return ServiceResult

GetCurrentStateId() protected method

Returns the current state of for the state machine.
protected GetCurrentStateId ( ) : uint
return uint

GetNewStateForTransition() protected method

Returns the new state for the specified transition. Returns 0 if the transition is not allowed.
protected GetNewStateForTransition ( ISystemContext context, uint transitionId ) : uint
context ISystemContext
transitionId uint
return uint

GetTransitionForCause() protected method

Returns the transition for the cause given the current state.
protected GetTransitionForCause ( ISystemContext context, uint causeId ) : uint
context ISystemContext
causeId uint
return uint

GetTransitionToState() protected method

Returns the transition from the current state to the target state.
protected GetTransitionToState ( ISystemContext context, uint targetStateId ) : uint
context ISystemContext
targetStateId uint
return uint

InvokeCallback() protected method

Invokes the callback function if it has been specified.
protected InvokeCallback ( StateMachineTransitionHandler callback, ISystemContext context, StateMachineState machine, uint transitionId, uint causeId, IList inputArguments, IList outputArguments ) : ServiceResult
callback StateMachineTransitionHandler
context ISystemContext
machine StateMachineState
transitionId uint
causeId uint
inputArguments IList
outputArguments IList
return ServiceResult

IsCausePermitted() public method

Checks if the cause is permitted given the current state and returns the associated transition.
public IsCausePermitted ( ISystemContext context, uint causeId, bool checkUserAccessRights ) : bool
context ISystemContext
causeId uint
checkUserAccessRights bool
return bool

OnAfterCreate() protected method

Initializes the object as a collection of counters which change value on read.
protected OnAfterCreate ( ISystemContext context, NodeState node ) : void
context ISystemContext
node NodeState
return void

SetState() public method

Forces the machine into the specified state.
public SetState ( ISystemContext context, uint newState ) : void
context ISystemContext
newState uint
return void

TransitionHasEffect() protected method

Checks if the transition has an effect.
protected TransitionHasEffect ( ISystemContext context, uint transitionId ) : bool
context ISystemContext
transitionId uint
return bool

UpdateAuditEvent() protected method

Updates an audit event after the method is invoked.
protected UpdateAuditEvent ( ISystemContext context, MethodState causeMethod, uint causeId, AuditUpdateStateEventState e, ServiceResult result ) : void
context ISystemContext
causeMethod MethodState
causeId uint
e AuditUpdateStateEventState
result ServiceResult
return void

UpdateStateVariable() protected method

Updates the current state variable.
protected UpdateStateVariable ( ISystemContext context, uint stateId, FiniteStateVariableState variable ) : void
context ISystemContext
stateId uint
variable FiniteStateVariableState
return void

UpdateTransitionEvent() protected method

Updates a transition event after the transition is complete.
protected UpdateTransitionEvent ( ISystemContext context, uint transitionId, uint causeId, TransitionEventState e ) : void
context ISystemContext
transitionId uint
causeId uint
e TransitionEventState
return void

UpdateTransitionVariable() protected method

Updates the last transition variable.
protected UpdateTransitionVariable ( ISystemContext context, uint transitionId, FiniteTransitionVariableState variable ) : void
context ISystemContext
transitionId uint
variable FiniteTransitionVariableState
return void

Property Details

OnAfterTransition public_oe property

Raises after a transition occurs. Errors are ignored.
public StateMachineTransitionHandler OnAfterTransition
return StateMachineTransitionHandler

OnBeforeTransition public_oe property

Raised before a transition occurs.
public StateMachineTransitionHandler OnBeforeTransition
return StateMachineTransitionHandler

OnCheckUserPermission public_oe property

Raised to check whether the current user is allowed to execute the command.
public StateMachineTransitionHandler OnCheckUserPermission
return StateMachineTransitionHandler