private final Simulation sim;
private final se.sics.mspsim.chip.Button button;
public MspButton(Mote mote) {
final MspMote mspMote = (MspMote) mote;
sim = mote.getSimulation();
button = mspMote.getCPU().getChip(se.sics.mspsim.chip.Button.class);
if (button == null) {
throw new IllegalStateException("Mote is not equipped with a button");
}
}