More generic generation of pupillator protocol events