def render(self, ctx=None):
'''
Render only the mutated field (or the first one if not in mutation)
:param ctx: rendering context in which the method was called
:rtype: `Bits`
:return: rendered value of the container
'''
if ctx is None:
ctx = RenderContext()
ctx.push(self)
self._initialize()
offset = self.offset if self.offset else 0
self._fields[self._field_idx].set_offset(offset)
rendered = self._fields[self._field_idx].render(ctx)
self.set_current_value(rendered)
ctx.pop()
return self._current_rendered
评论列表
文章目录