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

Classes

class  InvalidClassException
 
class  InvalidModuleException
 
class  InvalidPackageException
 
class  InvalidTypeStringException
 

Functions

def _add_to_cache (cache, lock, key, value)
 
def _get_class (typestring, subname, cache, lock)
 
def _get_from_cache (cache, lock, key)
 
def _get_msg_class (typestring)
 
def _get_srv_class (typestring)
 
def _load_class (modname, subname, classname)
 
def _splittype (typestring)
 
def get_message_class (typestring)
 
def get_message_instance (typestring)
 
def get_service_class (typestring)
 
def get_service_instance (typestring)
 
def get_service_request_instance (typestring)
 
def get_service_response_instance (typestring)
 

Variables

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

Function Documentation

◆ _add_to_cache()

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

Definition at line 212 of file ros_loader.py.

◆ _get_class()

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 140 of file ros_loader.py.

◆ _get_from_cache()

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 217 of file ros_loader.py.

◆ _get_msg_class()

def rosbridge_library.internal.ros_loader._get_msg_class (   typestring)
private
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 122 of file ros_loader.py.

◆ _get_srv_class()

def rosbridge_library.internal.ros_loader._get_srv_class (   typestring)
private
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 131 of file ros_loader.py.

◆ _load_class()

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 172 of file ros_loader.py.

◆ _splittype()

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 200 of file ros_loader.py.

◆ get_message_class()

def rosbridge_library.internal.ros_loader.get_message_class (   typestring)
Loads the message type specified.

Returns the loaded class, or throws exceptions on failure 

Definition at line 84 of file ros_loader.py.

◆ get_message_instance()

def rosbridge_library.internal.ros_loader.get_message_instance (   typestring)
If not loaded, loads the specified type.
Then returns an instance of it, or None. 

Definition at line 98 of file ros_loader.py.

◆ get_service_class()

def rosbridge_library.internal.ros_loader.get_service_class (   typestring)
Loads the service type specified.

Returns the loaded class, or None on failure 

Definition at line 91 of file ros_loader.py.

◆ get_service_instance()

def rosbridge_library.internal.ros_loader.get_service_instance (   typestring)
If not loaded, loads the specified type.
Then returns an instance of it, or None. 

Definition at line 105 of file ros_loader.py.

◆ get_service_request_instance()

def rosbridge_library.internal.ros_loader.get_service_request_instance (   typestring)

Definition at line 112 of file ros_loader.py.

◆ get_service_response_instance()

def rosbridge_library.internal.ros_loader.get_service_response_instance (   typestring)

Definition at line 117 of file ros_loader.py.

Variable Documentation

◆ _loaded_msgs

dictionary rosbridge_library.internal.ros_loader._loaded_msgs = {}
private

Definition at line 48 of file ros_loader.py.

◆ _loaded_srvs

dictionary rosbridge_library.internal.ros_loader._loaded_srvs = {}
private

Definition at line 49 of file ros_loader.py.

◆ _manifest_lock

rosbridge_library.internal.ros_loader._manifest_lock = Lock()
private

Definition at line 52 of file ros_loader.py.

◆ _msgs_lock

rosbridge_library.internal.ros_loader._msgs_lock = Lock()
private

Definition at line 50 of file ros_loader.py.

◆ _srvs_lock

rosbridge_library.internal.ros_loader._srvs_lock = Lock()
private

Definition at line 51 of file ros_loader.py.



rosbridge_library
Author(s): Jonathan Mace
autogenerated on Fri Oct 21 2022 02:45:18