/*
MobileRobots Advanced Robotics Navigation and Localization (ARNL)
Version 1.7.1

Copyright (C) 2004, 2005 ActivMedia Robotics LLC
Copyright (C) 2006, 2007, 2008, 2009 MobileRobots Inc.

All Rights Reserved.

MobileRobots Inc does not make any representations about the
suitability of this software for any purpose.  It is provided "as is"
without express or implied warranty.

The license for this software is distributed as LICENSE.txt in the top
level directory.

robots@mobilerobots.com
MobileRobots
10 Columbia Drive
Amherst, NH 03031
800-639-9481

*/
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.29
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.mobilerobots.BaseArnl;

  import com.mobilerobots.Aria.*;
  import com.mobilerobots.ArNetworking.*;

public class ArActionPlanAndMoveToGoal extends ArAction {
  private long swigCPtr;

  /* for internal use by swig only */
  public ArActionPlanAndMoveToGoal(long cPtr, boolean cMemoryOwn) {
    super(BaseArnlJavaJNI.SWIGArActionPlanAndMoveToGoalUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  /* for internal use by swig only */
  public static long getCPtr(ArActionPlanAndMoveToGoal obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public void delete() {
    if(swigCPtr != 0 && swigCMemOwn) {
      swigCMemOwn = false;
      BaseArnlJavaJNI.delete_ArActionPlanAndMoveToGoal(swigCPtr);
    }
    swigCPtr = 0;
    super.delete();
  }

  public ArActionPlanAndMoveToGoal(double maxVel, double maxRotVel, ArPathPlanningTask ppt, ArRangeDevice laser, ArRangeDevice sonar) {
    this(BaseArnlJavaJNI.new_ArActionPlanAndMoveToGoal(maxVel, maxRotVel, ArPathPlanningTask.getCPtr(ppt), ArRangeDevice.getCPtr(laser), ArRangeDevice.getCPtr(sonar)), true);
  }

  public ArActionDesired fire(ArActionDesired currentDesired) {
    long cPtr = BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_fire(swigCPtr, ArActionDesired.getCPtr(currentDesired));
    return (cPtr == 0) ? null : new ArActionDesired(cPtr, false);
  }

  public void deactivate() {
    BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_deactivate(swigCPtr);
  }

  public void setTotalVel(double lvel, double avel) {
    BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_setTotalVel(swigCPtr, lvel, avel);
  }

  public void setEndMoveParams() {
    BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_setEndMoveParams(swigCPtr);
  }

  public void setHeadingParams() {
    BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_setHeadingParams(swigCPtr);
  }

  public void clearRangeDevices() {
    BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_clearRangeDevices(swigCPtr);
  }

  public void clearCumRangeDevices(long cyt) {
    BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_clearCumRangeDevices(swigCPtr, cyt);
  }

  public void setMaxVel(double v) {
    BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_setMaxVel(swigCPtr, v);
  }

  public void setMaxRotVel(double r) {
    BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_setMaxRotVel(swigCPtr, r);
  }

  public void setFailedTimes(int i) {
    BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_setFailedTimes(swigCPtr, i);
  }

  public void setRangeFactor(double r) {
    BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_setRangeFactor(swigCPtr, r);
  }

  public void setEndMoveFlag(boolean f) {
    BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_setEndMoveFlag(swigCPtr, f);
  }

  public void setPlanState(ArPathPlanningTask.LocalPlanningState s) {
    BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_setPlanState(swigCPtr, s.swigValue());
  }

  public void setReplannedTimes(int f) {
    BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_setReplannedTimes(swigCPtr, f);
  }

  public double getMaxVel() {
    return BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_getMaxVel(swigCPtr);
  }

  public double getRotMaxVel() {
    return BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_getRotMaxVel(swigCPtr);
  }

  public int getFailedTimes() {
    return BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_getFailedTimes(swigCPtr);
  }

  public double getRangeFactor() {
    return BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_getRangeFactor(swigCPtr);
  }

  public boolean getEndMoveFlag() {
    return BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_getEndMoveFlag(swigCPtr);
  }

  public ArPathPlanningTask.LocalPlanningState getPlanState() {
    return ArPathPlanningTask.LocalPlanningState.swigToEnum(BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_getPlanState(swigCPtr));
  }

  public int getReplannedTimes() {
    return BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_getReplannedTimes(swigCPtr);
  }

  public void setCurrentDynamicParams(ArActionDesired curDesired) {
    BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_setCurrentDynamicParams(swigCPtr, ArActionDesired.getCPtr(curDesired));
  }

  public double getFailedTimeRatio() {
    return BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_getFailedTimeRatio(swigCPtr);
  }

  public ArActionDesired getDesired() {
    long cPtr = BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_getDesired(swigCPtr);
    return (cPtr == 0) ? null : new ArActionDesired(cPtr, false);
  }

  public double computeSafeDecel(double obsDist, double linVel, double rotVel, double currentDecel, SWIGTYPE_p_bool eStopFlag, SWIGTYPE_p_bool brakeFlag) {
    return BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_computeSafeDecel(swigCPtr, obsDist, linVel, rotVel, currentDecel, SWIGTYPE_p_bool.getCPtr(eStopFlag), SWIGTYPE_p_bool.getCPtr(brakeFlag));
  }

  public ArActionDesired stop(double obsDist, double linVel, double rotVel, double currentDecel) {
    long cPtr = BaseArnlJavaJNI.ArActionPlanAndMoveToGoal_stop(swigCPtr, obsDist, linVel, rotVel, currentDecel);
    return (cPtr == 0) ? null : new ArActionDesired(cPtr, false);
  }

}
