verinec.netsim.events
Class NetworkLayerPacketArrivedEventDown

java.lang.Object
  extended by desmoj.core.simulator.NamedObject
      extended by desmoj.core.simulator.ModelComponent
          extended by desmoj.core.simulator.Schedulable
              extended by desmoj.core.simulator.Event
                  extended by verinec.netsim.events.PacketArrivedEvent
                      extended by verinec.netsim.events.PacketArrivedEventDown
                          extended by verinec.netsim.events.NetworkLayerPacketArrivedEventDown

public class NetworkLayerPacketArrivedEventDown
extends PacketArrivedEventDown

Event for a packet that arrived from an upper layer down to a networklayer.

Version:
$Revision:835 $
Author:
Dominik Jungo

Field Summary
private  MACAddress dst
           
private  double firstScheduledAt
           
private  MACAddress src
           
private  double timeOutAt
           
private  int timesexecuted
           
 
Fields inherited from class verinec.netsim.events.PacketArrivedEvent
packet, receiver
 
Constructor Summary
NetworkLayerPacketArrivedEventDown(Model model, ModelComponent sender, ModelComponent receiver, Packet packet, ILogger logger, double firstScheduledAt, double timeOutAt)
          Constructs a new Event for a arriving packet.
NetworkLayerPacketArrivedEventDown(NetworkLayerPacketArrivedEventDown event)
          Constructs a new Event for a arriving packet.
 
Method Summary
 void eventRoutine(Entity arg0)
           
 MACAddress getDst()
          gets the destination of the Packet
 double getFirstScheduledAt()
          gets the time when the event when the packet was scheduled first
 MACAddress getSrc()
          gets the source of the Packet
 double getTimeOutAt()
          gets the timeout time
 int getTimesexecuted()
          gets the times that this event was scheduled and executed
 void incrTimesexecuted()
          increments the times that this event was scheduled and executed by 1
 void schedule(Entity arg0, SimTime arg1)
           
 void setDst(MACAddress address)
          sets the destination of the packet
 void setFirstScheduledAt(double d)
          sets when the packet was scheduled first
 void setSrc(MACAddress address)
          sets the souce of the packet
 void setTimeOutAt(double d)
          sets the timeout
 void setTimesexecuted(int i)
          sets the times that this event was scheduled and executed
 
Methods inherited from class verinec.netsim.events.PacketArrivedEvent
getLogger, getPacket, getReceiver, getSender
 
Methods inherited from class desmoj.core.simulator.Event
isExternal, scheduleAfter, scheduleBefore
 
Methods inherited from class desmoj.core.simulator.Schedulable
cancel, isCurrent, isScheduled, nextEntity, nextEvent, nextSchedulable, rename, reSchedule, scheduledAt
 
Methods inherited from class desmoj.core.simulator.ModelComponent
current, currentEntity, currentEvent, currentModel, currentSimProcess, currentTime, debugIsOn, debugOff, debugOn, epsilon, getModel, isExperimentCompatible, isModelCompatible, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOn
 
Methods inherited from class desmoj.core.simulator.NamedObject
getName, getQuotedName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

src

private MACAddress src

dst

private MACAddress dst

firstScheduledAt

private double firstScheduledAt

timeOutAt

private double timeOutAt

timesexecuted

private int timesexecuted
Constructor Detail

NetworkLayerPacketArrivedEventDown

public NetworkLayerPacketArrivedEventDown(Model model,
                                          ModelComponent sender,
                                          ModelComponent receiver,
                                          Packet packet,
                                          ILogger logger,
                                          double firstScheduledAt,
                                          double timeOutAt)
Constructs a new Event for a arriving packet.

Parameters:
model - a model
sender - the sender of the packet
receiver - receiver of the packet
packet - the packet
logger - the Logger of this Event that may be used later to log consequences of this event.
firstScheduledAt -
timeOutAt -

NetworkLayerPacketArrivedEventDown

public NetworkLayerPacketArrivedEventDown(NetworkLayerPacketArrivedEventDown event)
Constructs a new Event for a arriving packet.

Parameters:
event - a NetworkLayerPacketArrivedEventDown
Method Detail

getDst

public MACAddress getDst()
gets the destination of the Packet

Returns:
the destination of the Packet

getFirstScheduledAt

public double getFirstScheduledAt()
gets the time when the event when the packet was scheduled first

Returns:
the time when the event when the packet was scheduled first

getSrc

public MACAddress getSrc()
gets the source of the Packet

Returns:
the source of the Packet

getTimeOutAt

public double getTimeOutAt()
gets the timeout time

Returns:
the timeout time

setDst

public void setDst(MACAddress address)
sets the destination of the packet

Parameters:
address -

setFirstScheduledAt

public void setFirstScheduledAt(double d)
sets when the packet was scheduled first

Parameters:
d - a time value

setSrc

public void setSrc(MACAddress address)
sets the souce of the packet

Parameters:
address - the source of the packet

setTimeOutAt

public void setTimeOutAt(double d)
sets the timeout

Parameters:
d - a time value

getTimesexecuted

public int getTimesexecuted()
gets the times that this event was scheduled and executed

Returns:
the times that this event was scheduled and executed

setTimesexecuted

public void setTimesexecuted(int i)
sets the times that this event was scheduled and executed

Parameters:
i - how often this event was scheduled and executed

incrTimesexecuted

public void incrTimesexecuted()
increments the times that this event was scheduled and executed by 1


eventRoutine

public void eventRoutine(Entity arg0)
Overrides:
eventRoutine in class PacketArrivedEventDown
See Also:
Event.eventRoutine(desmoj.core.simulator.Entity)

schedule

public void schedule(Entity arg0,
                     SimTime arg1)
Overrides:
schedule in class Event
See Also:
Event.schedule(desmoj.core.simulator.Entity, desmoj.core.simulator.SimTime)

Copyright © 2005 Verinec, DIUF