Class NavigationAction

java.lang.Object
edu.tufts.hrilab.navigation.NavigationAction
All Implemented Interfaces:
Runnable

public abstract class NavigationAction extends Object implements Runnable
  • Field Details

    • type

      protected final NavigationAction.ActionType type
    • ID

      protected final long ID
    • dargs

      protected double[] dargs
    • stargs

      protected String[] stargs
    • largs

      protected long[] largs
  • Constructor Details

  • Method Details

    • getStatus

      public ActionStatus getStatus()
      Get action status.
      Returns:
    • setStatus

      public void setStatus(ActionStatus s)
      Set action status.
    • getID

      public long getID()
      ID of action.
      Returns:
      - timestamp when action was created.
    • setRunFlag

      public void setRunFlag(boolean flag)
      Set the run flag status. Use this to end processing of a run loop.
      Parameters:
      flag -
    • getRunFlag

      public boolean getRunFlag()
      Run flag status. Automatically set to true on object instantiation, and will return true even if action is not currently running. Run methods that continually loop should use this method to know if the loop should terminate.
      Returns:
      boolean - runFlag
    • run

      public abstract void run()
      Main run method to be implemented. This is the method ran by the NavigationActionManager once a NavigationAction instance is submitted to the manager via initiateAction.
      Specified by:
      run in interface Runnable
    • cancel

      public abstract boolean cancel()
      Main action cancellation method to be implemented. This method cancels the processing of the run method if this instance is currently being ran by a NavigationActionManager.
      Returns:
      - if Action was currently being ran by manager.