A deterministic real-time network simulator with cycle-accurate RTOS-like task scheduling for protocol evaluation