Package EasyExtend :: Package langlets :: Package p4d :: Module bytelet :: Class Bytelet
[hide private]
[frames] | no frames]

Class Bytelet

 object --+    
          |    
p4dbase.P4D --+
              |
             Bytelet
Known Subclasses:

Bytelets are flexible data structures used for binary serialization.

Bytelets are based on BER encoded TLV data-structures. Length calculations are maintained using dataflow-bindings.

Bytelets will be supported on language level by means of the namespace :

   namespace: "http://fiber-space.de/byteletns"
   prefix: bl

Bytelet elements will be created like this :

   bl = bl:x:
       f: 1
       g: 0x89

The bl prefix acts like a constructor.

Nested Classes [hide private]
  ListType
Class used to represent lists of P4D objects.
Instance Methods [hide private]
 
__init__(self, tree, parent=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
flow_obj_init(self)
 
update(self, back_propagate=True)
 
__repr__(self)
repr(x)
 
clone(self)
 
_check_size(self, width, hx)
 
hex(self)
 
_lazy_child_access(self, i)
 
__len__(self)
 
__delitem__(self, name)
 
__setattr__(self, name, value)
x.__setattr__('name', value) <==> x.name = value
 
content(self)
 
text(self)
Returns textual content of this P4D node.

Inherited from p4dbase.P4D: CDATA, __getattr__, __iter__, __nonzero__, attribute, attributes, child, children, comment, first_child, get, namespace, next, object_data, p4dstr, search, xmlstr

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __str__

Class Methods [hide private]
 
from_p4dnode(cls, p4dnode)
Converts P4DNode object into Bytelet object.

Inherited from p4dbase.P4D: eval, from_html, from_xml

Class Variables [hide private]

Inherited from p4dbase.P4D: p4d_kwd, parser

Properties [hide private]
  _attrs
  _children
  _content
  _idx
  _initialized
  _name
  _parent
  _tree
  tag

Inherited from object: __class__

Method Details [hide private]

__init__(self, tree, parent=None)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • tree - A tree is a nested list of elements of the kind [TAG, ATTR, CHILDREN, TEXT]. TAG and TEXT are strings, ATTR is a dict and CHILDREN is a list of elements having the same tree structure.
  • parent - the parent P4D object.
Overrides: object.__init__
(inherited documentation)

from_p4dnode(cls, p4dnode)
Class Method

 

Converts P4DNode object into Bytelet object.

Overrides: p4dbase.P4D.from_p4dnode

update(self, back_propagate=True)

 
Overrides: p4dbase.P4D.update

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)

_lazy_child_access(self, i)

 
Overrides: p4dbase.P4D._lazy_child_access

__delitem__(self, name)
(Index deletion operator)

 
Overrides: p4dbase.P4D.__delitem__

__setattr__(self, name, value)

 

x.__setattr__('name', value) <==> x.name = value

Overrides: object.__setattr__
(inherited documentation)

content(self)

 
Overrides: p4dbase.P4D.content

text(self)

 

Returns textual content of this P4D node.

Overrides: p4dbase.P4D.text
(inherited documentation)