avrora.sim.util
Class MulticastWatch

java.lang.Object
  extended byavrora.sim.util.TransactionalList
      extended byavrora.sim.util.MulticastWatch
All Implemented Interfaces:
Simulator.Watch

public class MulticastWatch
extends TransactionalList
implements Simulator.Watch

The MulticastProbe is a wrapper around multiple watches that allows them to act as a single watch. It is useful for composing multiple watches into one and is used internally in the simulator.

See Also:
Simulator

Nested Class Summary
 
Nested classes inherited from class avrora.sim.util.TransactionalList
TransactionalList.Link
 
Nested classes inherited from class avrora.sim.Simulator.Watch
Simulator.Watch.Empty
 
Field Summary
 
Fields inherited from class avrora.sim.util.TransactionalList
head, nesting, tail, transHead, transTail
 
Constructor Summary
MulticastWatch()
           
 
Method Summary
 void fireAfterRead(State state, int data_addr, byte val)
          The fireAfterRead() method is called after the probed address is read by the program.
 void fireAfterWrite(State state, int data_addr, byte val)
          The fireAfterWrite() method is called after the probed address is written by the program.
 void fireBeforeRead(State state, int data_addr)
          The fireBeforeRead() method is called before the probed address is read by the program.
 void fireBeforeWrite(State state, int data_addr, byte val)
          The fireBeforeWrite() method is called before the probed address is written by the program.
 
Methods inherited from class avrora.sim.util.TransactionalList
add, beginTransaction, endTransaction, isEmpty, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MulticastWatch

public MulticastWatch()
Method Detail

fireBeforeRead

public void fireBeforeRead(State state,
                           int data_addr)
The fireBeforeRead() method is called before the probed address is read by the program. In the implementation of the multicast probe, it simply calls the fireBeforeRead() method on each of the probes in the multicast set in the order in which they were inserted.

Specified by:
fireBeforeRead in interface Simulator.Watch
Parameters:
state - the state of the simulation
data_addr - the address of the data being referenced

fireAfterRead

public void fireAfterRead(State state,
                          int data_addr,
                          byte val)
The fireAfterRead() method is called after the probed address is read by the program. In the implementation of the multicast probe, it simply calls the fireAfterRead() method on each of the probes in the multicast set in the order in which they were inserted.

Specified by:
fireAfterRead in interface Simulator.Watch
Parameters:
state - the state of the simulation
val - the value of the memory location being read
data_addr - the address of the data being referenced

fireBeforeWrite

public void fireBeforeWrite(State state,
                            int data_addr,
                            byte val)
The fireBeforeWrite() method is called before the probed address is written by the program. In the implementation of the multicast probe, it simply calls the fireBeforeWrite() method on each of the probes in the multicast set in the order in which they were inserted.

Specified by:
fireBeforeWrite in interface Simulator.Watch
Parameters:
state - the state of the simulation
val - the value being written to the memory location
data_addr - the address of the data being referenced

fireAfterWrite

public void fireAfterWrite(State state,
                           int data_addr,
                           byte val)
The fireAfterWrite() method is called after the probed address is written by the program. In the implementation of the multicast probe, it simply calls the fireAfterWrite() method on each of the probes in the multicast set in the order in which they were inserted.

Specified by:
fireAfterWrite in interface Simulator.Watch
Parameters:
state - the state of the simulation
val - the value being written to the memory location
data_addr - the address of the data being referenced