com.kuka.roboticsAPI.controllerModel.sunrise.api
Class SSRFactory

java.lang.Object
  extended by com.kuka.roboticsAPI.controllerModel.sunrise.api.SSRFactory

public final class SSRFactory
extends Object

Helper class dealing with SSR creation.

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.

Field Summary
static String COMPOUND_REQUEST
          Compound request ID string.
static String REMOTE_PROCEDURE_CALL
          Remote Procedure Call name.
 
Method Summary
static SSR createBusCommandSSR(String deviceName, String busCommand, int jointIndex, int[] intDataIn, double[] doubleDataIn)
          Creates a generic bus command.
static SSR createCalculateExternalForceAndTorqueSSR(String deviceName, ITransformation measureTransformation, ITransformation orientationTransformation, ITransformation robRoot, LoadData... toolLoadData)
          Creates a SSR that calculates (not measured) the external forces and torques of the robot with the specified device name.
static SSR createCompoundRequest(long sprId, String instanceName, String requestType, Object... args)
          Creates an SSR to perform an asynchronous SPR compound request.
static SSR createGenericReadIOSSR(String ioGroupName, String ioName, com.kuka.roboticsAPI.ioModel.SunriseIOType ioType, boolean isOutput)
          Creates a SSR to perform a generic read IO.
static SSR createGenericWriteAnalogIOSSR(String ioGroupName, String ioName, double value)
          Creates a SSR to perform a generic write IO.
static SSR createGenericWriteDigitalIOSSR(String ioGroupName, String ioName, boolean value)
          Creates a SSR to perform a generic write IO.
static SSR createGenericWriteDigitalIOSSR(String ioGroupName, String ioName, int ioSize, boolean signed, long value)
          Creates a SSR to perform a generic write IO.
static SSR createGetBooleanDeviceObserverInformation(String device, String observerName, String dfeName)
          Creates a SSR to get a boolean information from the specified observer-dfe.
static SSR createGetCurrentBaseFlangeTransformationSSR(String robotName)
          Creates the SSR which returns the current base flange transformation of the given robot.
static SSR createGetCurrentForceSSR(String deviceName)
          Creates the SSR which returns the current force for the robot.
static SSR createGetDeviceListSSR()
          Creates the SSR which returns the device list.
static SSR createGetDeviceTagSSR(String deviceName, String tagName)
          Creates a SSR to request a device tag from Sunrise.
static SSR createGetExternalTorqueSSR(String deviceName)
          Creates the SSR which returns the current external torque for the robot.
static SSR createGetIODetailsSSR(boolean fullDetails)
          Creates a SSR to get the available IOs.
static SSR createGetIODetailsSSR(String ioGroupName, boolean fullDetails)
          Creates a SSR to get details about the IO group.
static SSR createGetIODetailsSSR(String busDriverName, String busInstanceName, boolean fullDetails)
          Creates SSR to get details about all IO's of a specific bus.
static SSR createGetIODetailsSSR(String ioGroupName, String ioName, boolean isOutput, boolean fullDetails)
          Creates a SSR to get details about the IO.
static SSR createGetIOGroupsSSR()
          Creates a SSR to get the available IO-groups.
static SSR createGetMeasuredTorqueSSR(String deviceName)
          Creates the SSR which returns the currently measured ("raw") torque for the robot.
static SSR createGetOverrideSSR(String robotName)
          Creates a SSR to get the override for a robot.
static SSR createGetSafetySignalsSSR(String deviceName)
          Creates a SSR to get the all safety signals of the sunrise controller.
static SSR createGetStatePorts()
          Creates a SSR to get a list of all state ports supplied by sunrise.
static SSR createGetStatePortState(String statePortID)
          Creates a SSR to get the state of the specified state port.
static SSR createGetSunriseState()
          Creates a SSR to get the state of the sunrise modules, pipes and observers.
static SSR createGetSystemStateSSR()
          Creates a SSR to get the state of the system manager modules.
static SSR createLoadCompound(SunriseCompoundType compoundType, String compoundInstanceName, String compoundObjName, SunriseCompoundMode compoundMode, String sprLayerName)
          Creates a SSR to load a compound instance.
