GridSim
v3.1

eduni.simjava
Class Sim_port

Object
  extended byeduni.simjava.Sim_port

public class Sim_port
extends Object

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

Version:
1.0, 4 September 1996
Author:
Ross McNab
See Also:
Sim_system, Sim_entity

Constructor Summary
Sim_port(String port_name)
          Constructor for standalone simulations.
Sim_port(String port_name, String image_name, int side, int pos)
          Constructor for use with the eduni.simanim package for animations.
 
Method Summary
(package private)  void connect(Sim_entity dest)
           
(package private)  eduni.simanim.Anim_port get_aport()
           
 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.
 String get_pname()
          Get the name of this port.
 int get_src()
          Get the unique id number of the source entity of this port.
(package private)  void set_src(int s)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sim_port

public Sim_port(String port_name)
Constructor for standalone simulations.

Parameters:
port_name - The name with which to identify this port

Sim_port

public Sim_port(String port_name,
                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 String get_dest_ename()
Get the name of the destination entity of this port.

Returns:
The name of the entity

get_pname

public 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

get_aport

eduni.simanim.Anim_port get_aport()

set_src

void set_src(int s)

connect

void connect(Sim_entity dest)

GridSim
v3.1

The University of Melbourne, Australia, 2004