Lines Matching refs:group
413 # Determine number of bytes in this group.
711 self.group = Group(self, None, 0, 1, name)
713 self.group.length = int(attrs["size"]) * 4
714 self.group.align = int(attrs["align"]) if "align" in attrs else None
715 self.structs[attrs["name"]] = self.group
717 self.group.fields.append(Field(self, attrs))
741 self.group = None
743 self.group.fields[-1].values = self.values
757 for field in self.group.fields:
772 def emit_template_struct(self, name, group):
774 group.emit_template_struct("")
794 def emit_pack_function(self, name, group):
798 group.emit_pack_function()
803 assert((self.group.length % 4) == 0)
805 print('#define {} {}'.format (name + "_LENGTH", self.group.length))
806 if self.group.align != None:
807 print('#define {} {}'.format (name + "_ALIGN", self.group.align))
808 print('struct {}_packed {{ uint32_t opaque[{}]; }};'.format(name.lower(), self.group.length // 4))
810 def emit_unpack_function(self, name, group):
815 group.emit_unpack_function()
819 def emit_print_function(self, name, group):
823 group.emit_print_function()
830 self.emit_template_struct(self.struct, self.group)
833 self.emit_pack_function(self.struct, self.group)
834 self.emit_unpack_function(self.struct, self.group)
835 self.emit_print_function(self.struct, self.group)