Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## avrora.sim.util
Class MulticastProbe

    java.lang.Object
      avrora.sim.util.MulticastProbe

All Implemented Interfaces:
  Simulator.Probe

public class MulticastProbe
extends java.lang.Object
implements Simulator.Probe

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

See Also:
  `Simulator`

Constructor Summary
`MulticastProbe()`

Method Summary
`void` | `add(Simulator.Probe b)` The `add()` method allows another probe to be inserted into the multicast set.
`void` | `fireAfter(Instr i, int address, State state)` The `fireAfter()` method is called after the probed instruction executes.
`void` | `fireBefore(Instr i, int address, State state)` The `fireBefore()` method is called before the probed instruction executes.
`boolean` | `isEmpty()` The `isEmpty()` method tests whether the multicast set of this probe is empty.
`void` | `remove(Simulator.Probe b)` The `remove` method removes a probe from the multicast set.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MulticastProbe

    public MulticastProbe()

Method Detail

### add

    public void add(Simulator.Probe b)

  The `add()` method allows another probe to be inserted into the multicast set. It will be inserted at the end of the list of current probes and will therefore fire after any probes already in the multicast set.

  Parameters:
    `b` - the probe to insert

### remove

    public void remove(Simulator.Probe b)

  The `remove` method removes a probe from the multicast set. The order of the remaining probes is not changed. The comparison used is reference equality, not the `.equals()` method.

  Parameters:
    `b` - the probe to remove

### isEmpty

    public boolean isEmpty()

  The `isEmpty()` method tests whether the multicast set of this probe is empty.

  Returns:
    false otherwise

### fireBefore

    public void fireBefore(Instr i,
                           int address,
                           State state)

  The `fireBefore()` method is called before the probed instruction executes. In the implementation of the multicast probe, it simply calls the `fireBefore()` method on each of the probes in the multicast set in the order in which they were inserted.

  Specified by:
    `fireBefore` in interface `Simulator.Probe`
  Parameters:
    `i` - the instruction being probed
    `address` - the address at which this instruction resides
    `state` - the state of the simulation

### fireAfter

    public void fireAfter(Instr i,
                          int address,
                          State state)

  The `fireAfter()` method is called after the probed instruction executes. In the implementation of the multicast probe, it simply calls the `fireAfter()` method on each of the probes in the multicast set in the order in which they were inserted.

  Specified by:
    `fireAfter` in interface `Simulator.Probe`
  Parameters:
    `i` - the instruction being probed
    `address` - the address at which this instruction resides
    `state` - the state of the simulation

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD