An extended framework for WSN applications