Package cmion.level2.competencies.test
Class TestCompetency6
java.lang.Object
ion.Meta.Element
cmion.architecture.CmionComponent
cmion.level2.Competency
cmion.level2.competencies.test.TestCompetency6
- All Implemented Interfaces:
Runnable
this is an example of a competency that is not started as part of an order
issued from the mind, but that continuously runs in the background, in this
case printing out a message every 5 seconds. This type of competency might be used
for sensors that are continuously active instead of being explicitly invoked
-
Field Summary
Fields inherited from class cmion.level2.Competency
available, competencyName, competencyType, plan, runningFields inherited from class cmion.architecture.CmionComponent
architecture -
Constructor Summary
ConstructorsConstructorDescriptionTestCompetency6(IArchitecture architecture) constructor of the test competency -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancompetencyCode(HashMap<String, String> parameters) every competency sub class must implement this method and in it perform the competency code.voidcustom competency initialisation code should go in herebooleanthis competency runs in background and is not invoked directlyMethods inherited from class cmion.level2.Competency
cancel, getCompetencyName, getCompetencyType, isAvailable, isRunning, registerHandlers, requestStartCompetency, run, setAdditionalDataMethods inherited from class cmion.architecture.CmionComponent
getArchitecture, isConnected, onDestroy, raiseMethods inherited from class ion.Meta.Element
destroy, getEventFilters, getEventHandlers, getRequestFilters, getRequestHandlers, getSimulation, getUID, schedule, wasDestroyed
-
Constructor Details
-
TestCompetency6
constructor of the test competency
-
-
Method Details
-
runsInBackground
public boolean runsInBackground()this competency runs in background and is not invoked directly- Specified by:
runsInBackgroundin classCompetency
-
competencyCode
Description copied from class:Competencyevery competency sub class must implement this method and in it perform the competency code. This method will run in a seperate thread, so can take its time. It should not be called from outside, instead a request should be scheduled or the convenience function requestStartComptency of this class should be used- Specified by:
competencyCodein classCompetency- Parameters:
parameters- a map including running parameters and their values- Returns:
- the return value of this method should indicate, whether the competency execution was a success (true) or failure (false)
-
initialize
public void initialize()Description copied from class:Competencycustom competency initialisation code should go in here- Specified by:
initializein classCompetency
-