Sensor Simulator controllable through Kepler
To start the sensor simulator you must currently use ant to compile some classes and start it. This means a user would have to download source to use the simulator.
I propose creating a SensorSimulator actor that invokes the SpanSim (sensor simulator). I've tried this locally, and can get the simulator to start up from within Kepler using this actor. Stopping isn't working, and parameters (the usual simulator cmd line params) and actor documentation would have to be done too, but this seems like it could be a fairly easy solution.
#1 Updated by Derik Barseghian about 10 years ago
With regard the sensor sim not stopping, even though the four threads on which join is called all join and no longer report alive, I still see four threads sticking around after the kepler Stop button is pressed, and I never see them reach the end of their run() methods, which I don't understand, since they're supposably joined and dead.
I originally thought the problem was caused by use of blocking sockets, readers, and writers. I refactored to use nio readers and writers and socketChannels (having solved a similar blocking issue with java threads elsewhere). However this didn't resolve the issue and four threads are still hanging around. Stepping through with the eclipse debugger will probably be informative...
#2 Updated by Derik Barseghian about 10 years ago
The 'master' threads were blocked on _serverSocketChannel.accept(); because I failed to explicitly turn off blocking: _serverSocketChannel.configureBlocking(false);. Now you can start and stop the sensor sim from within kepler. However import of a site layout isn't working yet after all my changes.
#3 Updated by Derik Barseghian about 10 years ago
Matt thinks this better as a dialog. I was taking the actor approach for want of time, and so it's very apparent when the simulator is running -- I think a menu dialog fails on this. Perhaps an "S" toolbar button that brings up a dialog would be best. Regardless, lowering 'importance' as we may not have time to include it in the first release.
#4 Updated by Derik Barseghian almost 10 years ago
I now include everything necessary in sensor-view/lib/jar/sensorview-utils-1.0.jar to be able to start the sensorsim right from the jar. So at least users don't need to checkout source and use ant to start it, they just need java, and to follow the instruction in the sensor-view documentation.