-
Hi Razvan,
I'm not sure if this will solve your problems with TcpSocket, but you can manually upgrade the BCEL library to the latest version, currently 5.2, to support most Java generics.
Disclaimer: this version of BCEL doesn't completely support generics. For example, the Jist Rewriter fails when rewriting a class where a generic object is declared inside a method. However, there are...
2009-09-26 21:24:30 UTC in SWANS++
-
Here are instructions to set up your run configuration in Eclipse:
[http://aqualab.cs.northwestern.edu/projects/swans++/][1]
I suggest that you modify driver.ndp to first instantiate JistExperiment with the default parameters at the beginning of the main() method. A relatively small set of the parameters in JistExperiment are used by the lower levels of the simulator's network stack (i.e...
2009-09-22 15:40:30 UTC in SWANS++
-
Hi,
One way to do this is to toggle the state of the radio--whether it is able to receive messages.
The code for doing this through the visualizer is commented out in the driver/Visualizer.java class:
f.getProxy().toggleRadio(new Integer(id),true/false);
This should allow you to turn off/on the radio at a very low level.
One note on your suggested approach... The JistAPI.sleep(...
2009-09-21 18:57:51 UTC in SWANS++
-
Hi,
Please look at the following thread for details on getting your own Java application running in SWANS++:
[https://sourceforge.net/projects/straw/forums/forum/541449/topic/3401110][1]
Hope this helps,
John
[1]: https://sourceforge.net/projects/straw/forums/forum/541449/topic/3401110.
2009-09-21 18:47:17 UTC in SWANS++
-
Hi Alex,
One way to do this is to look at the Stats object for the routing protocol in use. For example, RouteGPSR has a class GPSRStats, which keeps track of simulation-wide number of packets sent, received, dropped, etc.
Hope this helps,
John.
2009-09-21 18:46:03 UTC in SWANS++
-
All messages passed around in the simulator implement the jist.swans.misc.Message interface. MessageBytes is just one example of a kind of message object that you could create. To store these pieces of information, create a new class that implements Message, and stores those fields. Then, be sure that getSize() returns the correct number of bytes for the message, as the number of bytes...
2009-09-21 18:26:45 UTC in SWANS++
-
Hi razvanica,
A common issue with recent StackOverflow errors is that your run configuration is using the driver file as the _main Java class_.
The main Java class should be jist.runtime.Main, and the first argument should be your driver class, followed by any other arguments. This will be sure that the simulator is running, intercepting function calls and treating them as events, instead...
2009-09-21 18:17:48 UTC in SWANS++
-
Since you're using a driver other than driver.GenericDriver, the JistExperiment simulation parameter class is not being initialized. This class has a number of variables that provide configuration parameters throughout the simulator. I suggest you either use driver.GenericDriver instead of driver.heartbeat, or instantiate JistExperiment with defaults or from an XML configuration file at the...
2009-09-21 18:11:39 UTC in SWANS++
-
Hi Andrea,
Yes, it is possible to easily adapt many standard Java applications for use in the simulator. I don't have extensive experience with working with threaded applications, but there may be a way to make this work, if necessary.
As far as adapting the application is concerned, it will be necessary to implement the same interfaces as jist.swans.app.AppHeartbeat: AppInterface and...
2009-09-21 18:07:26 UTC in SWANS++
-
Hi,
The problem is that JistExperiment is not being initialized. The vast majority of simulation parameters are located in a central configuration file (driver.JistExperiment.java). The randomWaypoint Random object is initialized when JistExperiment is first instantiated, so that explains that error. For the getJistExperiment() calls, it is returning null because no JistExperiment object has...
2009-09-21 17:37:46 UTC in SWANS++