|
SimJava 2.0.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectSim_event
public class Sim_event
This class represents events which are passed between the entities in the simulation.
Sim_system
,
Sim_entity
Field Summary | |
---|---|
(package private) static int |
CREATE
|
(package private) static int |
ENULL
|
(package private) static int |
HOLD_DONE
|
(package private) static int |
SEND
|
Constructor Summary | |
---|---|
Sim_event()
Create a blank event. |
|
Sim_event(int evtype,
double time,
int src)
|
|
Sim_event(int evtype,
double time,
int src,
int dest,
int tag,
Object edata)
|
Method Summary | |
---|---|
Object |
clone()
Create an exact copy of this event. |
int |
compareTo(Object obj)
|
(package private) void |
copy(Sim_event ev)
|
double |
end_waiting_time()
Get the simulation time that this event was removed from the queue for service. |
double |
event_time()
Get the simulation time that this event was scheduled. |
boolean |
from_port(Sim_port p)
Determine if the event was sent from a given port. |
Object |
get_data()
Get the data passed in this event. |
int |
get_dest()
Get the unique id number of the entity which received this event. |
int |
get_src()
Get the unique id number of the entity which scheduled this event. |
int |
get_tag()
Get the user-defined tag of this event. |
(package private) int |
get_type()
|
int |
scheduled_by()
Get the unique id number of the entity which scheduled this event. |
void |
set_dest(int d)
Set the destination entity of this event. |
(package private) void |
set_end_waiting_time(double end_waiting_time)
|
void |
set_src(int s)
Set the source entity of this event. |
(package private) void |
setSerial(long serial)
|
int |
type()
Get the user-defined tag of this event |
Methods inherited from class Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final int ENULL
static final int SEND
static final int HOLD_DONE
static final int CREATE
Constructor Detail |
---|
public Sim_event()
sim_wai()
methods of entities.
Sim_event(int evtype, double time, int src, int dest, int tag, Object edata)
Sim_event(int evtype, double time, int src)
Method Detail |
---|
public int compareTo(Object obj)
compareTo
in interface Comparable
void setSerial(long serial)
public int get_dest()
public int get_src()
public double event_time()
public double end_waiting_time()
public int type()
public int scheduled_by()
public int get_tag()
public Object get_data()
public boolean from_port(Sim_port p)
p
- The port to test
true
if the event was scheduled through the portpublic Object clone()
clone
in class Object
public void set_src(int s)
s
- The unique id number of the entitypublic void set_dest(int d)
d
- The unique id number of the entityvoid set_end_waiting_time(double end_waiting_time)
int get_type()
void copy(Sim_event ev)
|
SimJava 2.0.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |