rover (version 1.2)
index
d:\cruisecontrol\game-client-system\game\scripts\rover.py

Rover driver

 
Modules
       
GUI
PhysicsManager
SystemHandler
unittest
__vehiclemanager

 
Classes
       
Device
unittest.TestCase(__builtin__.object)
TestDevice
window.Window
DeviceWindow

 
class Device
    This is a driver interfaces that handles lower level management of rover vehicle.
 
  Methods defined here:
__init__(self, instance)
getDriver(self)
getGUI(self)
getInterface(self)
Returns device interface
getOrientation(self)
getPosition(self)
getRotation(self)
getTh(self)
isStall(self)
motor(self, left, right)
move(self, translation, rotation)
setOrientation(self, w, x, y, z)
setPosition(self, x, y, z)
setVisible(self, b)

Data and other attributes defined here:
Driver = <class rover.Driver at 0x00DF7660>
The robot driver is a special case so we do not need to override the call pyrobot.robot.device.Device
device_type = 'robot'
entity = None
gui = None
instance = None
machine_group = 'vehicle'
x = 0
y = 0
z = 0

 
class DeviceWindow(window.Window)
    Handles login menu
 
  Methods defined here:
__init__(self)
callback(self, source, event, message)
clear(self)
setMotor(self, a, b)
setMove(self, a, b)
setPosition(self, x, y, z)
setRotation(self, x, y, z)
setTheta(self, th)

Methods inherited from window.Window:
callnext(self, message)
load_windows(self)
will load all the device windows setup
log(self, str, type=0, newline=True)
log_attempt(self, msg)
log_failure(self, with_progress=True, message='')
log_message(self, message='')
log_progress(self)
log_success(self, with_progress=True, message='')
place_window(self, name)
will register the window
save_windows(self)
will save the device window setup

 
class TestDevice(unittest.TestCase)
    
Method resolution order:
TestDevice
unittest.TestCase
__builtin__.object

Methods defined here:
setUp(self)
tearDown(self)
testGUIActivate(self)
Rover device and test GUI active and unactive
testGUIValues(self)
Rover device and test GUI active and unactive
testStall(self)
Rover and test is stall

Methods inherited from unittest.TestCase:
__call__(self, *args, **kwds)
__init__(self, methodName='runTest')
Create an instance of the class that will use the named test
method when executed. Raises a ValueError if the instance does
not have a method with the specified name.
__repr__(self)
__str__(self)
assertAlmostEqual = failUnlessAlmostEqual(self, first, second, places=7, msg=None)
Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
 
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
assertAlmostEquals = failUnlessAlmostEqual(self, first, second, places=7, msg=None)
Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
 
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
assertEqual = failUnlessEqual(self, first, second, msg=None)
Fail if the two objects are unequal as determined by the '=='
operator.
assertEquals = failUnlessEqual(self, first, second, msg=None)
Fail if the two objects are unequal as determined by the '=='
operator.
assertFalse = failIf(self, expr, msg=None)
Fail the test if the expression is true.
assertNotAlmostEqual = failIfAlmostEqual(self, first, second, places=7, msg=None)
Fail if the two objects are equal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
 
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
assertNotAlmostEquals = failIfAlmostEqual(self, first, second, places=7, msg=None)
Fail if the two objects are equal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
 
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
assertNotEqual = failIfEqual(self, first, second, msg=None)
Fail if the two objects are equal as determined by the '=='
operator.
assertNotEquals = failIfEqual(self, first, second, msg=None)
Fail if the two objects are equal as determined by the '=='
operator.
assertRaises = failUnlessRaises(self, excClass, callableObj, *args, **kwargs)
Fail unless an exception of class excClass is thrown
by callableObj when invoked with arguments args and keyword
arguments kwargs. If a different type of exception is
thrown, it will not be caught, and the test case will be
deemed to have suffered an error, exactly as for an
unexpected exception.
assertTrue = failUnless(self, expr, msg=None)
Fail the test unless the expression is true.
assert_ = failUnless(self, expr, msg=None)
Fail the test unless the expression is true.
countTestCases(self)
debug(self)
Run the test without collecting errors in a TestResult
defaultTestResult(self)
fail(self, msg=None)
Fail immediately, with the given message.
failIf(self, expr, msg=None)
Fail the test if the expression is true.
failIfAlmostEqual(self, first, second, places=7, msg=None)
Fail if the two objects are equal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
 
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
failIfEqual(self, first, second, msg=None)
Fail if the two objects are equal as determined by the '=='
operator.
failUnless(self, expr, msg=None)
Fail the test unless the expression is true.
failUnlessAlmostEqual(self, first, second, places=7, msg=None)
Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero.
 
Note that decimal places (from zero) are usually not the same
as significant digits (measured from the most signficant digit).
failUnlessEqual(self, first, second, msg=None)
Fail if the two objects are unequal as determined by the '=='
operator.
failUnlessRaises(self, excClass, callableObj, *args, **kwargs)
Fail unless an exception of class excClass is thrown
by callableObj when invoked with arguments args and keyword
arguments kwargs. If a different type of exception is
thrown, it will not be caught, and the test case will be
deemed to have suffered an error, exactly as for an
unexpected exception.
id(self)
run(self, result=None)
shortDescription(self)
Returns a one-line description of the test, or None if no
description has been provided.
 
The default implementation of this method returns the first line of
the specified test method's docstring.

Data descriptors inherited from unittest.TestCase:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from unittest.TestCase:
failureException = <type 'exceptions.AssertionError'>
Assertion failed.

 
Data
        __author__ = 'Kjartan A Jonsson'
__copyright__ = 'Copyright (c) 2007 aGameCompany'
__license__ = 'aGameCompany'
__version__ = '$Revision: 1.2 $'

 
Author
        Kjartan A Jonsson