Changeset 250


Ignore:
Timestamp:
12/02/2009 03:23:04 PM (11 years ago)
Author:
michael.kriegel
Message:

a few little changes:

  • extended cmion events so that they remember which component raised them
  • event monitor renamed and allows filtering of displayed events by originator
  • added class for black board
Location:
libs/cmion
Files:
2 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • libs/cmion/cmionLauncher/ArchitectureConfiguration.xml

    r243 r250  
    2222  
    2323 <ArchitectureComponent ClassName="cmion.level3.fatima.FAtiMAConnector" ConstructorParameters="" /><ArchitectureComponent 
    24         ClassName="cmion.addOns.monitors.IonEventMonitor" /> 
     24        ClassName="cmion.addOns.monitors.CmionEventMonitor" /> 
    2525 
    2626</ArchitectureConfiguration> 
  • libs/cmion/cmionLauncher/src/cmion/architecture/Architecture.java

    r248 r250  
    4545import cmion.architecture.EventCmionReady; 
    4646import cmion.architecture.IArchitecture; 
    47 import cmion.architecture.CmionComponent; 
    4847import cmion.level2.CompetencyExecution; 
    4948import cmion.level2.CompetencyLibrary; 
    5049import cmion.level3.CompetencyManager; 
    51 import cmion.storage.CmionStorageContainer; 
     50import cmion.storage.BlackBoard; 
    5251import cmion.storage.WorldModel; 
    5352 
     
    6564        /** the black board that stores lower level information for competencies to share 
    6665         *  between each other */ 
    67         private CmionStorageContainer blackBoard; 
     66        private BlackBoard blackBoard; 
    6867         
    6968        /** the competency execution system */ 
     
    106105                Simulation.instance.update(); 
    107106                 
    108                 blackBoard = new CmionStorageContainer(this,"BlackBoard","BlackBoard"); 
     107                blackBoard = new BlackBoard(this,"BlackBoard"); 
    109108                Simulation.instance.getElements().add(blackBoard); 
    110109                Simulation.instance.update(); 
     
    279278        /** returns the black board component */ 
    280279        @Override 
    281         public CmionStorageContainer getBlackBoard() 
     280        public BlackBoard getBlackBoard() 
    282281        { 
    283282                return blackBoard; 
     
    327326                         
    328327        } 
    329  
    330         @Override 
    331         public void onDestroy() { 
    332                 // TODO Auto-generated method stub 
    333                  
    334         } 
    335          
    336  
     328         
     329        @Override 
     330        public void onDestroy() {} 
    337331 
    338332} 
  • libs/cmion/cmionMain/src/cmion/architecture/CmionComponent.java

    r248 r250  
    3131 
    3232import ion.Meta.Element; 
     33import ion.Meta.Event; 
    3334 
    3435/** parent class for all cmion components */ 
     
    6768} 
    6869 
     70@Override 
     71public void raise(Event evt)  
     72{ 
     73        // if the event is a cmion event, register ourselves as originator 
     74        if (evt instanceof CmionEvent) 
     75                ((CmionEvent) evt).setOriginator(this); 
     76 
     77        super.raise(evt); 
    6978} 
     79         
     80} 
  • libs/cmion/cmionMain/src/cmion/architecture/CmionEvent.java

    r248 r250  
    3434public abstract class CmionEvent extends Event  
    3535{ 
     36        /** the cmion component that raised this event*/ 
     37        private CmionComponent originator; 
     38         
     39        /** sets the originator (the cmion component that raised this event)*/ 
     40        public void setOriginator(CmionComponent originator) 
     41        { 
     42                this.originator = originator; 
     43        } 
     44         
     45        /** returns the cmion component that raised this event or null if this event was not raised 
     46         *  by a cmion component or not raised at all */ 
     47        public CmionComponent getOriginator() 
     48        { 
     49                return originator; 
     50        } 
    3651         
    3752} 
  • libs/cmion/cmionMain/src/cmion/architecture/EventCmionReady.java

    r248 r250  
    3232 *  signal to the mind that it can start executing actions */ 
    3333public class EventCmionReady extends CmionEvent { 
    34  
     34                 
    3535/** displays information about this event */ 
    3636@Override 
     
    4040        return evtString; 
    4141} 
    42          
     42 
    4343} 
  • libs/cmion/cmionMain/src/cmion/architecture/IArchitecture.java

    r248 r250  
    3333import cmion.level2.CompetencyLibrary; 
    3434import cmion.level3.CompetencyManager; 
    35 import cmion.storage.CmionStorageContainer; 
     35import cmion.storage.BlackBoard; 
    3636import cmion.storage.WorldModel; 
    3737 
     
    4444 
    4545        /** in this method the architecture must return a reference to the Black Board component */ 
    46         public CmionStorageContainer getBlackBoard(); 
     46        public BlackBoard getBlackBoard(); 
    4747         
    4848        /** in this method the architecture must return a reference to the competency execution component */     
Note: See TracChangeset for help on using the changeset viewer.