SimJava
v2.0

eduni.simjava
Class Sim_port

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

public class Sim_port
extends java.lang.Object

This class represents ports which are used to connect entities for event passing.

See Also:
Sim_system, Sim_entity

Constructor Summary
Sim_port(java.lang.String port_name)
          Constructor for standalone simulations.
Sim_port(java.lang.String port_name, java.lang.String image_name, int side, int pos)
          Constructor for use with the eduni.simanim package for animations.
 
Method Summary
 java.lang.String get_dest_ename()
          Get the name of the destination entity of this port.
 int get_dest()
          Get the unique id number of the destination entity of this port.
 java.lang.String get_pname()
          Get the name of this port.
 int get_src()
          Get the unique id number of the source entity of this port.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sim_port

public Sim_port(java.lang.String port_name)
Constructor for standalone simulations.
Parameters:
port_name - The name with which to identify this port

Sim_port

public Sim_port(java.lang.String port_name,
                java.lang.String image_name,
                int side,
                int pos)
Constructor for use with the eduni.simanim package for animations.
Parameters:
port_name - The name with which to identify this port
image_name - The name of the gif graphics file to use for this port's icon, (without the ".gif" extension)
side - Which side of the parent entity the port should be drawn on, one of Anim_port.LEFT, Anim_port.RIGHT, Anim_port.TOP, or Anim_port.BOTTOM
pos - How many pixels along that side the port should be drawn
Method Detail

get_dest_ename

public java.lang.String get_dest_ename()
Get the name of the destination entity of this port.
Returns:
The name of the entity

get_pname

public java.lang.String get_pname()
Get the name of this port.
Returns:
The name

get_dest

public int get_dest()
Get the unique id number of the destination entity of this port.
Returns:
The id number

get_src

public int get_src()
Get the unique id number of the source entity of this port.
Returns:
The id number

SimJava
v2.0

The University of Edinburgh, 2002