|
Bully Task (12.12.2005) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.jku.fim.datalinksimulation.genericdevices.HardwareComponent
at.jku.fim.datalinksimulation.layer1.wire.Wire
at.jku.fim.datalinksimulation.layer1.wire.StandardWire
public class StandardWire
Title: OSI Simulation Framework
This class implements a typical standard wire, connecting 2 devices. Not more than 2 WireConnectors can be connected. Data sent to the wire is forwarded to the other connector. If data is sent directly to the wire, the data is forwarded to both connected sides.Copyright: (c) 2004-05
Company: FIM@JKU, www.fim.uni-linz.ac.at
Field Summary | |
---|---|
protected java.util.ArrayList |
connectors
Registered WireConnector instances |
Fields inherited from class at.jku.fim.datalinksimulation.genericdevices.HardwareComponent |
---|
networkComponentId |
Constructor Summary | |
---|---|
StandardWire()
|
Method Summary | |
---|---|
void |
connect(WireConnector connector,
int portNr)
Connect wire to device |
void |
disconnect(WireConnector connector,
int portNr)
Disconnect wire from device |
void |
send(WireConnector sender,
RawData data)
Send data to the wire; the data should automatically be forwarded to the directly connected WireConnectors |
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 |
---|
protected java.util.ArrayList connectors
Constructor Detail |
---|
public StandardWire()
Method Detail |
---|
public void connect(WireConnector connector, int portNr) throws WiringException
Wire
connect
in class Wire
connector
- Device to connectportNr
- Connect wire to port [portNr] of device
WiringException
- Thrown on wiring failurepublic void disconnect(WireConnector connector, int portNr) throws WiringException
Wire
disconnect
in class Wire
connector
- Device to disconnectportNr
- The portNr where the cable is currently plugged
WiringException
- Thrown on wiring failurepublic void send(WireConnector sender, RawData data)
Wire
send
in class Wire
data
- The data to send
|
Bully Task (12.12.2005) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |