Class 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
    • 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:
        runsInBackground in class Competency
      • competencyCode

        protected boolean competencyCode​(java.util.HashMap<java.lang.String,​java.lang.String> parameters)
        Description copied from class: Competency
        every 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:
        competencyCode in class Competency
        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: Competency
        custom competency initialisation code should go in here
        Specified by:
        initialize in class Competency