A simulation platform for wireless sensor networks