Module prototypes :: Class COUNTEDBUFFEREDSTRING
[show private | hide private]
[frames | no frames]

Type COUNTEDBUFFEREDSTRING

       object --+    
                |    
BaseProtogenClass --+
                    |
                   COUNTEDBUFFEREDSTRING


A string as used on Audiovox. There is a one byte header saying how long the string is, followed by the string in a fixed sized buffer
Method Summary
  __init__(self, *args, **kwargs)
A string value can be specified to this constructor, or in the value keyword arg.
  getvalue(self)
Returns the string we are
  packetsize(self)
Returns size in bytes that we occupy
  readfrombuffer(self, buf)
Get our value from the buffer
  writetobuffer(self, buf)
Scribble ourselves to the buf
    Inherited from BaseProtogenClass
  autologread(self, buf, logtitle)
  autologwrite(self, buf, logtitle)
  iscontainer(self)
Do we contain fields?
  packetspan(self)
Returns tuple of begining,end offsets from last packet we were read or written from.
  update(self, *args, **kwargs)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Method Details

__init__(self, *args, **kwargs)
(Constructor)

A string value can be specified to this constructor, or in the value keyword arg.
Keyword Parameters:
constant - (Optional) A constant value. All reads must have this value
pad - (Default=32 - space) When writing, what to pad the rest of the buffer with
default - (Optional) Our default value
raiseontruncate - (Default True) raise ValueLengthException if the supplied value is too large to fit within the buffer.
value - (Optional) Value
sizeinbytes - (Mandatory) Size of the buffer, including the count byte
Overrides:
__builtin__.object.__init__

getvalue(self)

Returns the string we are
Overrides:
prototypes.BaseProtogenClass.getvalue

packetsize(self)

Returns size in bytes that we occupy
Overrides:
prototypes.BaseProtogenClass.packetsize (inherited documentation)

readfrombuffer(self, buf)

Get our value from the buffer
Overrides:
prototypes.BaseProtogenClass.readfrombuffer (inherited documentation)

writetobuffer(self, buf)

Scribble ourselves to the buf
Overrides:
prototypes.BaseProtogenClass.writetobuffer (inherited documentation)

Generated by Epydoc 2.1 on Fri Aug 15 18:58:24 2008 http://epydoc.sf.net