All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class eduni.simjava.Sim_event

java.lang.Object
   |
   +----eduni.simjava.Sim_event

public class Sim_event
extends Object
implements Cloneable
This class represents events which are passed between the entities in the simulation.

See Also:
Sim_system

Constructor Index

 o Sim_event()
Contructor, create a blank event.

Method Index

 o clone()
Create an exact copy of this event.
 o event_time()
Get the simulation time that this event was scheduled.
 o from_port(Sim_port)
Determine if the event was sent from a given port.
 o get_data()
Get the data passed in this event.
 o get_dest()
Get the unique id number of the entity which recieved this event.
 o get_src()
Get the unique id number of the entity which scheduled this event.
 o get_tag()
Get the user-defined tag in this event.
 o scheduled_by()
Get the unique id number of the entity which scheduled this event.
 o set_dest(int)
Set the destination entity of this event.
 o set_src(int)
Set the source entity of this event.
 o type()
Get the user-defined tag in this event

Constructors

 o Sim_event
 public Sim_event()
Contructor, create a blank event. Usefull for fetching events using methods such as Sim_entity.sim_wait(ev).

Returns:
A blank instance of the class Sim_event

Methods

 o get_dest
 public int get_dest()
Get the unique id number of the entity which recieved this event.

Returns:
the id number
 o get_src
 public int get_src()
Get the unique id number of the entity which scheduled this event.

Returns:
the id number
 o event_time
 public double event_time()
Get the simulation time that this event was scheduled.

Returns:
The simulation time
 o type
 public int type()
Get the user-defined tag in this event

Returns:
The tag
 o scheduled_by
 public int scheduled_by()
Get the unique id number of the entity which scheduled this event.

Returns:
the id number
 o get_tag
 public int get_tag()
Get the user-defined tag in this event.

Returns:
The tag
 o get_data
 public Object get_data()
Get the data passed in this event.

Returns:
A reference to the data
 o from_port
 public boolean from_port(Sim_port p)
Determine if the event was sent from a given port.

Parameters:
p - The port to test
Returns:
true if the event was scheduled through the port
 o clone
 public Object clone()
Create an exact copy of this event.

Returns:
A reference to the copy
Overrides:
clone in class Object
 o set_src
 public void set_src(int s)
Set the source entity of this event.

Parameters:
s - The unique id number of the entity
 o set_dest
 public void set_dest(int d)
Set the destination entity of this event.

Parameters:
d - The unique id number of the entity

All Packages  Class Hierarchy  This Package  Previous  Next  Index