IStep
- Namespace
- ZCore
Interface for single steps in Sequence among others. The main implementation of this interface is the Step class, which should be looked into for further documentation.
INTERFACE IStep
Methods
Begin
This method returns the index of the first step in this Sequence. It is the same value as given when this object is being constructed via FB_init
METHOD PUBLIC Begin () : INT
Returns
- INT
CurrentIndex
Returns the current step in which the object is actually in
METHOD CurrentIndex () : INT
Returns
- INT
End
This method returns the index of the last step in this Sequence. It is the same value as given when this object is being constructed via FB_init
METHOD PUBLIC End () : INT
Returns
- INT
Previous
This method returns the previous step index. At initialization of this function block previous is equal to 0.
METHOD PUBLIC Previous () : INT
Returns
- INT
RepeatStep
Calling this method sets the next step to be taken to the same that we are already in. Use this method if it is required to get into the OnEntry section of a step. Internally, this method calls
_step.SetNext(_step.Index());
METHOD RepeatStep ()
Restart
This method changes the step index to Begin and OnExit of the actual step will trigger and OnEntry of the Begin step will also trigger.
This method can be used during execution of the sequence to jump right at the beginning and be sure to trigger OnExit and OnEntry correctly.
METHOD PUBLIC Restart ()
SetNext
Set the next provided step. Also, it changes the state of this step object
to the changed status such that IsNotRepeatable will return FALSE the
next time that it is called. Hence, if used properly (see Step the next step will be called
in the same cycle.
If index
is out of bounds (Begin and End) the internal state
switches to error.
METHOD PUBLIC SetNext (
index : INT)