Bully Task (12.12.2005)

at.jku.fim.datalinksimulation.layer1.wire.damagedwire
Class BreakableWire

java.lang.Object
  extended by at.jku.fim.datalinksimulation.genericdevices.HardwareComponent
      extended by at.jku.fim.datalinksimulation.layer1.wire.Wire
          extended by at.jku.fim.datalinksimulation.layer1.wire.StandardWire
              extended by at.jku.fim.datalinksimulation.layer1.wire.damagedwire.BreakableWire

public class BreakableWire
extends StandardWire

A breakable wire: Works perfectly or doesn't pass on anything at all.

Copyright: (c) 2004

Company: FIM@JKU, www.fim.uni-linz.ac.at

Version:
$Id$
Author:
Michael Sonntag

Field Summary
protected  boolean broken
          If value is set to true, the wire is broken and blocks completely
protected  Logger logger
          Logger; otherwise it won't be shown in the log window
 
Fields inherited from class at.jku.fim.datalinksimulation.layer1.wire.StandardWire
connectors
 
Fields inherited from class at.jku.fim.datalinksimulation.genericdevices.HardwareComponent
networkComponentId
 
Constructor Summary
BreakableWire()
          Constructor
 
Method Summary
 boolean isBroken()
          Retrieve the wire state
 void send(WireConnector sender, RawData data)
          Send data to the wire; the data should automatically be forwarded to the directly connected WireConnectors
 void setBroken(boolean broken)
          Set the wire state
 
Methods inherited from class at.jku.fim.datalinksimulation.layer1.wire.StandardWire
connect, disconnect
 
Methods inherited from class at.jku.fim.datalinksimulation.layer1.wire.Wire
connect, disconnect
 
Methods inherited from class at.jku.fim.datalinksimulation.genericdevices.HardwareComponent
getNetworkComponentId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected Logger logger
Logger; otherwise it won't be shown in the log window


broken

protected boolean broken
If value is set to true, the wire is broken and blocks completely

Constructor Detail

BreakableWire

public BreakableWire()
Constructor

Method Detail

send

public void send(WireConnector sender,
                 RawData data)
Description copied from class: Wire
Send data to the wire; the data should automatically be forwarded to the directly connected WireConnectors

Overrides:
send in class StandardWire
data - The data to send

isBroken

public boolean isBroken()
Retrieve the wire state

Returns:
whether the wire is broken or not

setBroken

public void setBroken(boolean broken)
Set the wire state

Parameters:
broken - if true the wire is broken

Bully Task (12.12.2005)

Submit a bug

Copyright 2004, 2005 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.