Implement a simulator, in Java, for evaluating AntNet routing protocol
Implement a simulator, in Java, for evaluating AntNet routing protocol
Implement a simulator, in Java, for evaluating AntNet routing protocol
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
specific method depend<strong>in</strong>g on what k<strong>in</strong>d of event type it is.All CuRS objects have to react to the command class events. These events establish thebasic operations of the <strong>simulator</strong> and execute <strong>in</strong> the <strong>simulator</strong> eng<strong>in</strong>e. Event class eventsare def<strong>in</strong>ed globally <strong>in</strong> a central location. Send<strong>in</strong>g of a packet from a node to a l<strong>in</strong>k is k<strong>in</strong>dof event type event. Private class events are only def<strong>in</strong>ed <strong>in</strong>ternally with<strong>in</strong> an object, andthey are called with<strong>in</strong> that component. Record class events are used to record events <strong>in</strong> arecord file. Each class event has different types of events. For specific mean<strong>in</strong>g of eachtype of event, the reader can f<strong>in</strong>d them <strong>in</strong> the programmer or user's manual ofMaRS-Version 1.0.EventenqueueEvent()fire()dequeueEventBy...()CommandEventEventEventPrivateEventRecordEventfire()fire()fire()fire()CommandEventListenerreset()create()delete()start()stop()neighbor()uneighbor()makePeer()opname()EventEventListenerl<strong>in</strong>kSend()nodeReceive()nodeProduce()routeProcess<strong>in</strong>g()aptrReceive()aptrRetransmit()<strong>in</strong>stantRate()PrivateEventListenerl<strong>in</strong>kReceive()aptrProduce()aptrComsume()aptrSend()perfUpdate()utilUpdate()RecordEventListeneraptrConnOn()l<strong>in</strong>kFailure()l<strong>in</strong>kRepair()nodeFailure()nodeRepair()Figure 1: the relationship between Events and EventLsiteners