rr
index
/nfs/cs-ccr-nfsdev/vol1/u1/dcobas/gnurabbit/python/rr.py

#   :vi:ts=4 sw=4 et

 
Modules
       
errno
os
re
struct
sys

 
Classes
       
__builtin__.object
Gennum
_ctypes.Array(_ctypes._CData)
c_long_Array_256
_ctypes.Structure(_ctypes._CData)
RR_Devsel
RR_Iocmd
_ctypes.Union(_ctypes._CData)
RR_U

 
class Gennum(__builtin__.object)
     Methods defined here:
__init__(self)
get a file descriptor for the Gennum device
bind(self, device)
bind the rawrabbit driver to a device
 
The device is specified with a syntax described in parse_addr
getdmasize(self)
return the size of the allocated DMA buffer (in bytes)
getplist(self)
get a list of pages for DMA access
 
The addresses returned, shifted by 12 bits, give the physical
addresses of the allocated pages
info(self)
get a string describing the interface the driver is bound to
 
The syntax of the string is
    vendor:device/dubvendor:subdevice@bus:devfn
iread(self, bar, offset, width)
do a read by means of the ioctl interface
 
bar = 0, 2, 4 (or c for DMA buffer access
offset = address within bar
width = data size (1, 2, 4 or 8 bytes)
irqena(self)
enable the interrupt line
irqwait(self)
wait for an interrupt
iwrite(self, bar, offset, width, datum)
do a write by means of the ioctl interface
 
bar = 0, 2, 4 (or c for DMA buffer access
offset = address within bar
width = data size (1, 2, 4 or 8 bytes)
datum = value to be written
parse_addr(self, addr)
take a string of the form
       vendor:device[/subvendor:subdevice][@bus:devfn]
and return a dictionary object with the corresponding values,
initialized to RR_DEVSEL_UNUSED when absent
read(self, bar, offset, width)
do a read by means of lseek+read
 
bar = 0, 2, 4 (or c for DMA buffer access
offset = address within bar
width = data size (1, 2, 4 or 8 bytes)
write(self, bar, offset, width, datum)
do a write by means of lseek+write
 
bar = 0, 2, 4 (or c for DMA buffer access
offset = address within bar
width = data size (1, 2, 4 or 8 bytes)
datum = value to be written

Data and other attributes defined here:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'Gennum' objects>
list of weak references to the object (if defined)
device = '/dev/rawrabbit'
rrlib = './rrlib.so'

 
Plist = class c_long_Array_256(_ctypes.Array)
    
Method resolution order:
c_long_Array_256
_ctypes.Array
_ctypes._CData
__builtin__.object

Data and other attributes defined here:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'c_long_Array_256' objects>
list of weak references to the object (if defined)

Methods inherited from _ctypes.Array:
__delitem__(...)
x.__delitem__(y) <==> del x[y]
__delslice__(...)
x.__delslice__(i, j) <==> del x[i:j]
 
Use of negative indices is not supported.
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
__len__(...)
x.__len__() <==> len(x)
__setitem__(...)
x.__setitem__(i, y) <==> x[i]=y
__setslice__(...)
x.__setslice__(i, j, y) <==> x[i:j]=y
 
Use  of negative indices is not supported.

Data and other attributes inherited from _ctypes.Array:
__new__ = <built-in method __new__ of _ctypes.ArrayType object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from _ctypes._CData:
__ctypes_from_outparam__(...)
__hash__(...)
x.__hash__() <==> hash(x)

 
class RR_Devsel(_ctypes.Structure)
    
Method resolution order:
RR_Devsel
_ctypes.Structure
_ctypes._CData
__builtin__.object

Data and other attributes defined here:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RR_Devsel' objects>
list of weak references to the object (if defined)
bus = <Field type=c_ushort, ofs=8, size=2>
Structure/Union member
devfn = <Field type=c_ushort, ofs=10, size=2>
Structure/Union member
device = <Field type=c_ushort, ofs=2, size=2>
Structure/Union member
subdevice = <Field type=c_ushort, ofs=6, size=2>
Structure/Union member
subvendor = <Field type=c_ushort, ofs=4, size=2>
Structure/Union member
vendor = <Field type=c_ushort, ofs=0, size=2>
Structure/Union member

Methods inherited from _ctypes.Structure:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Data and other attributes inherited from _ctypes.Structure:
__new__ = <built-in method __new__ of _ctypes.StructType object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from _ctypes._CData:
__ctypes_from_outparam__(...)
__hash__(...)
x.__hash__() <==> hash(x)

 
class RR_Iocmd(_ctypes.Structure)
    
Method resolution order:
RR_Iocmd
_ctypes.Structure
_ctypes._CData
__builtin__.object

Data and other attributes defined here:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RR_Iocmd' objects>
list of weak references to the object (if defined)
address = <Field type=c_ulong, ofs=0, size=4>
Structure/Union member
data = <Field type=RR_U, ofs=8, size=8>
Structure/Union member
data16 = <Field type=c_ushort, ofs=8, size=2>
Structure/Union member
data32 = <Field type=c_ulong, ofs=8, size=4>
Structure/Union member
data64 = <Field type=c_ulonglong, ofs=8, size=8>
Structure/Union member
data8 = <Field type=c_ubyte, ofs=8, size=1>
Structure/Union member
datasize = <Field type=c_ulong, ofs=4, size=4>
Structure/Union member

Methods inherited from _ctypes.Structure:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Data and other attributes inherited from _ctypes.Structure:
__new__ = <built-in method __new__ of _ctypes.StructType object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from _ctypes._CData:
__ctypes_from_outparam__(...)
__hash__(...)
x.__hash__() <==> hash(x)

 
class RR_U(_ctypes.Union)
    
Method resolution order:
RR_U
_ctypes.Union
_ctypes._CData
__builtin__.object

Data and other attributes defined here:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'RR_U' objects>
list of weak references to the object (if defined)
data16 = <Field type=c_ushort, ofs=0, size=2>
Structure/Union member
data32 = <Field type=c_ulong, ofs=0, size=4>
Structure/Union member
data64 = <Field type=c_ulonglong, ofs=0, size=8>
Structure/Union member
data8 = <Field type=c_ubyte, ofs=0, size=1>
Structure/Union member

Methods inherited from _ctypes.Union:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Data and other attributes inherited from _ctypes.Union:
__new__ = <built-in method __new__ of _ctypes.UnionType object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from _ctypes._CData:
__ctypes_from_outparam__(...)
__hash__(...)
x.__hash__() <==> hash(x)

 
Functions
       
addressof(...)
addressof(C instance) -> integer
Return the address of the C instance internal buffer
alignment(...)
alignment(C type) -> integer
alignment(C instance) -> integer
Return the alignment requirements of a C instance
byref(...)
byref(C instance) -> byref-object
Return a pointer lookalike to a C instance, only usable
as function argument
resize(...)
Resize the memory buffer of a ctypes instance
set_conversion_mode(...)
set_conversion_mode(encoding, errors) -> (previous-encoding, previous-errors)
 
Set the encoding and error handling ctypes uses when converting
between unicode and strings.  Returns the previous values.
sizeof(...)
sizeof(C type) -> integer
sizeof(C instance) -> integer
Return the size in bytes of a C instance

 
Data
        DEFAULT_MODE = 0
RR_BAR_0 = 0
RR_BAR_2 = 536870912
RR_BAR_4 = 1073741824
RR_BAR_BUF = 3221225472L
RR_DEFAULT_DEVICE = 4
RR_DEFAULT_VENDOR = 6713
RR_DEVSEL_UNUSED = 65535
RTLD_GLOBAL = 256
RTLD_LOCAL = 0
bar_map = {0: 0, 2: 536870912, 4: 1073741824, 12: 3221225472L}
cdll = <ctypes.LibraryLoader object>
fmt = {1: 'B', 2: 'H', 4: 'I', 8: 'L'}
memmove = <CFunctionType object>
memset = <CFunctionType object>
pydll = <ctypes.LibraryLoader object>
pythonapi = <PyDLL 'None', handle 15a658 at b7e9f6ac>