Added code to send data to simulator.