com.kuka.roboticsAPI.params
Class AbstractMotionAxisParams

java.lang.Object
  extended by com.kuka.roboticsAPI.params.AbstractMotionAxisParams
All Implemented Interfaces:
com.kuka.common.params.IParameter<AbstractMotionAxisParams>
Direct Known Subclasses:
JointAccelerationParams, JointJerkParams, JointVelocityParams

public class AbstractMotionAxisParams
extends Object
implements com.kuka.common.params.IParameter<AbstractMotionAxisParams>

This helper class can store up to 12 values. Each value is combined with a flag that tells if the specific value was set before.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

Constructor Summary
AbstractMotionAxisParams(double[] values)
          Allows to set a array of values.
AbstractMotionAxisParams(double value, boolean setForAll)
          Allows to set a value for all elements in Array and overrides them with it and mark the as set, or just set the OverallValue.
AbstractMotionAxisParams(KeyValuePairsForJoints... valuePairs)
          Allows to set multiple value pairs.
AbstractMotionAxisParams(KeyValuePairsForJoints valuePair)
          Allows to set one value pair.
 
Method Summary
protected  void checkValue(double value)
          Checks whether a value is valid.
 double getAxisValue(int axis)
          Returns the axis value for an axis index.
 double getAxisValue(com.kuka.roboticsAPI.deviceModel.JointEnum axis)
          Returns the value for an aixs enum.
 double getPossibleDefaultValue()
          Returns the default value.
 boolean isAxisValueSet(int axis)
          Check, whether a value for an axis is set.
 boolean isAxisValueSet(com.kuka.roboticsAPI.deviceModel.JointEnum axis)
          Check, whether a value for an axis is set.
 boolean isPossibleDefaultValueSet()
          Check, whether a default value was set.
 AbstractMotionAxisParams setAxisValue(int axis, double value)
          Sets the value for an axis index.
 AbstractMotionAxisParams setAxisValue(com.kuka.roboticsAPI.deviceModel.JointEnum axis, double value)
          Sets the value for an axis enum.
 void setPossibleDefaultValue(double value)
          Sets the default value.
 void unSetAxisValueForAxis(com.kuka.roboticsAPI.deviceModel.JointEnum axis)
          Resets the value for an axis enum.
 AbstractMotionAxisParams value()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMotionAxisParams

public AbstractMotionAxisParams(double value,
                                boolean setForAll)
Allows to set a value for all elements in Array and overrides them with it and mark the as set, or just set the OverallValue. Sets the PossibleDefaultValue too.

Parameters:
value - values for axes A1, A2..A12. There is no gap like A1 A2 A5 A6 possible.
setForAll - when false, the value will be only set as the default value. When true, the value will be also immediately set for all axes.

AbstractMotionAxisParams

public AbstractMotionAxisParams(double[] values)
Allows to set a array of values.

Parameters:
values - values for axes A1, A2..A12. There is no gap like A1 A2 A5 A6 possible.
Throws:
IllegalArgumentException

AbstractMotionAxisParams

public AbstractMotionAxisParams(KeyValuePairsForJoints... valuePairs)
Allows to set multiple value pairs.

Parameters:
valuePairs - pairs of AxisEnum -> value. This means values for axes A1, A2..A12. Writing values for axes with gaps like A1 A2 A5 A6 is possible.
Throws:
IllegalArgumentException

AbstractMotionAxisParams

public AbstractMotionAxisParams(KeyValuePairsForJoints valuePair)
Allows to set one value pair.

Parameters:
valuePair - pair AxisEnum -> value
Throws:
IllegalArgumentException
Method Detail

checkValue

protected void checkValue(double value)
Checks whether a value is valid.

Parameters:
value - value to check

isAxisValueSet

public boolean isAxisValueSet(com.kuka.roboticsAPI.deviceModel.JointEnum axis)
Check, whether a value for an axis is set.

Parameters:
axis - axis enum
Returns:
true, when a value for axis is set, false otherwise.

isAxisValueSet

public boolean isAxisValueSet(int axis)
Check, whether a value for an axis is set.

Parameters:
axis - axis index, starts at 0.
Returns:
true, when a value for axis is set, false otherwise.
Throws:
IllegalArgumentException

getPossibleDefaultValue

public double getPossibleDefaultValue()
Returns the default value.

Returns:
the default value
Throws:
IllegalAccessError

isPossibleDefaultValueSet

public boolean isPossibleDefaultValueSet()
Check, whether a default value was set.

Returns:
true, when a default value was set, false otherwise

setPossibleDefaultValue

public void setPossibleDefaultValue(double value)
Sets the default value.

Parameters:
value - the default value

getAxisValue

public double getAxisValue(com.kuka.roboticsAPI.deviceModel.JointEnum axis)
Returns the value for an aixs enum.

Parameters:
axis - axis enum
Returns:
the value for the axis enum.
Throws:
IllegalAccessError - when the axis value was not set

getAxisValue

public double getAxisValue(int axis)
Returns the axis value for an axis index.

Parameters:
axis - axis index, starts at 0
Returns:
the value
Throws:
IllegalArgumentException - when the maximum axis count was exceeded
IllegalAccessError - when the value was not set

unSetAxisValueForAxis

public void unSetAxisValueForAxis(com.kuka.roboticsAPI.deviceModel.JointEnum axis)
Resets the value for an axis enum.

Parameters:
axis - axis enum

setAxisValue

public AbstractMotionAxisParams setAxisValue(com.kuka.roboticsAPI.deviceModel.JointEnum axis,
                                             double value)
Sets the value for an axis enum.

Parameters:
axis - axis enum
value - the value
Returns:
"this" for chaining

setAxisValue

public AbstractMotionAxisParams setAxisValue(int axis,
                                             double value)
Sets the value for an axis index.

Parameters:
axis - the axis index, starts at 0
value - the value
Returns:
"this" for chaining
Throws:
IllegalArgumentException - when maximum axis count exceeded

value

public AbstractMotionAxisParams value()
Specified by:
value in interface com.kuka.common.params.IParameter<AbstractMotionAxisParams>


Copyright © 2019. All rights reserved.