def _get_struct(self, name, parent, little_endian=False): cont = BinaryContainer(name or self.name, little_endian=little_endian) cont._parent = parent return cont
def _bin_container(self, little_endian=False): cont = BinaryContainer('foo', little_endian=little_endian) cont['three'] = BinaryField(3, 'three', to_bin('0b101')) cont['six'] = BinaryField(6, 'six', to_bin('0b101010')) cont['seven'] = BinaryField(7, 'seven', to_bin('0b0101010')) return cont