|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.common.TaggableObject
com.kuka.roboticsAPI.geometricModel.SceneGraphObject
com.kuka.roboticsAPI.geometricModel.SpatialObject
com.kuka.roboticsAPI.geometricModel.PhysicalObject
com.kuka.roboticsAPI.deviceModel.Device
public abstract class Device
A device is an abstract thing which is able to perform some action or deliver some data. Device is controlled via some controller.
| Field Summary | |
|---|---|
protected com.kuka.roboticsAPI.deviceModel.VersionInfoGroup[] |
_hardwareVersion
Array with hardware version information. |
| Constructor Summary | |
|---|---|
protected |
Device(Controller controller,
String name)
Creates a new device with the given controller. |
| Method Summary | |
|---|---|
void |
acquireCommandPermit(ICommandContainer container)
Asks the device for a command permit. |
protected com.kuka.common.params.IParameterSet |
createDefaultsParameterSet()
Creates the defaults parameter set for this device. |
void |
dispose()
Disposes the device. |
RoboticsAPIContext |
getContext()
Gets the context for this device. |
Controller |
getController()
Gets the controller to which this device is logically connected. |
com.kuka.common.params.IParameterSet |
getDefaults()
Gets the map containing the default values of the device. |
com.kuka.roboticsAPI.deviceModel.VersionInfoGroup[] |
getHardwareVersion()
Gets the hardware version. |
String |
getUniqueName()
Gets the unique name of the device which looks like 'controllerName/deviceName'. |
void |
initialize()
Initializes this device. |
boolean |
isInitialized()
Determines if this device is initialized. |
protected void |
onDispose()
Called when the device get's disposed. |
protected void |
onInitialize()
Called when the device get's initialized. |
com.kuka.roboticsAPI.controllerModel.StatePortState |
refreshHardwareVersion()
Refreshes the hardware version. |
void |
releaseCommandPermit(ICommandContainer container)
Releases a formerly acquired command permit. |
void |
setName(String name)
Unsupported operation. |
| Methods inherited from class com.kuka.roboticsAPI.geometricModel.PhysicalObject |
|---|
addDefaultMotionFrame, getDefaultMotionFrame, getLoadData, move, move, moveAsync, moveAsync, setDefaultMotionFrame |
| Methods inherited from class com.kuka.roboticsAPI.geometricModel.SpatialObject |
|---|
attachTo, attachTo, changeParent, detach, switchParent, switchParent |
| Methods inherited from class com.kuka.roboticsAPI.geometricModel.SceneGraphObject |
|---|
addChildFrame, addChildFrame, addChildFrame, addChildFrame, addChildFrame, addChildFrame, allObjects, changeFrameParent, changeFramePosition, findMembersOfGroup, findRobot, getAllFrames, getAllUserParameters, getChild, getChildFrameLock, getChildren, getFrame, getName, getParent, getRootFrame, getRootOfGroup, getUserParameter, groupToParent, isDescendantOf, isGroupedToParent, isMemberOfGroup, isRootOfGroup, removeFrame, renameFrame, setRootFrame, setUserParameter, toString, ungroupFromParent |
| Methods inherited from class com.kuka.common.TaggableObject |
|---|
getTag, setTag |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected volatile com.kuka.roboticsAPI.deviceModel.VersionInfoGroup[] _hardwareVersion
| Constructor Detail |
|---|
protected Device(Controller controller,
String name)
controller - The controller. May be null.name - The name of the device.| Method Detail |
|---|
public void setName(String name)
A device name cannot be changed. This method will therefore fail with an IllegalStateException.
setName in class SpatialObjectname - Unsupported.public final RoboticsAPIContext getContext()
public com.kuka.common.params.IParameterSet getDefaults()
public final Controller getController()
IllegalStateException - if the device has no controller.public final boolean isInitialized()
public com.kuka.roboticsAPI.controllerModel.StatePortState refreshHardwareVersion()
public final com.kuka.roboticsAPI.deviceModel.VersionInfoGroup[] getHardwareVersion()
public final void dispose()
public final void acquireCommandPermit(ICommandContainer container)
throws InterruptedException
This is a framework method and should never get called manually.
Each device has a bunch of command permits which regulate how many commands for a device are active at the same time (within one RoboticsAPIContext). The permit-amount is configurable through the RoboticsAPIDefaults class and the 'DEVICE_COMMAND_PERMITS' constant. 3 is the default value of this property.
container - The container which will be used for the execution of the
command.
InterruptedException - if waiting was interrupted.public final void releaseCommandPermit(ICommandContainer container)
This is a framework method and should never get called manually.
container - The container which was used for the execution of the command.acquireCommandPermit(com.kuka.roboticsAPI.executionModel.ICommandContainer)public final void initialize()
public String getUniqueName()
protected com.kuka.common.params.IParameterSet createDefaultsParameterSet()
This method is called once during device initialization. This is the place for the device to return a device specific type of a parameter set. The device should then also override the getDefaults() method and change the return type of this method appropriately.
protected void onInitialize()
May be overridden by subclasses. Will only be called once. If this method fails with an exception, the device will not be initialized and may behave strange under some circumstances.
protected void onDispose()
May be overridden by subclasses. Will only be called once.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||