utilities.py
Go to the documentation of this file.
00001 '''
00002 Utility functions.
00003 
00004 '''
00005 import roslib; roslib.load_manifest('rocon_conductor')
00006 from concert_msgs.msg import *
00007 
00008 ##############################################################################
00009 # Utilities
00010 ##############################################################################
00011 
00012 def platform_id_to_string(platform_id):
00013     '''
00014       Platform info to string converter
00015       
00016       This should be in a shared location (alongside concert_msgs probably) rather than
00017       buried here in a user of the concert_msgs.PlatformInfo module.
00018     '''
00019     if platform_id == concert_msgs.msg.PlatformInfo.PLATFORM_LINUX:
00020         s = "linux"
00021     elif platform_id == concert_msgs.msg.PlatformInfo.PLATFORM_ANDROID:
00022         s = "android"
00023     elif platform_id == concert_msgs.msg.PlatformInfo.PLATFORM_WINDOZE:
00024         s = "windows"
00025     else:
00026         s = "unknown"
00027     return s
00028 
00029 def system_id_to_string(system_id):
00030     '''
00031       System info to string converter
00032       
00033       This should be in a shared location (alongside concert_msgs probably) rather than
00034       buried here in a user of the concert_msgs.PlatformInfo module.
00035     '''
00036     if system_id == concert_msgs.msg.PlatformInfo.SYSTEM_ROS:
00037         s = "ros"
00038     elif system_id == concert_msgs.msg.PlatformInfo.SYSTEM_OPROS:
00039         s = "opros"
00040     else:
00041         s = "unknown"
00042     return s
00043 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends


graveyard_rocon_conductor
Author(s): Daniel Stonier
autogenerated on Wed Jan 23 2013 13:42:04