Package pyfdt :: Module pyfdt :: Class FdtNode
[hide private]
[frames] | no frames]

Class FdtNode

source code

object --+
         |
        FdtNode

Node representation

Instance Methods [hide private]
 
__init__(self, name)
Init node with name
source code
 
get_name(self)
Get property name
source code
 
__check_name_duplicate(self, name)
Checks if name is not in a subnode
source code
 
add_subnode(self, node)
Add child, deprecated use append()
source code
 
add_raw_attribute(self, name, raw_value)
Construct a raw attribute and add to child
source code
 
set_parent_node(self, node)
Set parent node, None and FdtNode accepted
source code
 
get_parent_node(self)
Get parent node
source code
 
__str__(self)
String representation
source code
 
dts_represent(self, depth=0)
Get dts string representation
source code
 
dtb_represent(self, strings_store, pos=0, version=17)
Get blob representation Pass string storage as strings_store, pos for current node start and version as current dtb version
source code
 
json_represent(self, depth=0)
Get dts string representation
source code
 
__getitem__(self, index)
Get subnodes, returns either a Node, a Property or a Nop
source code
 
__setitem__(self, index, subnode)
Set node at index, replacing previous subnode, must not be a duplicate name
source code
 
__len__(self)
Get strings count
source code
 
__ne__(self, node)
Check node inequality i.e.
source code
 
__eq__(self, node)
Check node equality i.e.
source code
 
append(self, subnode)
Append subnode, same as add_subnode
source code
 
pop(self, index=-1)
Remove and returns subnode at index, default the last
source code
 
insert(self, index, subnode)
Insert subnode before index, must not be a duplicate name
source code
 
_find(self, name)
Find name in subnodes
source code
 
remove(self, name)
Remove subnode with the name Raises ValueError is not present
source code
 
index(self, name)
Returns position of subnode with the name Raises ValueError is not present
source code
 
merge(self, node)
Merge two nodes and subnodes Replace current properties with the given properties
source code
 
walk(self)
Walk into subnodes and yield paths and objects Returns set with (path string, node object)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Static Methods [hide private]
 
__validate_dt_name(name)
Checks the name validity
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name)
(Constructor)

source code 

Init node with name

Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

String representation

Overrides: object.__str__

__ne__(self, node)

source code 

Check node inequality i.e. is subnodes are the same, in either order and properties are the same (same values) The FdtNop is excluded from the check

__eq__(self, node)
(Equality operator)

source code 

Check node equality i.e. is subnodes are the same, in either order and properties are the same (same values) The FdtNop is excluded from the check