avrora.sim.util
Class MulticastInterruptProbe

java.lang.Object
  extended byavrora.sim.util.TransactionalList
      extended byavrora.sim.util.MulticastInterruptProbe
All Implemented Interfaces:
Simulator.InterruptProbe

public class MulticastInterruptProbe
extends TransactionalList
implements Simulator.InterruptProbe

The MulticastInterruptProbe 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

Nested Class Summary
 
Nested classes inherited from class avrora.sim.util.TransactionalList
TransactionalList.Link
 
Nested classes inherited from class avrora.sim.Simulator.InterruptProbe
Simulator.InterruptProbe.Empty
 
Field Summary
 
Fields inherited from class avrora.sim.util.TransactionalList
head, nesting, tail, transHead, transTail
 
Constructor Summary
MulticastInterruptProbe()
           
 
Method Summary
 void fireAfterInvoke(State s, int inum)
          The fireAfterInvoke() method of an interrupt probe will be called by the simulator after control is transferred to this interrupt handler, i.e. after the current PC is pushed onto the stack, interrupts are disabled, and the current PC is set to the start of the interrupt handler.
 void fireBeforeInvoke(State s, int inum)
          The fireBeforeInvoke() method of an interrupt probe will be called by the simulator before control is transferred to this interrupt, before the microcontroller has been woken from its current sleep mode.
 void fireWhenDisabled(State s, int inum)
          The fireWhenDisabled() method of an interrupt probe will be called by the simulator when the interrupt is masked out (disabled) by the program.
 void fireWhenEnabled(State s, int inum)
          The fireWhenEnabled() method of an interrupt probe will be called by the simulator when the interrupt is unmasked (enabled) by the program.
 void fireWhenPosted(State s, int inum)
          The fireWhenPosted() method of an interrupt probe will be called by the simulator when the interrupt is posted.
 void fireWhenUnposted(State s, int inum)
          The fireWhenUnposted() method of an interrupt probe will be called by the simulator when the interrupt is unposted.
 
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

MulticastInterruptProbe

public MulticastInterruptProbe()
Method Detail

fireBeforeInvoke

public void fireBeforeInvoke(State s,
                             int inum)
The fireBeforeInvoke() method of an interrupt probe will be called by the simulator before control is transferred to this interrupt, before the microcontroller has been woken from its current sleep mode. In this implementation, the method broadcasts the call to all of the other probes.

Specified by:
fireBeforeInvoke in interface Simulator.InterruptProbe
Parameters:
s - the state of the simulator
inum - the number of the interrupt being entered

fireAfterInvoke

public void fireAfterInvoke(State s,
                            int inum)
The fireAfterInvoke() method of an interrupt probe will be called by the simulator after control is transferred to this interrupt handler, i.e. after the current PC is pushed onto the stack, interrupts are disabled, and the current PC is set to the start of the interrupt handler. In this implementation, the method broadcasts the call to all of the other probes.

Specified by:
fireAfterInvoke in interface Simulator.InterruptProbe
Parameters:
s - the state of the simulator
inum - the number of the interrupt being entered

fireWhenDisabled

public void fireWhenDisabled(State s,
                             int inum)
The fireWhenDisabled() method of an interrupt probe will be called by the simulator when the interrupt is masked out (disabled) by the program. In this implementation, the method broadcasts the call to all of the other probes.

Specified by:
fireWhenDisabled in interface Simulator.InterruptProbe
Parameters:
s - the state of the simulator
inum - the number of the interrupt being masked out

fireWhenEnabled

public void fireWhenEnabled(State s,
                            int inum)
The fireWhenEnabled() method of an interrupt probe will be called by the simulator when the interrupt is unmasked (enabled) by the program. In this implementation, the method broadcasts the call to all of the other probes.

Specified by:
fireWhenEnabled in interface Simulator.InterruptProbe
Parameters:
s - the state of the simulator
inum - the number of the interrupt being unmasked

fireWhenPosted

public void fireWhenPosted(State s,
                           int inum)
The fireWhenPosted() method of an interrupt probe will be called by the simulator when the interrupt is posted. When an interrupt is posted to the simulator, it will be coming pending if it is enabled (unmasked) and eventually be handled. In this implementation, the method broadcasts the call to all of the other probes.

Specified by:
fireWhenPosted in interface Simulator.InterruptProbe
Parameters:
s - the state of the simulator
inum - the number of the interrupt being posted

fireWhenUnposted

public void fireWhenUnposted(State s,
                             int inum)
The fireWhenUnposted() method of an interrupt probe will be called by the simulator when the interrupt is unposted. This can happen if the software resets the flag bit of the corresponding IO register or, for most interrupts, when the pending interrupt is handled. In this implementation, the method broadcasts the call to all of the other probes.

Specified by:
fireWhenUnposted in interface Simulator.InterruptProbe
Parameters:
s - the state of the simulator
inum - the number of the interrupt being unposted