Event-based distributed measurement system for PQ monitoring applications