psimjava
Class Comm_timer

java.lang.Object
  extended by java.lang.Thread
      extended by psimjava.Pobject
          extended by psimjava.Sched
              extended by psimjava.Process
                  extended by psimjava.Comm_timer
All Implemented Interfaces:
java.lang.Runnable

public class Comm_timer
extends Process

PsimJ Java package for OO simulation Communication timer.

An instance of this process type is used by several processes to cause a timeout when communicating.

Object-oriented simulation, process interaction approach.

(C) J. M. Garrido. June 2000, 2003, 2004

Class for controlling Communication timer (used by most processes when communicating)

File: Comm_timer.java


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Comm_timer()
           
Comm_timer(Process proc_comm, double wait_p, Waitq channel, boolean send_rec)
          Constructor for the communication timer object
 
Method Summary
 void Main_body()
          Main body for a communication timer object does not need to be redefined in user model.
 void set_comm_timer(Process proc_comm, double wait_p, Waitq channel, boolean send_rec)
          This function sets the communication timer
 
Methods inherited from class psimjava.Process
clear_int_lev, clear_int, comm_wait, deactivate, delay, get_name, get_remain_t, idle, int_level, int_level, is_terminated, p_interrupt, reactivate, run, schedat, set_comm_flag, start, terminate
 
Methods inherited from class psimjava.Sched
get_clock, rdstate, rdtime, set_state
 
Methods inherited from class psimjava.Pobject
get_prio, set_prio
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Comm_timer

public Comm_timer(Process proc_comm,
                  double wait_p,
                  Waitq channel,
                  boolean send_rec)
Constructor for the communication timer object

Parameters:
proc_comm - process waiting to communicate
wait_p - period to wait for timeout
channel - xommunication channel
send_rec - flag with value true if proc_comm is sender, othewise false

Comm_timer

public Comm_timer()
Method Detail

set_comm_timer

public void set_comm_timer(Process proc_comm,
                           double wait_p,
                           Waitq channel,
                           boolean send_rec)
This function sets the communication timer

Parameters:
proc_comm - process waiting to communicate
wait_p - period to wait for timeout
channel - communication channel
send_rec - flag with value true if proc_comm is sender, othewise false

Main_body

public void Main_body()
Main body for a communication timer object does not need to be redefined in user model.

Specified by:
Main_body in class Process