|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.jku.fim.datalinksimulation.genericdevices.NetworkStation
public class NetworkStation
Title: OSI Simulation Framework
ANetworkStation
represents a system, which can run
different applications. Each of these have access to a single network
stack for performing communication.
Copyright: (c) 2004-05
Company: FIM@JKU, www.fim.uni-linz.ac.at
Field Summary | |
---|---|
protected Logger |
logger
|
protected NetworkStack |
networkStack
Internal network stack reference |
protected int |
PID
A PID counter so that a PID is unique. |
protected java.util.HashMap |
PIDApplicationMapping
Running application get a Process ID (pid). |
Constructor Summary | |
---|---|
NetworkStation(java.lang.Object stationID)
Constructor; Each network station in a system should have a unique ID |
Method Summary | |
---|---|
void |
bePlugged(Wire wire,
int portNr)
This method should only be called by Wires, which inform this WireConnector that they are connected. |
void |
beUnplugged(Wire wire,
int portNr)
This method should only be called by Wires, which inform this WireConnector that they are disconnected |
NetworkStack |
getNetworkStack()
|
int |
getNumberOfTotalPorts()
|
java.lang.Object |
getStationID()
|
void |
informAboutDataOnWire(Wire sender,
RawData data)
informAboutWireData |
void |
removeApplication(int applicationPID)
|
int |
runApplication(Application applicationObj)
Starts an application on this network station |
void |
setStationID(java.lang.Object stationID)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected NetworkStack networkStack
protected java.util.HashMap PIDApplicationMapping
protected int PID
protected Logger logger
Constructor Detail |
---|
public NetworkStation(java.lang.Object stationID)
stationID
- Unique station IDMethod Detail |
---|
public java.lang.Object getStationID()
public void setStationID(java.lang.Object stationID)
stationID
- The stationID to set.public int runApplication(Application applicationObj)
applicationObj
-
public void removeApplication(int applicationPID)
applicationPID
- public void informAboutDataOnWire(Wire sender, RawData data)
informAboutDataOnWire
in interface WireConnector
sender
- Wiredata
- RawDatapublic NetworkStack getNetworkStack()
public void bePlugged(Wire wire, int portNr) throws WiringException
WireConnector
bePlugged
in interface WireConnector
wire
- Connected wire
WiringException
- May be thrown to veto against this wiringpublic void beUnplugged(Wire wire, int portNr) throws WiringException
WireConnector
beUnplugged
in interface WireConnector
wire
- Disconnected wire
WiringException
- May be thrown on any error or vetopublic int getNumberOfTotalPorts()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |