|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.roboticsAPI.controllerModel.Controller
public abstract class Controller
A controller is the access point to a robotics control controller and has access methods to services each controller must provide. All services have a lazy creation strategy. They are initialized right at the point when they are needed.
| Constructor Summary | |
|---|---|
protected |
Controller(RoboticsAPIContext context,
String name)
Creates a new instance of a controller. |
| Method Summary | ||
|---|---|---|
void |
addControllerListener(IControllerStateListener listener)
Adds a lListener. |
|
protected void |
afterDispose()
Called after the controller was disposed. |
|
boolean |
afterInitialize()
Called when the controller was initialized. |
|
protected boolean |
areServicesInitialized()
Indicates if the services (in initialization phase) are initialized. |
|
protected void |
callAsyncEvent(com.kuka.common.events.IEventCaller<IControllerStateListener> caller)
Calls the specified event asynchronously. |
|
protected void |
callSyncEvent(com.kuka.common.events.IEventCaller<IControllerStateListener> caller)
Calls the specified event synchronously. |
|
void |
clipProgramOverride(double overrideClip)
Deprecated. use IApplicationOverrideControl.clipManualOverride(double) instead. |
|
protected ConditionService |
createConditionServiceInstance()
Create a condition service instance. |
|
protected abstract ExecutionService |
createExecutionServiceInstance()
Should return an uninitialized instance of the ExecutionService for this controller. |
|
protected RecordingService |
createRecordingServiceInstance()
Create a recording service instance. |
|
protected abstract RequestService |
createRequestServiceInstance()
Should return an uninitialized instance of the RequestService for this controller. |
|
void |
deinitialize()
Deinitializes the controller. |
|
void |
dispose()
Disposes the controller. |
|
protected void |
fireControllerShutdown()
Informs all listeners about that the controller is about to be shutdown. |
|
protected void |
fireFieldBusDeviceConfigurationChangedEvent(DispatchedEventData dispatchedEvent)
Informs all listeners that the IP-address of the controller has changed. |
|
protected void |
fireFieldBusDeviceIdentificationEvent(DispatchedEventData dispatchedEvent)
Informs all listeners that a field bus identification request came in. |
|
protected void |
fireStatePortChanged(com.kuka.roboticsAPI.controllerModel.StatePortData data)
Informs all listeners that the state port (= error message port) of the controller has changed. |
|
IControllerInitializeBehaviour |
getBehavior()
Gets the current controller initialize behavior. |
|
ConditionService |
getConditionService()
Get the condition service of the controller. |
|
RoboticsAPIContext |
getContext()
Gets the context of this controller. |
|
ControllerInformation |
getControllerInformation()
Gets some additional information about this controller. |
|
protected ControllerInformation |
getControllerInformationInstance()
Should return an initialized instance of the controller information for this controller. |
|
|
getDevice(Class<T> deviceClass)
Gets the first device with the given type or throws an exception if no device was found. |
|
Device |
getDevice(String name)
Gets the device with the given name or throws an exception if no device was found. |
|
protected Map<String,Device> |
getDeviceMap()
Returns the complete map with devices for classes deriving from controller. |
|
Collection<Device> |
getDevices()
Gets a list of available devices from the controller. |
|
ExecutionService |
getExecutionService()
Gets the service from the controller dealing with execution of commands. |
|
Iterable<com.kuka.common.ParameterSet> |
getInvalidDevices()
Gets all devices of the controller that are not initialized and not usable. |
|
String |
getName()
Gets the name of the controller. |
|
com.kuka.common.ParameterSet |
getParameters()
Returns the parameters which were used to configure the controller. |
|
double |
getProgramOverride()
Deprecated. use IApplicationOverrideControl.getManualOverride() instead. |
|
RecordingService |
getRecordingService()
Gets the recording service of the controller. |
|
RequestService |
getRequestService()
Gets the service from the controller dealing with requests. |
|
ControllerBootInfo |
getSystemState()
Gets the state of the system. |
|
void |
initialize()
Initializes the controller. |
|
boolean |
isInitialized()
Returns whether the controller is initialized. |
|
protected void |
onDispose()
Called when this controller get's disposed. |
|
void |
onInitialize()
Called when the controller get's initialized. |
|
void |
onInitializeFailed()
Called when the controller initialization failed. |
|
protected void |
onServicesInitialized()
Called when all services of the controller are initialized. |
|
protected void |
onSetParameters(com.kuka.common.ParameterSet attributeMap)
Sets the attributes for this controller. |
|
void |
removeControllerListener(IControllerStateListener listener)
Removes a listener. |
|
void |
resetRecordingService()
Resets the recording service. |
|
void |
setParameters(com.kuka.common.ParameterSet parameters)
Sets the parameters for this controller. |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Controller(RoboticsAPIContext context,
String name)
Subclasses should provide the same constructor with the same parameters, because this constructor is called by the RoboticsAPI through reflection.
context - The context for this controller. null is not allowed.name - The name of the controller. null is not allowed.| Method Detail |
|---|
@Deprecated public double getProgramOverride()
IApplicationOverrideControl.getManualOverride() instead.
@Deprecated public void clipProgramOverride(double overrideClip)
IApplicationOverrideControl.clipManualOverride(double) instead.
overrideClip - Manual override will be clipped to this value [0:1].public final Iterable<com.kuka.common.ParameterSet> getInvalidDevices()
Invalid devices are only present if the controller handles failures during initialization and reports these failures in the GetDeviceListRequest. Furthermore, the controller should only accept invalid devices if contexts are created in a graceful way.
RoboticsAPIContext.usingGracefulInitialization()public final Collection<Device> getDevices()
protected final Map<String,Device> getDeviceMap()
public final <T extends Device> T getDevice(Class<T> deviceClass)
T - The type of the device.deviceClass - The device class.
public final Device getDevice(String name)
name - The name of the device.
IllegalArgumentException - if device with the specified name does not exists.public RequestService getRequestService()
Fails if the controller is not initialized.
public ExecutionService getExecutionService()
Fails if the controller is not initialized.
public ControllerInformation getControllerInformation()
Fails if the controller is not initialized.
public final String getName()
public ConditionService getConditionService()
public final RecordingService getRecordingService()
public void resetRecordingService()
public final com.kuka.common.ParameterSet getParameters()
public final RoboticsAPIContext getContext()
public final boolean isInitialized()
true if the controller is initialized.public final void initialize()
public final void deinitialize()
public final void dispose()
public final void setParameters(com.kuka.common.ParameterSet parameters)
parameters - The parameters defined for this controller.public void addControllerListener(IControllerStateListener listener)
listener - The listener that will be registered. null is not allowed.
The same listener instance can be registered only once.
IllegalArgumentException - if the specified lister is already registeredpublic void removeControllerListener(IControllerStateListener listener)
listener - The listener that will be unregistered. null is not allowed.protected void fireControllerShutdown()
protected void fireStatePortChanged(com.kuka.roboticsAPI.controllerModel.StatePortData data)
data - state port informationprotected void fireFieldBusDeviceConfigurationChangedEvent(DispatchedEventData dispatchedEvent)
dispatchedEvent - the new communication layer parameters.protected void fireFieldBusDeviceIdentificationEvent(DispatchedEventData dispatchedEvent)
dispatchedEvent - the new signal parameters.protected void callAsyncEvent(com.kuka.common.events.IEventCaller<IControllerStateListener> caller)
Asynchronously calls the IEventCaller#callFor(com.kuka.common.IEventListener) method for every
IControllerStateListener registered by this controller using event worker thread.
caller - the event caller.protected void callSyncEvent(com.kuka.common.events.IEventCaller<IControllerStateListener> caller)
Synchronously calls the IEventCaller#callFor(com.kuka.common.IEventListener) method for every
IControllerStateListener registered by this controller.
caller - the event caller.protected final boolean areServicesInitialized()
true if the services are initialized.protected abstract RequestService createRequestServiceInstance()
protected abstract ExecutionService createExecutionServiceInstance()
protected ConditionService createConditionServiceInstance()
protected RecordingService createRecordingServiceInstance()
protected ControllerInformation getControllerInformationInstance()
protected void onSetParameters(com.kuka.common.ParameterSet attributeMap)
attributeMap - The attributes defined for this controller.protected void afterDispose()
This method is the last method called during the disposal process.
protected void onDispose()
This method is the first method called during disposing of a controller. The concrete controller still has all initialized things available.
ControllerServices will get disposed automatically.
public void onInitializeFailed()
public void onInitialize()
The method is called before any other initialization of the controller occurred. The controller will return false for the isInitialized method and no service will be available.
protected void onServicesInitialized()
public boolean afterInitialize()
Note that this method instead of the onInitialize method is called after the controller was initialized. The isInitialized method will return true and each service should be available.
public ControllerBootInfo getSystemState()
public IControllerInitializeBehaviour getBehavior()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||