com.kuka.roboticsAPI.ioModel
Class AbstractIOGroup

java.lang.Object
  extended by com.kuka.roboticsAPI.ioModel.AbstractIOGroup

public abstract class AbstractIOGroup
extends Object

Abstract base class for IO-groups.


Constructor Summary
AbstractIOGroup(Controller controller, String ioGroupName)
          Creates a new IO Group.
 
Method Summary
protected  void addAnalogOutput(String ioName, com.kuka.roboticsAPI.ioModel.IOTypes ioType, int bitSize, double rangeStart, double rangeEnd)
          Adds an output to the list of supported outputs.
protected  void addDigitalOutput(String ioName, com.kuka.roboticsAPI.ioModel.IOTypes ioType, int bitSize)
          Adds an output to the list of supported outputs.
protected  void addInput(String ioName, com.kuka.roboticsAPI.ioModel.IOTypes ioType, int bitSize)
          Adds an input to the list of supported inputs.
protected  void addIO(AbstractIO io)
          Adds an IO to the list of supported IOs.
protected  void addMockedAnalogOutput(String ioName, com.kuka.roboticsAPI.ioModel.IOTypes ioType, int bitSize, double rangeStart, double rangeEnd)
          Adds an mocked output to the list of supported outputs.
protected  void addMockedDigitalOutput(String ioName, com.kuka.roboticsAPI.ioModel.IOTypes ioType, int bitSize)
          Adds an mocked output to the list of supported outputs.
protected  void addMockedInput(String ioName, com.kuka.roboticsAPI.ioModel.IOTypes ioType, int bitSize, Object initialValue)
          Adds an input to the list of supported inputs.
protected  double getAnalogIOValue(String ioName, boolean isOutput)
          Reads an analog I/O.
protected  boolean getBooleanIOValue(String ioName, boolean isOutput)
          Reads an boolean I/O.
 Input getInput(String ioName)
          Returns the Input class for the given IO name.
 Collection<Input> getInputs()
          Returns a collection of inputs registered for this group.
 AbstractIO getIO(String ioName, boolean isOutput)
          Returns the AbstractIO class for the given IO name.
 String getIOGroupName()
          gets the name of the IO-group.
protected  Long getNumberIOValue(String ioName, boolean isOutput)
          Reads an integer I/O.
 Output getOutput(String ioName)
          Returns the Output class for the given IO name.
 Collection<Output> getOutputs()
          Returns a collection of outputs registered for this group.
protected  void setAnalogOutput(String outputName, double value)
          Writes an analog output.
protected  void setDigitalOutput(String outputName, boolean value)
          Writes a boolean digital output.
protected  void setDigitalOutput(String outputName, Number value)
          Writes an integer digital output.
protected  void setMockedInput(String inputName, Object value)
          Sets the return value for a mocked input.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractIOGroup

public AbstractIOGroup(Controller controller,
                       String ioGroupName)
Creates a new IO Group.

Parameters:
controller - the controller.
ioGroupName - name of the IO-group.
This element is not in its final state and might change in future versions.
Method Detail

getIOGroupName

public String getIOGroupName()
gets the name of the IO-group.

Returns:
the name of the IO-group

addAnalogOutput

protected void addAnalogOutput(String ioName,
                               com.kuka.roboticsAPI.ioModel.IOTypes ioType,
                               int bitSize,
                               double rangeStart,
                               double rangeEnd)
Adds an output to the list of supported outputs.

Parameters:
ioName - name of the output
ioType - type of the output
bitSize - bit size of the output.
rangeStart - start of the analog range
rangeEnd - end of the analog range

addDigitalOutput

protected void addDigitalOutput(String ioName,
                                com.kuka.roboticsAPI.ioModel.IOTypes ioType,
                                int bitSize)
Adds an output to the list of supported outputs.

Parameters:
ioName - name of the output
ioType - type of the output
bitSize - bit size of the output.

