コード例 #1
0
ファイル: MrPong.java プロジェクト: hckkid/eTrice
 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;
 }
コード例 #2
0
 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));
 }
コード例 #3
0
 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);
 }
コード例 #4
0
 @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);
   }
 }
コード例 #5
0
ファイル: AC1.java プロジェクト: johnsteele/etrice
 private void setState(int new_state) {
   DebuggingService.getInstance().addActorState(this, stateStrings[new_state]);
   if (stateStrings[new_state] != "Idle") {}
   this.state = new_state;
 }
コード例 #6
0
ファイル: AC1.java プロジェクト: johnsteele/etrice
 public void destroy() {
   DebuggingService.getInstance().addMessageActorDestroy(this);
   super.destroy();
 }