def __init__(self, _io, _parent=None, _root=None, _mini_cfgs=None):
        self._io = _io
        self._parent = _parent
        self._root = _root if _root else self
        self._pkt_pos = self._io.pos()
        self.sync = self._root.SyncWord(self._io, self, self._root)
        self.framesize = self._io.read_u2be()
        self.idcode = self._io.read_u2be()
        self._mini_cfg = _mini_cfgs.mini_cfg[self.idcode]
        self.soc = self._io.read_u4be()
        self.fracsec = self._root.Fracsec(self._io, self, self._root,
                                          self._mini_cfg.time_base.time_base if self._mini_cfg else None)
        _on = self.sync.frame_type.value
        if _on == 0:
            if self._mini_cfg:
                self.data = Data(self._io, _mini_cfg=self._mini_cfg)
            else:
                self.data = self._io.read_bytes((self.framesize - 16))
        elif _on == 3:
            self._raw_data = self._io.read_bytes((self.framesize - 16))
            io = KaitaiStream(BytesIO(self._raw_data))
            self.data = Cfg2(io)
            _mini_cfgs.add_cfg(self.idcode, self.data)
        elif _on == 4:
            self._raw_data = self._io.read_bytes((self.framesize - 16))
            io = KaitaiStream(BytesIO(self._raw_data))
            self.data = Command(io)
        elif _on == 5:
            _mini_cfgs.add_cfg(self.raw_pkt)
            self._raw_data = self._io.read_bytes((self.framesize - 16))
            io = KaitaiStream(BytesIO(self._raw_data))
            self.data = Cfg3(io)
        elif _on == 2:
            self._raw_data = self._io.read_bytes((self.framesize - 16))
            io = KaitaiStream(BytesIO(self._raw_data))
            self.data = Cfg2(io)
        elif _on == 1:
            self._raw_data = self._io.read_bytes((self.framesize - 16))
            io = KaitaiStream(BytesIO(self._raw_data))
            self.data = Header(io)
        self.chk = self._io.read_u2be()