addMockedAnalogOutput

protected void addMockedAnalogOutput(String ioName,
                                     com.kuka.roboticsAPI.ioModel.IOTypes ioType,
                                     int bitSize,
                                     double rangeStart,
                                     double rangeEnd)
Adds an mocked output to the list of supported outputs.

Parameters:
ioName - name of the output
ioType - type of the output
bitSize - bit size of the output.
rangeStart - start of the analog range
rangeEnd - end of the analog range

addMockedDigitalOutput

protected void addMockedDigitalOutput(String ioName,
                                      com.kuka.roboticsAPI.ioModel.IOTypes ioType,
                                      int bitSize)
Adds an mocked output to the list of supported outputs.

Parameters:
ioName - name of the output
ioType - type of the output
bitSize - bit size of the output.

addInput

protected void addInput(String ioName,
                        com.kuka.roboticsAPI.ioModel.IOTypes ioType,
                        int bitSize)
Adds an input to the list of supported inputs.

Parameters:
ioName - name of the IO
ioType - type of the IO
bitSize - bit size of the IO.

addMockedInput

protected void addMockedInput(String ioName,
                              com.kuka.roboticsAPI.ioModel.IOTypes ioType,
                              int bitSize,
                              Object initialValue)
Adds an input to the list of supported inputs.

Parameters:
ioName - name of the IO
ioType - type of the IO
bitSize - bit size of the IO.
initialValue - initial value of the mocked input.

setDigitalOutput

protected void setDigitalOutput(String outputName,
                                Number value)
Writes an integer digital output. Only the integer values of the number are used.

Parameters:
outputName - name of the output
value - integer value to write

setDigitalOutput

protected void setDigitalOutput(String outputName,
                                boolean value)
Writes a boolean digital output.

Parameters:
outputName - name of the output
value - boolean value to write

setMockedInput

protected void setMockedInput(String inputName,
                              Object value)
Sets the return value for a mocked input.

Parameters:
inputName - name of the mocked input.
value - return value to set.

setAnalogOutput

protected void setAnalogOutput(String outputName,
                               double value)
Writes an analog output.

Parameters:
outputName - name of the output
value - analog value to write

getAnalogIOValue

protected double getAnalogIOValue(String ioName,
                                  boolean isOutput)
Reads an analog I/O.

Parameters:
ioName - name of the I/O
isOutput - true if I/O is an output.
Returns:
analog value of the I/O

getBooleanIOValue

protected boolean getBooleanIOValue(String ioName,
                                    boolean isOutput)
Reads an boolean I/O.

Parameters:
ioName - name of the I/O
isOutput - true if I/O is an output.
Returns:
analog value of the I/O

getNumberIOValue

protected Long getNumberIOValue(String ioName,
                                boolean isOutput)
Reads an integer I/O.

Parameters:
ioName - name of the I/O
isOutput - true if I/O is an output.
Returns:
analog value of the I/O

addIO

protected void addIO(AbstractIO io)
Adds an IO to the list of supported IOs.

Parameters:
io - the IO

getIO

public AbstractIO getIO(String ioName,
                        boolean isOutput)
Returns the AbstractIO class for the given IO name.

Parameters:
ioName - the name of the io
isOutput - true, if the IO is an output
Returns:
the AbstractIO class

getInput

public Input getInput(String ioName)
Returns the Input class for the given IO name.

Parameters:
ioName - the name of the input
Returns:
the Input class

getOutput

public Output getOutput(String ioName)
Returns the Output class for the given IO name.

Parameters:
ioName - the name of the output
Returns:
the Output class

getInputs

public Collection<Input> getInputs()
Returns a collection of inputs registered for this group.

Returns:
unmodifiable collection of all inputs.

getOutputs

public Collection<Output> getOutputs()
Returns a collection of outputs registered for this group.

Returns:
unmodifiable collection of all outputs.


Copyright © 2019. All rights reserved.