Package topo :: Package misc :: Module playerrobot :: Class PlayerObject
[hide private]
[frames] | no frames]

Class PlayerObject

source code


A generic threadsafe wrapper for client and proxy objects from the playerc library.

PlayerObject wrappers are constructed automatically by PlayerRobot objects. Each PlayerObject instance wraps a playerc device proxy or client object, and publishes a thread-safe version of each of proxy's methods, that is synchronized with the PlayerRobot instance's run-loop thread, and that catches playerc error conditions and raises them as PlayerExceptions. The original playerc proxy object is available via the attribute .proxy. Specialized subclasses of PlayerObject can have additional interfaces for getting device state or setting commands specific to that device.

Developer note: the PlayerObject base class __init__ method automatically wraps each method on the proxy that (a) doesn't begin with '__' and (b) is not already in dir(self). This way, subclasses can override the wrapping process by defining their own wrappers before the base class __init__ method is called.

Instance Methods [hide private]
 
__init__(self, proxy, lock)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
process_queues(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, proxy, lock)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)