A c implementation event delegation
I have three events, normal, high and low alarm three, each event corresponding to a handler, and handlers can be informed when the event occurs, update or doing other operating interface, and directly on the code with respect to OK