static SSR createMachineDataRequest(String deviceName, String... args)
          Generic SSR to request machine data.
static SSR createNGPerfTimerSSR(String command)
          Creates a SSR to call some predefined function sets regarding NG/CF-Performance-Measurement.
static SSR createReloadCompound(String compoundInstanceName)
          Creates a SSR to reload a compound instance.
static SSR createResetTorqueGMSSSR(String deviceName, int drive, double torque)
          Reset Torque GSM.
static SSR createResetTorqueSSR(String deviceName, int drive, double torque)
          Reset Torque GSM.
static SSR createSafetyCommandSSR(int command)
          Creates the SSR that processes safety commands.
static SSR createSetESMStateSSR(int stateNumber)
          Creates a SSR to set the ESM state.
static SSR createSetOverrideSSR(String robotName, double override)
          Creates a SSR to set the override for a robot.
static SSR createSetSafetyWorkpieceSSR(List<Integer> loadDataProperties)
          Creates a SSR to pass load data for one workpiece to safety.
static SSR createSimulateSafetySignalSSR()
          Creates an SSR to set safety signals for simulation purposes.
static SSR createSystemModuleListSSR(SunriseCompoundType type)
          Creates a SSR to get a list of the specified sunrise compounds.
static SSR createUnloadCompound(String compoundInstanceName)
          Creates a SSR to unload a compound instance.
static SSR createUnmasterTorqueGMSSSR(String deviceName, int drive)
          Unmaster Torque GMS sensor.
static int getNumberOfLoadDataParams()
          Returns the number of needed loadData Parameters.
static SSR remoteProcedureCall(String functionName, ISerializableType... args)
          Creates a RemoteProcedureCall SSR with the given function name and the given arguments.
static SSR request(String functionName, ISerializableType... args)
          Creates a Request SSR with the given function name and the given arguments.
static SSR request(String functionName, Object... args)
          Convenience method to create an SSR without having to think about classes of type ISerializableType.
static SSR requestDeviceFunction(String deviceName, String deviceFunction)
          Requests a function for a device.
static SSR requestDFEData(String deviceName, String observerName, String... dataNames)
          Creates a device request SSR with the given device and name as parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPOUND_REQUEST

public static final String COMPOUND_REQUEST
Compound request ID string.

See Also:
Constant Field Values

REMOTE_PROCEDURE_CALL

public static final String REMOTE_PROCEDURE_CALL
Remote Procedure Call name.

See Also:
Constant Field Values
Method Detail

createGetDeviceTagSSR

public static SSR createGetDeviceTagSSR(String deviceName,
                                        String tagName)
Creates a SSR to request a device tag from Sunrise.

Parameters:
deviceName - The device name.
tagName - The tag name.
Returns:
The SSR.

createGetDeviceListSSR

public static SSR createGetDeviceListSSR()
Creates the SSR which returns the device list.

Returns:
The SSR.

createGetCurrentBaseFlangeTransformationSSR

public static SSR createGetCurrentBaseFlangeTransformationSSR(String robotName)
Creates the SSR which returns the current base flange transformation of the given robot.

Parameters:
robotName - The robot.
Returns:
The SSR.

createGetCurrentForceSSR

public static SSR createGetCurrentForceSSR(String deviceName)
Creates the SSR which returns the current force for the robot.

Parameters:
deviceName - The name of the device for which you request the data.
Returns:
The SSR.

createGetMeasuredTorqueSSR

public static SSR createGetMeasuredTorqueSSR(String deviceName)
Creates the SSR which returns the currently measured ("raw") torque for the robot.

Parameters:
deviceName - The name of the device for which you request the data.
Returns:
The SSR.

createGetExternalTorqueSSR

public static SSR createGetExternalTorqueSSR(String deviceName)
Creates the SSR which returns the current external torque for the robot.

Parameters:
deviceName - The name of the device for which you request the data.
Returns:
The SSR.

createGetSystemStateSSR

public static SSR createGetSystemStateSSR()
Creates a SSR to get the state of the system manager modules.

Returns:
the created SSR

createGetSunriseState

public static SSR createGetSunriseState()
Creates a SSR to get the state of the sunrise modules, pipes and observers.

