|
||||||||||
| 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
Default milliseconds for a Blender interval |
| Constructor Summary | |
|---|---|
RobotUtils()
|
|
| Method Summary | |
|---|---|
static Map<Integer,Double> |
convertMap(Robot.RobotPositionMap posMap)
Converts a RobotPositionMap to a Map of Integers to Doubles. |
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 String |
getRobotFilter(Robot.Id robotId,
String serviceFilter)
Returns an OSGi filter String for matching the given Robot.Id. |
static RobotManager |
getRobotManager(org.osgi.framework.BundleContext context)
Returns a global RobotManager. |
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 void |
launchDefaultBlender(org.osgi.framework.BundleContext context,
Robot.Id robotId,
long blenderIntervalMsec)
|
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 empty
public 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 void launchDefaultBlender(org.osgi.framework.BundleContext context,
Robot.Id robotId,
long blenderIntervalMsec)
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
public static String getRobotFilter(Robot.Id robotId,
String serviceFilter)
robotId - Robot.Id to matchserviceFilter - addition filter to match
public static Map<Integer,Double> convertMap(Robot.RobotPositionMap posMap)
posMap - RobotPositionMap to convert
public static RobotManager getRobotManager(org.osgi.framework.BundleContext context)
context - BundleContext for OSGi
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||