Bug #5583
open
Sensor Simulator controllable through Kepler
Added by Derik Barseghian over 12 years ago.
Updated about 12 years ago.
Description
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.
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...
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.
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.
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.
Changing to enhancement for making it easier (built in gui in kepler) to launch simulator.
This is less critical now that users are provided everything they need in the shippable version of kepler to launch the simulator.
Original Bugzilla ID was 5583
Also available in: Atom
PDF