Class StateResetter

  • All Implemented Interfaces:
    Serializable, Serializable

    public class StateResetter
    extends OneShotBehaviour
    This behaviour is used as a state of a FSMbehavior in order to reset some of the FSM's states or the whole FSM
    Author:
    Giovanni Caire - TILab, Marco Monticone
    See Also:
    Serialized Form
    • Constructor Detail

      • StateResetter

        public StateResetter​(String[] states)
        Constructor.
        Parameters:
        states - Represent the names of FSM's to reset. If null the parent Behaviour is resetted
      • StateResetter

        public StateResetter()
        Constructor. equivalent to StateResetter(null)
    • Method Detail

      • action

        public void action()
        Description copied from class: Behaviour
        Runs the behaviour. This abstract method must be implemented by Behavioursubclasses to perform ordinary behaviour duty. An agent schedules its behaviours calling their action() method; since all the behaviours belonging to the same agent are scheduled cooperatively, this method must not enter in an endless loop and should return as soon as possible to preserve agent responsiveness. To split a long and slow task into smaller section, recursive behaviour aggregation may be used.
        Specified by:
        action in class Behaviour
        See Also:
        CompositeBehaviour