Optimized framework for Event-driven sensor