An OMNeT++ simulation framework for wireless sensor network