def inv_resp(self, chain_serial, msg):
        """Parse inventory response.

        Args:
        ----
            chain_serial: Serial of the chain which received the message.
            msg: Message to parse.
        """
        self.debug_log("Received Inventory Response: %s for %s", "".join(HEX_FORMAT % b for b in msg), chain_serial)

        index = 1
        self.gen2_addr_arr[chain_serial] = {}
        while msg[index] != ord(OppRs232Intf.EOM_CMD):
            if (msg[index] & ord(OppRs232Intf.CARD_ID_TYPE_MASK)) == ord(OppRs232Intf.CARD_ID_GEN2_CARD):
                self.num_gen2_brd += 1
                self.gen2_addr_arr[chain_serial][msg[index]] = None
            else:
                self.log.warning("Invalid inventory response %s for %s.", msg[index], chain_serial)
            index += 1
        self.debug_log("Found %d Gen2 OPP boards on %s.", self.num_gen2_brd, chain_serial)