|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectLogicalProcess
Pong
public class Pong
This class is the java-version of the Ping.c from GTW. It's used for testing the sim kernel.
Field Summary | |
---|---|
(package private) int |
count
class member for keeping track of how many messages have been sent. |
(package private) java.lang.String |
dest
the application-specified name of the destination to which this LP will send messages to |
(package private) int |
timeIncrement
the time increment for messages sent by this LP; the message will be sent at currentTime+timeIncrement |
Fields inherited from class LogicalProcess |
---|
ALL_LPS, APPid, configData, currentTime, lastTime, LPid, myname, PEid, scheduler |
Constructor Summary | |
---|---|
Pong()
Constructs a new Pong instance. |
Method Summary | |
---|---|
void |
appFinalizeLP()
Terminates LP and displays simulation statistics. |
java.util.List<java.lang.String> |
appGetMonitorable()
Returns a List of Strings describing all application-specific monitorable parameters of this LP, each in the form "paramName, paramType". |
java.lang.String |
appGetState(java.lang.String name)
Method to get the value of a given application-level monitorable variable. |
java.util.List<java.lang.String> |
appGetSteerable()
Returns a List of Strings describing all application-specific steerable parameters of this LP, each in the form "paramName, paramType". |
boolean |
appInitializeLP()
Initiates the LP. |
void |
appRunLP(java.lang.Object content,
java.lang.String sender)
Handles events for Pong. |
LogicalProcess |
appSavingLPState()
Implements abstract method to save LP state |
void |
appSetConfigData(java.lang.String cdata)
Sets application-specific configuration data. |
void |
appSetLPState(LogicalProcess lp)
Implements abstract method to set the state of this LP to the state of a specified Pong |
java.lang.String |
appSetState(java.lang.String name,
java.lang.String val)
Method to set the value of a given application-level monitorable variable. |
java.lang.String |
appToString()
Implements abstract method for dispaly purpose only |
Methods inherited from class LogicalProcess |
---|
finalizeLP, getAPPid, getCurrentTime, getLID, getMonitorable, getName, getPID, getState, getSteerable, initializeLP, rollback, runLP, savingLPState, sendSimMessage, sendSimMessage, setAppID, setConfigData, setEndOfSimFlag, setLID, setLPState, setName, setPID, setScheduler, setState, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
int count
java.lang.String dest
int timeIncrement
Constructor Detail |
---|
public Pong()
Method Detail |
---|
public void appSetConfigData(java.lang.String cdata)
appSetConfigData
in class LogicalProcess
cdata
- String representing configuration data.public java.lang.String appToString()
appToString
in class LogicalProcess
public LogicalProcess appSavingLPState()
appSavingLPState
in class LogicalProcess
public void appSetLPState(LogicalProcess lp)
appSetLPState
in class LogicalProcess
lp
- LogicalProcess containing the state information; the application
program decides what state information need to be storedpublic boolean appInitializeLP()
appInitializeLP
in class LogicalProcess
public void appRunLP(java.lang.Object content, java.lang.String sender)
appRunLP
in class LogicalProcess
content
- an Object representing the content of the message to be sentsender
- String the application-assigned name of the sender of this messagepublic void appFinalizeLP()
appFinalizeLP
in class LogicalProcess
public java.lang.String appGetState(java.lang.String name)
appGetState
in class LogicalProcess
name
- The name of the variable to monitor
public java.lang.String appSetState(java.lang.String name, java.lang.String val)
appSetState
in class LogicalProcess
name
- The name of the variable to steerval
- The value to assign to the variable
public java.util.List<java.lang.String> appGetSteerable()
appGetSteerable
in class LogicalProcess
public java.util.List<java.lang.String> appGetMonitorable()
appGetMonitorable
in class LogicalProcess
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |