verinec.netsim.loggers.events
Class ARPEvent

java.lang.Object
  extended by org.jdom.Content
      extended by org.jdom.Element
          extended by verinec.netsim.loggers.events.EventDetail
              extended by verinec.netsim.loggers.events.ARPEvent
All Implemented Interfaces:
Serializable, Cloneable, Parent

public class ARPEvent
extends EventDetail

A ARP Event

Version:
$Revision: 242 $
Author:
Dominik Jungo
See Also:
Serialized Form

Field Summary
private static String ARP_REPLY_ICON
           
private static String ARP_REQUEST_ICON
           
private  NwBinding ownerNWBinding
           
private static long serialVersionUID
           
 
Fields inherited from class verinec.netsim.loggers.events.EventDetail
dHeight, dWidth, dx, dy, endX, endY, label, ownerPCNode, startX, startY
 
Fields inherited from class org.jdom.Element
additionalNamespaces, name, namespace
 
Fields inherited from class org.jdom.Content
parent
 
Constructor Summary
ARPEvent()
          Creates a ARP Event
ARPEvent(String type, String sha, String spa, String tha, String tpa)
          creates a new ARP Event
 
Method Summary
 Event createSimEvent(Model model, ILogger logger)
          creates a schedulable Simulation event from a Logevent
 String getSha()
          gets the source layer 2 address
 String getSpa()
          gets the source layer 3 address
 String getTha()
          gets the destination layer 2 address
 String getTpa()
          gets the destination layer 3 address
 void initializeLabel(DrawPanel drawPanel)
          Initializes the label (the animated object)
 void setSha(String sha)
          sets the source layer 3 address
 void setSpa(String spa)
          sets the source layer 3 address
 void setTha(String tha)
          sets the destination layer 2 address
 void setTpa(String tpa)
          sets the destination layer 3 address
protected  void subanimate(int time, int substep, int myPhase, int totalPhase)
          animates a substep of the whole animation
 
Methods inherited from class verinec.netsim.loggers.events.EventDetail
animate, getType, initAnimation, isAnimationInitialized, setType, toString
 
Methods inherited from class org.jdom.Element
addContent, addContent, addContent, addContent, addContent, addNamespaceDeclaration, clone, cloneContent, getAdditionalNamespaces, getAttribute, getAttribute, getAttributes, getAttributeValue, getAttributeValue, getAttributeValue, getAttributeValue, getChild, getChild, getChildren, getChildren, getChildren, getChildText, getChildText, getChildTextNormalize, getChildTextNormalize, getChildTextTrim, getChildTextTrim, getContent, getContent, getContent, getContentSize, getDescendants, getDescendants, getName, getNamespace, getNamespace, getNamespacePrefix, getNamespaceURI, getQualifiedName, getText, getTextNormalize, getTextTrim, getValue, indexOf, isAncestor, isRootElement, removeAttribute, removeAttribute, removeAttribute, removeChild, removeChild, removeChildren, removeChildren, removeContent, removeContent, removeContent, removeContent, removeNamespaceDeclaration, setAttribute, setAttribute, setAttribute, setAttributes, setContent, setContent, setContent, setContent, setName, setNamespace, setText
 
Methods inherited from class org.jdom.Content
detach, equals, getDocument, getParent, getParentElement, hashCode, setParent
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jdom.Parent
getDocument, getParent
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

ownerNWBinding

private NwBinding ownerNWBinding

ARP_REQUEST_ICON

private static String ARP_REQUEST_ICON

ARP_REPLY_ICON

private static String ARP_REPLY_ICON
Constructor Detail

ARPEvent

public ARPEvent(String type,
                String sha,
                String spa,
                String tha,
                String tpa)
creates a new ARP Event

Parameters:
type - a Type
sha - the source layer 2 address
spa - the source layer 3 address
tha - the destination layer 2 address
tpa - the destination layer 3 address

ARPEvent

public ARPEvent()
Creates a ARP Event

Method Detail

getSha

public final String getSha()
gets the source layer 2 address

Returns:
the source layer 2 address

setSha

public final void setSha(String sha)
sets the source layer 3 address

Parameters:
sha - an address

getSpa

public final String getSpa()
gets the source layer 3 address

Returns:
the source layer 3 address

setSpa

public final void setSpa(String spa)
sets the source layer 3 address

Parameters:
spa - an address

getTha

public final String getTha()
gets the destination layer 2 address

Returns:
the destination layer 2 address

setTha

public final void setTha(String tha)
sets the destination layer 2 address

Parameters:
tha - an address

getTpa

public final String getTpa()
gets the destination layer 3 address

Returns:
the destination layer 3 address

setTpa

public final void setTpa(String tpa)
sets the destination layer 3 address

Parameters:
tpa - an address

createSimEvent

public Event createSimEvent(Model model,
                            ILogger logger)
Description copied from class: EventDetail
creates a schedulable Simulation event from a Logevent

Specified by:
createSimEvent in class EventDetail
Parameters:
model - a network model
logger - a log event
Returns:
a schedulable Simulation event
See Also:
EventDetail.createSimEvent(Model, ILogger)

initializeLabel

public void initializeLabel(DrawPanel drawPanel)
                     throws NetSimException
Description copied from class: EventDetail
Initializes the label (the animated object)

Specified by:
initializeLabel in class EventDetail
Parameters:
drawPanel - the panel containing the label
Throws:
NetSimException
See Also:
EventDetail.initializeLabel(verinec.gui.core.DrawPanel)

subanimate

protected void subanimate(int time,
                          int substep,
                          int myPhase,
                          int totalPhase)
Description copied from class: EventDetail
animates a substep of the whole animation

Specified by:
subanimate in class EventDetail
Parameters:
time - actual time
substep - the n'th substep that is animated
myPhase - the phase length that is animated in this substep
totalPhase - the complete phase length
See Also:
EventDetail.subanimate(int, int, int, int)

Copyright © 2005 Verinec, DIUF