Gpsense: An Algorithmic Framework For Intelligent Sensing At Node Level In Wsn