State machine architecture used to control and phase-lock optical cavities and optical beam paths.