Trying to simulate a MANET

I need a code that simulates a mobile ad hoc netwrok among 20-30 computers and also the ability to pass message among those computers. I have tried to solve the problem by studying JAVA Documentation. But I am lost. So if some one could get me started (By giving me any sample code on this matter) then I would be highly obliged..
Thnak you.

Don't cross post.
http://forum.java.sun.com/thread.jspa?threadID=5168300

Similar Messages

  • I am trying to simulate sequential threads ...

    Hi ,
    I am trying to simulate a load testing scenario on our Java Connector Implementation ( JCA) through a test class.I would have loved to use a load testing tool like JMeter but unfortunately JMeter doesn't have built in JCA sampler.
    Basically I am trying to simulate multiple sessions and each session would be comprising multiple requests to the Application server . I want to simulate multiple requests belonging to a session as multiple threads that run sequentially one after another and uses a common connection object to simulate calls to the connector.
    All is ok. I know it will be a Thread within Thread kind of program... But the point where I am stuck is how do I ensure that all threads that are simulating requests to the app server(ie requests within a sibngle session) run sequntially ? I am seeing that all the threads are starting in parallel which I want to stop. Any code snippet will be highly useful.

    subhrajyoti wrote:
    If I am not wrong every requests(within a session) from the broswer to an application server is a separate thread . each of these these threads run sequentially .
    I want to simulate the same thing. So I need threads .Each request from (the same or different clients) will cause the creation of a new thread ON THE SERVER.
    I think this is where you are becoming confused, you have stated that multi-threading is occurring on the browser/client, it is not (necessarily) the case, the multi-threading is happening on the server.
    Also please spell-check your text before posting it.

  • I am trying to simulate the robot voice synthesizer sound that is produced by that electronic voice simulator after someone as had their voice box removed.   The vocal transformer insert in Logic Pro doesn't quite do it.   Suggestions?

    I am trying to simulate the robot voice synthesizer sound that is produced by that electronic voice simulator after someone as had their voice box removed.   The vocal transformer insert in Logic Pro doesn't quite do it.   Any Suggestions?

    Try one of the Audio Voice Effects like Alien / Cosmic / Robot… etc. to start with…
    Adjust the Settings in the Inspector to your liking…

  • Trying to simulate USB-6366 device (without success)

    I have read through the MAX and DAQmx tutorials regarding device simulation but I still can't find a way to effectively simulate the acquisition and generation of a signal using a NI-USB-6366 device. 
    I'm trying to capture a signal (given at the input of this VI) using DAQmx Write and then use DAQmx Read to read the captured signal from the internal memory of the card (which has a buffer of 32 MS). For this I created a task with DAQmx that I feed into the Write block.
    I know the approach is most likely wrong, but I just can't figure out how to do this in an easy way and the NI documentation is everything but straightforward. All I want is to
    a) test the capture of this signal by the device using 2 digital inputs and then read out what it has acquired from its internal buffer
    b) send this same signal to 2 digital outputs and capture this output signal again.
    Cheers
    Solved!
    Go to Solution.
    Attachments:
    usb6366 test.vi ‏20 KB

    Yes! the simulation is meant to allow you to write a program and test that it works theoretically even if you do not have the hardware physically available. It has no programmatic interface to influence what simulated data the read functions will return. And any write function has no noticable effect anywhere, working as a data sink into nirvana. It's still usefull as you can test software without getting all kinds of runtime errors about trying to access non existing hardware, but has its limitations of course. However a programmatic interface to manipulate what and how data is simulated, while it would be a very nice feature, is almost certainly to complicated not only to implement but also to use.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Trying to simulate OTA download

    Hi
    I try to run a MIDlet on JBuilder X developer from a OTA server.
    I configured the jar and jad in the server.
    1) I get this error:
    " ** Error installing suite (49): The suite is not authorized for javax.microedition.io.PushRegistry "
    2) when running another application with no registry the process doesn't fail but I don't get the download option like in the J2ME Wireless Toolkit.
    please help , thanks

    thanks for the info.
    still it doesn't simulate the download of the jad , as I run my project ( with JBuilder ) the application is already started , no option to download it.

  • Trying to simulate button click via ActionScript

    Hello,
    I've got code written to tell if a user is hitting his/her
    left or right arrow keys. I currently have a "next" button named
    realNext, and a "back" button named realBack. Both buttons have
    lots of code written in their on(release) functions. How can I
    utilize ActionScript to simulate a button click?
    Here's my code thus far:

    I have never had success **** this by calling the onRelease
    or onPress event functions. So to get around this I define other
    functions that do all of the work and then just use the onRelease
    and onPress event functions as callers.
    For example.
    button1.onRelease = myFunction;
    function myfunction():Void {
    // code goes here
    Now with this I can either press the button to ge thte code
    executed or I can "simulate" the button being pushed by just
    calling myFunction().
    Tim

  • Trying to 'simulate' an array of strings

    In pseudo-code what I would like to do is this:
    Array[x][3]
    Array[1][1] = "First"
    Array[1][2] = "Data1"
    Array[1][3] = true
    Array[2][1] = "Second"
    Array[2][2] = "Data2"
    Array[2][3] = false
    counter = 1
    while(counter < 3) {
    print Array[counter][1]
    counter++
    In Java-think I created a class of data, and wanted to create a series of elements (array) of this class. But, suprise, my code snippit below doesn't work....
    class DataSaved {
    String InputName;
    String InputValue;
    boolean IsHidden;
    public class test {
    public static void main(String [] args) {
    DataSaved dataum;
    int counter = 0;
    dataum = (DataSaved) DataSaved.firstElement();
    dataum.addElement("first","1data",true);
    dataum.addElement("second","2data",true);
    dataum.addElement("third","3data",true);
    dataum.addElement("xxxfirst","4data",true);
    dataum.addElement("fxxirst","5data",true);
    dataum.addElement("sixfirst","6data",true);
    dataum.addElement("7first","7data",true);
    dataum.addElement("8first","8data",true);
    dataum.addElement("9first","9data",true);
    // move to the top element
    datum.firstElement();
    while (counter < 6 ){
    System.out.println(dataum.nextElement());
    counter++;
    So....what am I not understanding, and how can I make this snippit work?

    Great, now your DataSaved class is correct.
    The next step is how to deal with arrays.
    Suppose you have an array of Strings. Here's how it looks like:
    String[] myArray;Before you can use it, you have to actually occupy the space it needs. (Arrays are objects in Java, so basically, but sloppily speaking, you have to instantiate an "array class"):
    myArray = new String[15];The length of the arrays in Java is constant. You have to tell the length during construction time, and you won't be able to change it later.
    Also, if you create an array as above, each of the elements will contain null (were it an array of primitive types, it would contain the appropriate version of zero for that primitive type). Therefore, you have to load the elements one by one:
    myArray[0] = new String("first string");
    myArray[1] = new String("second string");
    myArray[14] = new String("last string");As you see, indexing starts with zero. I also have to note, that "new String(...)" is an unnecessary and in most cases poor programming technic, the string constants would do in this case (but not if the array is not an array of strings but array of some kind of objects).
    Another note. It's usually a bad programming technic to reach the fields of another class. Sometimes we do, but only when we have good reason. It's better if you provide setXXX and getXXX methods, and let your fields to have private access:
    class DataSaved {
       // your current code appears here
       public void setInputName(String name) {
          InputName = name;
       public String getInputName() {
          return InputName;
    }Now, your cycle which retrieves the values should look something like this:
    for (int cntr=0;  cntr<myArray.length;  cntr++) {
       System.out.println(myArray[cntr].getInputName());
    }That myArray.length is an attribute of the arrays, which tells you the length of the array. Now, if you have to change the length later, you don't have to scrutinize your code, since the "magic number" appears in the code exactly once.
    You may read about the arrays and how they're handled in Java here:
    http://java.sun.com/docs/books/tutorial/java/data/arrays.html
    That ArrayList is another story; if you have succeeded with your array, come back and ask. "Preview": ArrayList is a way how to deal with arrays which might be expanded and shrunk as needed.
    You also might consider reading the tutorial about the collections (perhaps in a later time):
    http://java.sun.com/docs/books/tutorial/collections/index.html

  • Trying to access my 851w from outside my lan, but can access inside fine

    Hi,
    I purchased a 851w to use as my home router and to learn more about the cisco IOS. I have been spending some time studying for CCENT/CCNA and so far I have enjoyed learning as I go. However, I am having problems accessing this router from a remote location via ssh. I can access it just fine from my lan, but not outside it from another location. Currently, I am not using this router for internet access or anything else other than learning about the IOS, and it is connected to a basic dlink wireless router dir-615. I have port forwarding setup on the dlink that any traffic coming in on port 22 is directed to the 851w at 192.168.0.150. I also have the 851w connected with a crossover cable to a switch that is connected to the dlink router.
    Like I said, I can connect just fine from my lan, but can't connect from outside. I have tried a few different things but nothing works. I also use Teraterm to connect, but have tried Putty too. I also use ddns to access it, but I have also tried the wan ip address of the dlink with no luck.
    Could someone please take a look at my very basic running config and explain what I might need to do different?
    Thanks in advance.
    Sean

    Hi and thanks a bunch for your quick response.
    No, I can't ping anything other than my main router which I have setup as the gateway so why is that? For example,
    ip default-gateway 192.168.0.1
    Wouldn't it automatically send anything it doesn't know about to the 192.168.0.0/24 router?
    I have one of the switch ports, Fast Ethernet 0, connected to another switch connected to the dlink router. I have tried different ports but it didn't change anything. I don't have anything connected to the wan port of the 851w. I was trying to simulate remote access of a switch on an internal network. My next step would be to make the 851w my default router and then try to access it from the outside, but I wanted to succeed this way first.
    optimus#show ip int br
    Interface IP-Address OK? Method Status Protocol
    Dot11Radio0 unassigned YES unset administratively down down
    FastEthernet0 unassigned YES unset up up
    FastEthernet1 unassigned YES unset down down
    FastEthernet2 unassigned YES unset down down
    FastEthernet3 unassigned YES unset up down
    FastEthernet4 unassigned YES unset administratively down down
    Vlan1 192.168.0.150 YES manual up up
    Yes, my internal pc is on the 192.168.0.0/24 subnet.
    Best Regards,
    Sean

  • I have a fairly new 27" iMac running Mac OS10.6.7,  I'm trying to print to an Epson Stylus Pro 3800 via an in-house wireless network.  I have installed the latest Epson drivers.

    I have a fairly new iMac running OS 10.6.7.  Im trying to print to an Epson Stylus Pro 3800 via an in-house wireless internet.  I have installed the latest drivers.  It was working a couple of months ago.  My wife is on the same network using a MacBook Pro and the same OS and is having no problem.

    I have been using an Epson 3800 with my I Mac for four years and up untill I upgraded to OSX Lion the only problem I had was colour issues associated with some ICC profiles. After upgrading to Lion and downloading the latest OSX update (10th May) I could not print.
    One of the problms was that the print settings continuously defaulted to:
    Page Setup: Sheet Feeder
    Media Type: Ultra Premium Photo Paper Luster
    I would change the settings to what I wanted, I saved them selected Print. My printer promptly started changing from Matte ink (what I had set my print setting s for) to Photo Black.
    After trying all i could to correct this. I finally gave up and rang the Epson Helpline. After 3 telephone calls over a day and a half during which I was talked through the procedure you described, the problems were still not resolved.
    My contact on the Epson Helpline then tried to simulate the problem on his MAC. He discovered that he had the same problem the print settings would not save, albeit on a Epson 3880 driver. He then advised me that the problem was not with thw Epson Drivers it was a MAC/Apple problem.
    I then rang the Apple Helpline (at £1.35 a minute) described the problem and was eventually put through to a supervisor. Who asked me to send her a set of screen shots describing the problem, This I have done, I have received an acknowledgement of receipt and have been advised that I should get a response within two working days.
    I am waiting hopefully.
    I have tried to print both via CS5 and Aperture the problem is the same in both instances.

  • Interactive Prototype - How do you simulate light boxes with buttons? (CS4)

    I am in the process of mocking up an interactive prototype of the homepage of a web application.  On this homepage, there are various links(text with slices) and fields that when clicked on will trigger a dialog to appear over the top of the page similar to a "light box" effect seen on many other websites/applications.
    The workflow I am trying to simulate is as follows:
    User clicks the text link (state 1)
    Dialog appears on top of current page (state 2)
    User fills in necessary fields then clicks save button (state 2)
    Dialog disappears and returns user to base state (state 1)
    The base state of the page is in state 1.  I placed the images/content for the light box in state 2 and then added an onclick image swap behavior to have the link in state 1 trigger the light box (also a slice) to appear in state two.  That all worked fine until I added a save button symbol from the common library to the lightbox dialog in state 2.  When I did that, Fireworks automatically brought be back to state 1 and the button appears on both/all states no matter what I try to do.  Also, my attempts to add an onclick behavior to the save button to bring me back to state 1 haven't worked either.
    So my questions are:
    How do I get that button only to appear on state 2?
    The "hotspot" for that button or any slice/hotspot in any state appears active for all states but are only valid for when that certain dialog appears.  Is there a way to manipulate button/slice hotspots across states so they are only active in the correct states?
    How do I get the Save button to bring me back to the base state?
    Mocking up a lightbox type dialog seems like it would be a pretty common thing to do so I am hoping this is just a simple mistake I am making... any help would be greatly appreciated!
    Here are some images to help illustrate what I am trying to do: 
    Desired:
    Here is what Fireworks is doing:
    State 1 w/link behavior
    State 1 with button behavior (this appears on state 1 no matter where I add the button but I want it only to appear in state 2)
    State 2
    And here is the actual fireworks png proof of concept:

    Hi Linda,
    Thanks for the suggestion, however, that doesn't appear to be working.  I've uploaded the file that I am using as my proof of concept.  You can download it via the link below.  I changed the button so it's only a graphic with a slice over it but there are still two issues.  When the save button is clicked the state does not change back to state 1.  The second problem is that even in state 1, the active area for the save button slice in state 2 is still active even though the button is not there. Any thoughts?
    https://docs.google.com/leaf?id=0B0Fc5EuxtTzPMzY0NTA4ZGQtZjc1Yi00Njk3LThlOTUtYmFlZWQyNzQ5N GVj&sort=name&layout=list&num=50
    Thanks,
    Greg

  • Simulate quadrature encoder output without hardware

    I am brand new to Labview and have not had any training other than youtube and this fine forum. I am a mechanic trying to solve a problem using labview. I am posting this new question because I don’t have any hardware so I can’t use the examples I’ve seen others pointing to.
    I’m trying to simulate the output of a quadrature rotary encoder. Once I have done that I want to use Labview to program an instrument that reads that signal and makes mathematical calculations to it but I need the signal first. The encoder will attach to a shaft that will rotate clockwise and then counterclockwise at a rate of about 122 times a minute.  The total shaft rotation will be between 0 - 18 degrees. It is important to me to know the direction of the shaft. The quadrature encoder will send out 2 square waves with one wave behind the other. The way I’ve tried to do this is by using 2 Simulate Signal modules each sending out a square wave at 2 Hz. I’ve connected a single knob controller to the both frequency inputs of the signal modules to simulate the speed the shaft rotates back and forth. I’ve done the exact same thing to the amplitude input to simulate the degrees the shaft turns before changing directions. My problem is the changing directions. I can delay the phase, which is what I want to do, but I can’t do it in real time and I can’t do it in a single 180 degree step. What I would like is a switch to change the B channel from +90 to -90 when it is toggled. If I could then toggle the switch when the amplitude reaches 18 degrees or less I will have an encoder signal. Thanks for any help you can provide.
    steve
    Attachments:
    Rotory Encoder.vi ‏59 KB

    Steve,
    From what I understand, you want to make a 180 degree phase shift every N intervals?  I modified your code to do this.  Let me know if that gets at what you are doing.
    Cheers,
    Chris LS
    National Instruments
    Applications Engineer
    Visit ni.com/gettingstarted for step-by-step help in setting up your system.
    Attachments:
    Rotory EncoderEdit.vi ‏61 KB

  • Trying to create a rotating word cloud

    I'm trying to simulate one of the 3D word clouds you see popping up around the net these days. Here's an example (to the right in the header):
    http://tarasnovak.com/blog/2009/01/12/wordle-beautiful-and-compact-word-cloud-generator/
    What I've done so far is create all the words and then move them back and forth in z space so that I have something looking like a typical word cloud. What I can't figure out is how to get the words to orbit around a central point as well as have the words always facing towards the camera as the cloud itself rotates. I want to animate certain words rotating to the front of the cloud, but have had no luck figuring this out.
    Any help would be much appreciated.
    Thanks,
    Ray

    What I can't figure out is how to get the words to orbit around a central point
    Parent them to a Null object.
    as well as have the words always facing towards the camera as the cloud itself rotates.
    Layer --> Auto Orient --> Toward Camera
    Mylenium

  • Simulate Sales Order

    Hi,
    I am trying to simulate a sales order creation using the function 'BAPI_SALESORDER_CREATEFROMDAT2' with TESTRUN = 'X'.
    But i have a problem... i don't have a sales order number, because this is a simulation, but is that normal? How can i see the results of this simulation?
    Please help.
    Thanks
    BR

    So... this function in TestRun only provide me information regarding the Return table right????
    Also, if i use the BAPI_SALESORDER_SIMULATE, should i get any number or anything more??
    My problem is that i need to simulate the VA01 transaction in a Z** transaction more easily to the users to use. So For example if you are creating a sales order by VA01 you can go to document flow, conditions tab, etc, before save the order, i mean before you have a sales order number.
    How can i resolve this situation?
    Thanks
    BR

  • What component I should choose to simulate a stepper motor's winding?

    Dear all,
    I'm now trying to simulate a chopper type stepper motor driver. In order to learn from the basic, only one motor coil was place inside the chopper circuit.
    Now I choose a advanced inductor for the motor winding. I'm able to measure motor winding's parameter by a programable LZR meter and get following result:
    Winding-1

    Hi Jet,
    I used Multisim power pro version 10.1. Sorry I forget where I found this component, but I upload the property page of this inductor. Hope you can find something.
    Attachments:
    Inductor_Advanced.JPG ‏72 KB

  • How to simulate a cmos transmission gate (using nmos/pmos transistors)

    I am using Multisim student version 10.1.  I am trying to simulate/create a CMOS transmission gate (t-gate) using n- and p-channel mosfets.  Simply connecting the drains and sources together of the virtual or manufacture specific components does not work .

    Here is a link I found that may help:
    http://electron1.eng.kuniv.edu.kw/434/exp13%5CPass%20Transistor%20and%20transmission%20gate%20logic....
    Tien P.
    National Instruments

Maybe you are looking for