What is the function of pleopods in a crayfish?

In male crayfish (and other decapods), the first two pairs of pleopods are modified to serve in reproduction and are referred to as gonopods.

They usually have a complex of hooks, spines, and setae of various sizes and shapes. When the male molts, the tips of the gonopods are usually shed with the exoskeleton. Then the male attaches sperm packets (spermatophores) to the second abdominal segment of the female near her genital openings so they are in position for internal fertilization when she molts. Later, when she molts, the sperm are released and enter her seminal receptables to fertilize the eggs as they pass to the exterior by way of the oviducts when she lays them.

In females, the posterior four pairs of pleopods and the coxae of the pleopods in front of them function as brood plates when she is carrying her eggs. Their form varies between species. Usually, they are flattened, bladelike structures with setation on their posterior surfaces, and they may have a complex of hooks and spines on the terminal segment of the posterior pair. After mating and egg-laying, the female flexes her abdomen to move her eggs between her pleopods, which protects them until they are ready to hatch. The movements also aid in the exchange of water past the eggs for proper respiration.