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

Module playerrobot

source code

High-level interface to the Player client libraries.

The Player client libraries allow Python code to communicate with hardware devices such as robots, cameras, and range sensors.

This is a temporary home for this file until it finds a permanent home (maybe in the PlayerStage project or in PLASTK?)

$Id: playerrobot.py 7232 2007-11-30 16:15:48Z jbednar $




Version: $Revision: 7232 $

Classes [hide private]
  PlayerException
  PlayerObject
A generic threadsafe wrapper for client and proxy objects from the playerc library.
  PlayerClient
Player object wrapper for playerc.client objects.
  PlayerDevice
Generic Player device object.
  PTZDevice
Player Pan/Tilt/Zoom (PTZ) device.
  CameraDevice
A Player camera device.
  PlayerRobot
Player Robot interface.
Functions [hide private]
 
player_fn(error_op=<built-in function ne>, error_val=0)
Player function decorator.
source code
 
synchronized(lock)
Simple synchronization decorator.
source code
 
synched_method(f)
Synchronized method decorator.
source code
Variables [hide private]
  device_table = {'camera': <class 'topo.misc.playerrobot.Camera...
Function Details [hide private]

player_fn(error_op=<built-in function ne>, error_val=0)

source code 

Player function decorator. Adds error checking.

Takes an operator and a value, and compares the result of the function call with the value using the operator. If the result is true, a PlayerException is raised. The default error condition is error_op = ne, error_value = 0, which raises an exception if fn(*args) != 0.

synchronized(lock)

source code 

Simple synchronization decorator.

Takes an existing lock and synchronizes a function or method on that lock. Code taken from the Python Wiki PythonDecoratorLibrary:

http://wiki.python.org/moin/PythonDecoratorLibrary

synched_method(f)

source code 

Synchronized method decorator.

Like synchronized() decorator, except synched_method assumes that the first argument of the function is an instance containing a Lock object, and this lock is used for synchronization.


Variables Details [hide private]

device_table

Value:
{'camera': <class 'topo.misc.playerrobot.CameraDevice'>,
 'ptz': <class 'topo.misc.playerrobot.PTZDevice'>}