com.kuka.roboticsAPI.ioModel
Class AbstractIO

java.lang.Object
  extended by java.util.Observable
      extended by com.kuka.roboticsAPI.ioModel.AbstractIO
Direct Known Subclasses:
Input, Output

public abstract class AbstractIO
extends Observable

Abstract base class for IOs.


Constructor Summary
protected AbstractIO(Controller controller, String ioGroupName, String ioName, com.kuka.roboticsAPI.ioModel.IOTypes ioDataType, int bitSize)
          Creates a new IO object.
 
Method Summary
 int getBitSize()
          Gets the bit size of the I/O.
 boolean getBooleanIOValue()
          The IO is called to update it's value from the ioService.
 byte getByteIOValue()
          The IO is called to update it's value from the ioService.
 Controller getController()
          Gets the controller used for writing / reading I/O requests.
 com.kuka.roboticsAPI.ioModel.IOTypes getDataType()
          Gets the data type of the IO.
 int getIntIOValue()
          The IO is called to update it's value from the ioService.
 String getIOGroupName()
          Gets the name of the IO group.
 String getIOName()
          Gets the name of the IO.
 Number getIOValue()
          The IO is called to update it's value from the ioService.
 long getLongIOValue()
          The IO is called to update it's value from the ioService.
protected abstract  ReadIORequest getReadIORequest()
          Gets the request for reading an I/O value from the controller.
 boolean isBoolean()
          Checks for compatibility with Java types.
 boolean isByte()
          Checks for compatibility with Java types.
 boolean isInteger()
          Checks for compatibility with Java types.
 boolean isLong()
          Checks for compatibility with Java types.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractIO

protected AbstractIO(Controller controller,
                     String ioGroupName,
                     String ioName,
                     com.kuka.roboticsAPI.ioModel.IOTypes ioDataType,
                     int bitSize)
Creates a new IO object.

Parameters:
controller - the used controller.
ioGroupName - name of the IO-group
ioName - name of the IO
ioDataType - data type of the IO
bitSize - bit size of the IO
Method Detail

getDataType

public com.kuka.roboticsAPI.ioModel.IOTypes getDataType()
Gets the data type of the IO.

Returns:
the data type of the IO

getIOGroupName

public String getIOGroupName()
Gets the name of the IO group.

Returns:
the name of the IO group.

getIOName

public String getIOName()
Gets the name of the IO.

Returns:
the name of the IO.

getController

public Controller getController()
Gets the controller used for writing / reading I/O requests.

Returns:
the controller used for writing / reading I/O requests
This element is not in its final state and might change in future versions.

getBitSize

public int getBitSize()
Gets the bit size of the I/O.

Returns:
the bit size of the I/O.

getReadIORequest

protected abstract ReadIORequest getReadIORequest()
Gets the request for reading an I/O value from the controller. This request depends on whether the I/O is an output or input.

Returns:
the request for reading an I/O value from the controller.

getIOValue

public Number getIOValue()
The IO is called to update it's value from the ioService.

Returns:
The current value of the IO.

isBoolean

public boolean isBoolean()
Checks for compatibility with Java types.

Returns:
true if the value of this IO is represented by the Java type boolean.

isByte

public boolean isByte()
Checks for compatibility with Java types.

Returns:
true if the value of this IO is represented by the Java type byte.

isInteger

public boolean isInteger()
Checks for compatibility with Java types.

Returns:
true if the value of this IO is represented by the Java type int.

isLong

public boolean isLong()
Checks for compatibility with Java types.

Returns:
true if the value of this IO is represented by the Java type long.

getBooleanIOValue

public boolean getBooleanIOValue()
The IO is called to update it's value from the ioService.

Returns:
The current boolean value of the IO.
Throws:
IllegalStateException - if the IO is not of type Boolean

getByteIOValue

public byte getByteIOValue()
The IO is called to update it's value from the ioService.

Returns:
The current byte value of the IO.
Throws:
IllegalStateException - if the IO is not of type byte

getIntIOValue

public int getIntIOValue()
The IO is called to update it's value from the ioService.

Returns:
The current int value of the IO.
Throws:
IllegalStateException - if the IO is not of type int

getLongIOValue

public long getLongIOValue()
The IO is called to update it's value from the ioService.

Returns:
The current long value of the IO.
Throws:
IllegalStateException - if the IO is not of type long


Copyright © 2019. All rights reserved.