bcds.phison.sim
Class PmTrfReader<V,E>

java.lang.Object
  extended by bcds.phison.sim.PmBase<V,E>
      extended by bcds.phison.sim.PmTrfReader<V,E>
All Implemented Interfaces:
ProcessingModule<V,E>, WithEnvParams

public class PmTrfReader<V,E>
extends PmBase<V,E>

The class PmTrfReader inserts events by reading a .trf file. The insertion of events is performed "piece-wise": at the beginning (at setup time) all the events that belong to the same clock (simulated time) are inserted, and an callback function is registered for the time of the first event that is not in this group. This scheme is repeated, so that the end result is that events are inserted groupped by clock.

The events inserted are: CONN_REQUEST, CONN_RELEASE, LINK_FAILURE and LINK_REPAIR. Any other event is ignored.

Author:
Juan Segovia S.

Constructor Summary
PmTrfReader()
           
 
Method Summary
 java.lang.Object[] getEnvParams()
          Returns the environment parameters of this class; the prefix is PmTrfReader..
 void setup(SimCore<V,E> sim)
          Saves the parameter sim, which can later be obtained by calling the sim() method.
 
Methods inherited from class bcds.phison.sim.PmBase
ctx, env, getEnviron, getId, getName, opt, run, shutdown, sim, stats
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PmTrfReader

public PmTrfReader()
Method Detail

setup

public void setup(SimCore<V,E> sim)
Description copied from class: PmBase
Saves the parameter sim, which can later be obtained by calling the sim() method. It also calls adaptTypes if the environment object is non-null (which should normally be).

Specified by:
setup in interface ProcessingModule<V,E>
Overrides:
setup in class PmBase<V,E>

getEnvParams

public java.lang.Object[] getEnvParams()
Returns the environment parameters of this class; the prefix is PmTrfReader..

Specified by:
getEnvParams in interface WithEnvParams
Overrides:
getEnvParams in class PmBase<V,E>