Changeset 415
- Timestamp:
- 05/07/2010 05:23:15 PM (11 years ago)
- Location:
- libs/cmion/cmionMain/src/cmion/level3/supersimplemind
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libs/cmion/cmionMain/src/cmion/level3/supersimplemind/SuperSimpleMigratingMind.java
r362 r415 129 129 } 130 130 131 /** creates a Migrating action to a specific device and attempts to execute it */ 132 public void executeMigrationBackAction() 133 { 134 ArrayList<String> parameters = new ArrayList<String>(); 135 parameters.add("A"); 136 137 // modify this for test purposes 138 MindAction ma = new MindAction(agentName,"Migration",parameters); 139 this.connector.newAction(ma); 140 executing = true; 141 } 142 131 143 /** the mind processes added entities in this function */ 132 144 public void sendEntityAdded(String entityName) { -
libs/cmion/cmionMain/src/cmion/level3/supersimplemind/SuperSimpleMigratingMindConnector.java
r366 r415 135 135 System.out.println("MIND-Received mind without goal."); 136 136 } 137 } 138 137 new WaitAndMigrateBack().start(); 138 } 139 140 private class WaitAndMigrateBack extends Thread 141 { 142 @Override 143 public void run() 144 { 145 // wait 5 seconds 146 try { 147 Thread.sleep(5000); 148 } catch (InterruptedException e) {} 149 150 // migrate back 151 mind.executeMigrationBackAction(); 152 } 153 } 139 154 140 155 @Override
Note: See TracChangeset
for help on using the changeset viewer.