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:
java.lang.Runnable
public class TestCompetency6 extends Competency
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, running
-
Fields inherited from class cmion.architecture.CmionComponent
architecture
-
-
Constructor Summary
Constructors Constructor Description TestCompetency6(IArchitecture architecture)constructor of the test competency
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancompetencyCode(java.util.HashMap<java.lang.String,java.lang.String> parameters)every competency sub class must implement this method and in it perform the competency code.voidinitialize()custom competency initialisation code should go in herebooleanrunsInBackground()this competency runs in background and is not invoked directly-
Methods inherited from class cmion.level2.Competency
cancel, getCompetencyName, getCompetencyType, isAvailable, isRunning, registerHandlers, requestStartCompetency, run, setAdditionalData
-
Methods inherited from class cmion.architecture.CmionComponent
getArchitecture, isConnected, onDestroy, raise
-
-
-
-
Constructor Detail
-
TestCompetency6
public TestCompetency6(IArchitecture architecture)
constructor of the test competency
-
-
Method Detail
-
runsInBackground
public boolean runsInBackground()
this competency runs in background and is not invoked directly- Specified by:
runsInBackgroundin classCompetency
-
competencyCode
protected boolean competencyCode(java.util.HashMap<java.lang.String,java.lang.String> parameters)
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
-
-