private void setState(int new_state) { DebuggingService.getInstance().addActorState(this, stateStrings[new_state]); if (stateStrings[new_state] != "Idle") { System.out.println(getInstancePath() + " -> " + stateStrings[new_state]); } this.state = new_state; }
public void msg5() { if (messageStrings[IN_msg5] != "timerTick") { DebuggingService.getInstance() .addMessageAsyncOut(getAddress(), getPeerAddress(), messageStrings[IN_msg5]); } if (getPeerAddress() != null) getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), IN_msg5)); }
public TestProtocolPort( IEventReceiver actor, String name, int localId, int idx, Address addr, Address peerAddress) { super(actor, name, localId, idx, addr, peerAddress); DebuggingService.getInstance().addPortInstance(this); }
@Override public void receive(Message m) { if (!(m instanceof EventMessage)) return; EventMessage msg = (EventMessage) m; if (msg.getEvtId() <= 0 || msg.getEvtId() >= MSG_MAX) System.out.println("unknown"); else { if (messageStrings[msg.getEvtId()] != "timerTick") { DebuggingService.getInstance() .addMessageAsyncIn(getPeerAddress(), getAddress(), messageStrings[msg.getEvtId()]); } if (msg instanceof EventWithDataMessage) getActor().receiveEvent(this, msg.getEvtId(), ((EventWithDataMessage) msg).getData()); else getActor().receiveEvent(this, msg.getEvtId(), null); } }
private void setState(int new_state) { DebuggingService.getInstance().addActorState(this, stateStrings[new_state]); if (stateStrings[new_state] != "Idle") {} this.state = new_state; }
public void destroy() { DebuggingService.getInstance().addMessageActorDestroy(this); super.destroy(); }