edu.cmu.emulator
Class SimpleUserClass

java.lang.Object
  extended by edu.cmu.emulator.SimpleUserClass
All Implemented Interfaces:
EmulatorUserClass

public abstract class SimpleUserClass
extends Object
implements EmulatorUserClass

Provides a simple method of implementing EmulatorUserClass. Most user code should extend this class.

This class provides convenient references to many essential emulator classes such as the signal environment, the world, the nodes, etc.


Field Summary
protected  DaemonCommunicator dComm
           
protected  Emulator emulator
           
protected  EmuNode[] emuNodes
           
protected  int numNodes
           
protected  SignalEnvironment sigEnv
           
protected  EmuWorld world
           
 
Constructor Summary
SimpleUserClass()
           
 
Method Summary
 void start(Emulator emulator, String[] args)
          This is the method that gets called by the classloader after loading the user defined classes.
abstract  void start(String[] args)
          User code must implement this method which will be the first method called after the class is loaded by the emulator.
 void updateChannelGroup()
          This is the method that update the Channel Group for multi-band channel simulation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

emulator

protected Emulator emulator

world

protected EmuWorld world

sigEnv

protected SignalEnvironment sigEnv

dComm

protected DaemonCommunicator dComm

emuNodes

protected EmuNode[] emuNodes

numNodes

protected int numNodes
Constructor Detail

SimpleUserClass

public SimpleUserClass()
Method Detail

start

public void start(Emulator emulator,
                  String[] args)
This is the method that gets called by the classloader after loading the user defined classes.

Specified by:
start in interface EmulatorUserClass
Parameters:
emulator - The Emulator object passed to the user class so that they have access to the internal data structures of the emulator.

updateChannelGroup

public void updateChannelGroup()
This is the method that update the Channel Group for multi-band channel simulation. It opens/closes the channel between emuNodes according to their groupID setup.


start

public abstract void start(String[] args)
User code must implement this method which will be the first method called after the class is loaded by the emulator.



Copyright © 2013. All Rights Reserved.