Returns:
the created SSR

createGetStatePorts

public static SSR createGetStatePorts()
Creates a SSR to get a list of all state ports supplied by sunrise.

Returns:
the created SSR.

createGetStatePortState

public static SSR createGetStatePortState(String statePortID)
Creates a SSR to get the state of the specified state port.

Parameters:
statePortID - id of the state port.
Returns:
the created SSR.

createGetSafetySignalsSSR

public static SSR createGetSafetySignalsSSR(String deviceName)
Creates a SSR to get the all safety signals of the sunrise controller.

Parameters:
deviceName - the name of the device.
Returns:
the created SSR.

createSimulateSafetySignalSSR

public static SSR createSimulateSafetySignalSSR()
Creates an SSR to set safety signals for simulation purposes.

Returns:
the created SSR.

createSafetyCommandSSR

public static SSR createSafetyCommandSSR(int command)
Creates the SSR that processes safety commands.

Parameters:
command - the numeric safety command.
Returns:
the created SSR.

createLoadCompound

public static SSR createLoadCompound(SunriseCompoundType compoundType,
                                     String compoundInstanceName,
                                     String compoundObjName,
                                     SunriseCompoundMode compoundMode,
                                     String sprLayerName)
Creates a SSR to load a compound instance.

Parameters:
compoundType - Compound type / compound category of the Sunrise compound.
compoundInstanceName - Instance name of the compound, which should be created / loaded.
compoundObjName - Object file name (containing the binaries to load the compound)
compoundMode - Compound mode / task type (note: Currently, a Sunrise compound can be used either in kernel mode or in user mode).
sprLayerName - SPR layer name (note: Currently, this parameter is optional for the compound instantiation - use an empty string, if you don't want to specify the SPR layer name.)
Returns:
the created SSR.

createUnloadCompound

public static SSR createUnloadCompound(String compoundInstanceName)
Creates a SSR to unload a compound instance.

Parameters:
compoundInstanceName - Instance name of the compound, which should be unloaded.
Returns:
the created SSR.

createReloadCompound

public static SSR createReloadCompound(String compoundInstanceName)
Creates a SSR to reload a compound instance.

Parameters:
compoundInstanceName - Instance name of the compound, which should be reloaded.
Returns:
the created SSR.

remoteProcedureCall

public static SSR remoteProcedureCall(String functionName,
                                      ISerializableType... args)
Creates a RemoteProcedureCall SSR with the given function name and the given arguments.

Parameters:
functionName - The name of the RemoteProcedure.
args - The arguments for the procedure. If on argument is null, it is just omitted in the SSR.
Returns:
The corresponding SSR.

request

public static SSR request(String functionName,
                          Object... args)
Convenience method to create an SSR without having to think about classes of type ISerializableType.

Because this method uses reflection to determine the message parameter types (which must be of an ISerializableType), it is not recommended to use this method where performance is important.

Parameters:
functionName - The name of the request (the ID of the SSR).
args - The arguments for the procedure. If on argument is null, it is just omitted in the SSR.
Returns:
The corresponding SSR.

request

public static SSR request(String functionName,
                          ISerializableType... args)
Creates a Request SSR with the given function name and the given arguments.

Parameters:
functionName - The name of the request (the ID of the SSR).
args - The arguments for the procedure. If on argument is null, it is just omitted in the SSR.
Returns:
The corresponding SSR.

requestDFEData

public static SSR requestDFEData(String deviceName,
                                 String observerName,
                                 String... dataNames)
Creates a device request SSR with the given device and name as parameter.

The result message of the SSR will contain the DFE values in the order in which they were specified. Furthermore, an additional (double-valued) parameter is appended as last value of the result message. This parameter contains a system timestamp.

Parameters:
deviceName - The name of the device.
observerName - The name of the observer. Give an empty string for the default observer.
dataNames - The name of the requested DFE-datas. Their values will be returned in the given order.
Returns:
The corresponding SSR.

requestDeviceFunction

public static SSR requestDeviceFunction(String deviceName,
                                        String deviceFunction)
Requests a function for a device.

Parameters:
deviceName - The name of the device.
deviceFunction - The function which is requested.
Returns:
The corresponding SSR.

createBusCommandSSR

public static SSR createBusCommandSSR(String deviceName,
                                      String busCommand,
                                      int jointIndex,
                                      int[] intDataIn,
                                      double[] doubleDataIn)
Creates a generic bus command.

Parameters:
deviceName - The name of the device.
busCommand - The bus command id like ReadId or WriteId.
jointIndex - The joint index.
intDataIn - The integer in data.
doubleDataIn - The double in data.
Returns:
The created SSR.

createResetTorqueGMSSSR

public static SSR createResetTorqueGMSSSR(String deviceName,
                                          int drive,
                                          double torque)
Reset Torque GSM.

Parameters:
deviceName - The name of the device.
drive - is of the device's drive
torque - The desired Torque Value, used to compute the required offset value, which is then stored!
Returns:
The created SSR.

createUnmasterTorqueGMSSSR

public static SSR createUnmasterTorqueGMSSSR(String deviceName,
                                             int drive)
Unmaster Torque GMS sensor.

Parameters:
deviceName - The name of the device.
drive - is of the device's drive
Returns:
The created SSR.

createResetTorqueSSR

public static SSR createResetTorqueSSR(String deviceName,
                                       int drive,
                                       double torque)
Reset Torque GSM.

Parameters:
deviceName - The name of the device.
drive - is of the device's drive
torque - The current Torque Value, used to reset the Torque to Zero!
Returns:
The created SSR.

createSetOverrideSSR

public static SSR createSetOverrideSSR(String robotName,
                                       double override)
Creates a SSR to set the override for a robot.

Parameters:
robotName - The name of the robot.
override - The desired override.
Returns:
The created SSR.

createGetOverrideSSR

public static SSR createGetOverrideSSR(String robotName)
Creates a SSR to get the override for a robot.

Parameters:
robotName - The name of the robot.
Returns:
The created SSR.

createSystemModuleListSSR

public static SSR createSystemModuleListSSR(SunriseCompoundType type)
Creates a SSR to get a list of the specified sunrise compounds.

Parameters:
type - type of sunrise compounds that should be queried.
Returns:
The created SSR.

createCompoundRequest

public static SSR createCompoundRequest(long sprId,
                                        String instanceName,
                                        String requestType,
                                        Object... args)
Creates an SSR to perform an asynchronous SPR compound request.

Parameters:
sprId - id of the SPR to which the compound belongs.
instanceName - instance name of the compound for which the request should be sent.
requestType - type of the request.
args - other request parameters
Returns:
The created SSR.

createGenericWriteAnalogIOSSR

public static SSR createGenericWriteAnalogIOSSR(String ioGroupName,
                                                String ioName,
                                                double value)
Creates a SSR to perform a generic write IO.

Parameters:
ioGroupName - name of the IO-group
ioName - name of the IO to write
value - IO value (Double if Analog IO, BitSet if digital IO)
Returns:
the created SSR.

createGenericWriteDigitalIOSSR

public static SSR createGenericWriteDigitalIOSSR(String ioGroupName,
                                                 String ioName,
                                                 boolean value)
Creates a SSR to perform a generic write IO.

Parameters:
ioGroupName - name of the IO-group
ioName - name of the IO to write
value - IO value (Double if Analog IO, BitSet if digital IO)
Returns:
the created SSR.

createGenericWriteDigitalIOSSR

public static SSR createGenericWriteDigitalIOSSR(String ioGroupName,
                                                 String ioName,
                                                 int ioSize,
                                                 boolean signed,
                                                 long value)
Creates a SSR to perform a generic write IO.

Parameters:
ioGroupName - name of the IO-group
ioName - name of the IO to write
ioSize - size of the IOs
signed - value is signed
value - IO value (Double if Analog IO, BitSet if digital IO)
Returns:
the created SSR.

createGenericReadIOSSR

public static SSR createGenericReadIOSSR(String ioGroupName,
                                         String ioName,
                                         com.kuka.roboticsAPI.ioModel.SunriseIOType ioType,
                                         boolean isOutput)
Creates a SSR to perform a generic read IO.

Parameters:
ioGroupName - name of the IO-group
ioName - name of the IO to read
ioType - type of the IO to read
isOutput - IO is an Output
Returns:
the created SSR

createGetIOGroupsSSR

public static SSR createGetIOGroupsSSR()
Creates a SSR to get the available IO-groups.

Returns:
the created SSR.

createGetIODetailsSSR

public static SSR createGetIODetailsSSR(boolean fullDetails)
Creates a SSR to get the available IOs.

Parameters:
fullDetails - get full details or only short list of details
Returns:
the created SSR

createGetIODetailsSSR

public static SSR createGetIODetailsSSR(String ioGroupName,
                                        String ioName,
                                        boolean isOutput,
                                        boolean fullDetails)
Creates a SSR to get details about the IO.

Parameters:
ioGroupName - name of the IO-group
ioName - name of the IO
isOutput - IO is an output
fullDetails - get full details or only short list of details
Returns:
the created SSR

createGetIODetailsSSR

public static SSR createGetIODetailsSSR(String ioGroupName,
                                        boolean fullDetails)
Creates a SSR to get details about the IO group.

Parameters:
ioGroupName - name of the IO-group
fullDetails - get full details or only short list of details
Returns:
the created SSR

createGetIODetailsSSR

public static SSR createGetIODetailsSSR(String busDriverName,
                                        String busInstanceName,
                                        boolean fullDetails)
Creates SSR to get details about all IO's of a specific bus.

Parameters:
busDriverName - bus driver name
busInstanceName - bus instance name
fullDetails - get full details or only short list of details
Returns:
the created SSR

createGetBooleanDeviceObserverInformation

public static SSR createGetBooleanDeviceObserverInformation(String device,
                                                            String observerName,
                                                            String dfeName)
Creates a SSR to get a boolean information from the specified observer-dfe.

Parameters:
device - The device to be queried
observerName - The observer to be queried
dfeName - The DFE to be queried
Returns:
the created SSR

createCalculateExternalForceAndTorqueSSR

public static SSR createCalculateExternalForceAndTorqueSSR(String deviceName,
                                                           ITransformation measureTransformation,
                                                           ITransformation orientationTransformation,
                                                           ITransformation robRoot,
                                                           LoadData... toolLoadData)
Creates a SSR that calculates (not measured) the external forces and torques of the robot with the specified device name. The specified tool load datas must not be attached to the robot. The SSR calculates the external forces and torques that would affect the flange of the robot if the specified tool would be mounted. For this reason multiple tools can be calculated at the same time.

Parameters:
deviceName - name of the robot device.
measureTransformation - the transformation from flange to the measure point. If null, the flange is used as measurement point.
orientationTransformation - an optional rotation for the measurement results. If null, the flange orientation is used.
robRoot - the robot root transformation (with translations in [mm] and orientations [°]).
toolLoadData - the load data of the tools
Returns:
the created SSR

createMachineDataRequest

public static SSR createMachineDataRequest(String deviceName,
                                           String... args)
Generic SSR to request machine data.

Parameters:
deviceName - the device, where machine data is requested
args - A bunch of machine data ids to request
Returns:
The created SSR

createNGPerfTimerSSR

public static SSR createNGPerfTimerSSR(String command)
Creates a SSR to call some predefined function sets regarding NG/CF-Performance-Measurement.

Parameters:
command - a predefined command. Possible choices: Reset, Activate, Evaluate.
Returns:
the created SSR.

createSetESMStateSSR

public static SSR createSetESMStateSSR(int stateNumber)
Creates a SSR to set the ESM state.

Parameters:
stateNumber - The number of the ESM state.
Returns:
The created SSR.

createSetSafetyWorkpieceSSR

public static SSR createSetSafetyWorkpieceSSR(List<Integer> loadDataProperties)
Creates a SSR to pass load data for one workpiece to safety.

Parameters:
loadDataProperties - The workpiece load data properties
Returns:
The created SSR.

getNumberOfLoadDataParams

public static int getNumberOfLoadDataParams()
Returns the number of needed loadData Parameters.

Returns:
The number of needed loadData Parameters


Copyright © 2019. All rights reserved.