|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.robokind.api.motion.utils.RobotUtils
public class RobotUtils
Common Utility methods for the Motion API
Field Summary | |
---|---|
static long |
DEFAULT_BLENDER_INTERVAL
|
Constructor Summary | |
---|---|
RobotUtils()
|
Method Summary | |
---|---|
static Robot.RobotPositionMap |
getCurrentPositions(org.osgi.framework.BundleContext context,
Robot.Id robotId)
Returns a RobotPositionMap of the current positions for the Robot with the given Id. |
static Robot.RobotPositionMap |
getDefaultPositions(org.osgi.framework.BundleContext context,
Robot.Id robotId)
Returns a RobotPositionMap of the default positions for the Robot with the given Id. |
static Robot.RobotPositionMap |
getGoalPositions(org.osgi.framework.BundleContext context,
Robot.Id robotId)
Returns a RobotPositionMap of the goal positions for the Robot with the given Id. |
static Map<Robot.JointId,String> |
getJointNames(org.osgi.framework.BundleContext context,
Robot.Id robotId)
Returns a RobotPositionMap of the Joint names for the Robot with the given Id. |
static String |
getRobotFilter(Robot.Id robotId)
Returns an OSGi filter String for matching the given Robot.Id. |
static org.osgi.framework.ServiceReference |
getRobotReference(org.osgi.framework.BundleContext context,
Robot.Id robotId)
Finds ServiceReferences for a Robot with the given id. |
static boolean |
isRobotIdAvailable(org.osgi.framework.BundleContext context,
Robot.Id robotId)
Checks if the given robotId is available to use. |
static org.osgi.framework.ServiceRegistration |
registerFrameSource(org.osgi.framework.BundleContext context,
Robot.Id robotId,
FrameSource frameSource)
Registers a FrameSource using the given Robot.Id as a property. |
static org.osgi.framework.ServiceRegistration |
registerRobot(org.osgi.framework.BundleContext context,
Robot robot,
Properties props)
Adds a Robot to the OSGi ServiceRegistry with the robotId as a service property. |
static org.osgi.framework.ServiceRegistration[] |
startDefaultBlender(org.osgi.framework.BundleContext context,
Robot.Id robotId,
long blenderIntervalMsec)
Creates a DefaultBlender for the Robot with the given robotId. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long DEFAULT_BLENDER_INTERVAL
Constructor Detail |
---|
public RobotUtils()
Method Detail |
---|
public static Robot.RobotPositionMap getCurrentPositions(org.osgi.framework.BundleContext context, Robot.Id robotId)
context
- BundleContext used to locate the robotrobotId
- identifies the Robot to use
public static Robot.RobotPositionMap getGoalPositions(org.osgi.framework.BundleContext context, Robot.Id robotId)
context
- BundleContext used to locate the robotrobotId
- identifies the Robot to use
public static Robot.RobotPositionMap getDefaultPositions(org.osgi.framework.BundleContext context, Robot.Id robotId)
context
- BundleContext used to locate the robotrobotId
- identifies the Robot to use
public static Map<Robot.JointId,String> getJointNames(org.osgi.framework.BundleContext context, Robot.Id robotId)
context
- BundleContext used to locate the robotrobotId
- identifies the Robot to use
public static boolean isRobotIdAvailable(org.osgi.framework.BundleContext context, Robot.Id robotId)
context
- BundleContext to userobotId
- Robot.Id to check
public static org.osgi.framework.ServiceRegistration registerRobot(org.osgi.framework.BundleContext context, Robot robot, Properties props)
context
- BundleContext to userobot
- Robot to registerprops
- option service properties to add to the registration
public static org.osgi.framework.ServiceReference getRobotReference(org.osgi.framework.BundleContext context, Robot.Id robotId)
context
- BundleContext used to retrieve a ServiceReferencerobotId
- the id to filter by
NullPointerException
- if context or robotId are null
IllegalArgumentException
- if robotId is emptypublic static org.osgi.framework.ServiceRegistration[] startDefaultBlender(org.osgi.framework.BundleContext context, Robot.Id robotId, long blenderIntervalMsec)
context
- BundleContext to userobotId
- Robot.Id to useblenderIntervalMsec
- Blender timer interval
public static org.osgi.framework.ServiceRegistration registerFrameSource(org.osgi.framework.BundleContext context, Robot.Id robotId, FrameSource frameSource)
context
- BundleContext to userobotId
- Robot.Id to associate with the FrameSourceframeSource
- FrameSource to register
public static String getRobotFilter(Robot.Id robotId)
robotId
- the Robot.Id to match
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |