using fiber Bragg gratings or gratings integrated in a waveguide