Classes | Functions | Variables
rosbridge_library::internal::ros_loader Namespace Reference

Classes

class  InvalidClassException
class  InvalidModuleException
class  InvalidPackageException
class  InvalidTypeStringException

Functions

def _add_to_cache
def _get_class
def _get_from_cache
def _get_msg_class
def _get_srv_class
def _load_class
def _splittype
def get_message_class
def get_message_instance
def get_service_class
def get_service_instance
def get_service_request_instance
def get_service_response_instance

Variables

dictionary _loaded_msgs = {}
dictionary _loaded_srvs = {}
tuple _msgs_lock = Lock()
tuple _srvs_lock = Lock()

Function Documentation

def rosbridge_library.internal.ros_loader._add_to_cache (   cache,
  lock,
  key,
  value 
) [private]

Definition at line 209 of file ros_loader.py.

def rosbridge_library.internal.ros_loader._get_class (   typestring,
  subname,
  cache,
  lock 
) [private]
If not loaded, loads the specified class then returns an instance
of it.

Loaded classes are cached in the provided cache dict

Throws various exceptions if loading the msg class fails 

Definition at line 138 of file ros_loader.py.

def rosbridge_library.internal.ros_loader._get_from_cache (   cache,
  lock,
  key 
) [private]
Returns the value for the specified key from the cache.
Locks the lock before doing anything. Returns None if key not in cache 

Definition at line 215 of file ros_loader.py.

If not loaded, loads the specified msg class then returns an instance
of it

Throws various exceptions if loading the msg class fails 

Definition at line 120 of file ros_loader.py.

If not loaded, loads the specified srv class then returns an instance
of it

Throws various exceptions if loading the srv class fails 

Definition at line 129 of file ros_loader.py.

def rosbridge_library.internal.ros_loader._load_class (   modname,
  subname,
  classname 
) [private]
Loads the manifest and imports the module that contains the specified
type.

Logic is similar to that of roslib.message.get_message_class, but we want
more expressive exceptions.

Returns the loaded module, or None on failure 

Definition at line 170 of file ros_loader.py.

def rosbridge_library.internal.ros_loader._splittype (   typestring) [private]
Split the string the / delimiter and strip out empty strings

Performs similar logic to roslib.names.package_resource_name but is a bit
more forgiving about excess slashes

Definition at line 197 of file ros_loader.py.

Loads the message type specified.

Returns the loaded class, or throws exceptions on failure 

Definition at line 82 of file ros_loader.py.

If not loaded, loads the specified type.
Then returns an instance of it, or None. 

Definition at line 96 of file ros_loader.py.

Loads the service type specified.

Returns the loaded class, or None on failure 

Definition at line 89 of file ros_loader.py.

If not loaded, loads the specified type.
Then returns an instance of it, or None. 

Definition at line 103 of file ros_loader.py.

Definition at line 110 of file ros_loader.py.

Definition at line 115 of file ros_loader.py.


Variable Documentation

Definition at line 47 of file ros_loader.py.

Definition at line 48 of file ros_loader.py.

Definition at line 49 of file ros_loader.py.

Definition at line 50 of file ros_loader.py.



rosbridge_library
Author(s): Jonathan Mace
autogenerated on Thu Jan 2 2014 11:53:35