org.licas.module

## Class ControlModule

- java.lang.Object
- - java.lang.Thread
  - - org.licas.module.LicasModule
    - - org.licas.module.FrameworkModule
      - - org.licas.module.ControlModule

- All Implemented Interfaces:
    java.lang.Runnable, ServiceDef
  Direct Known Subclasses:
    CM_Data

      public class ControlModule
      extends FrameworkModule

  Base class for the outer control loop and general operations for autonomous behaviours.
  Author:
    Kieran Greer

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.lang.Thread

      `java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected DataModule` | `dm` This is the service data module

    - ### Fields inherited from class org.licas.module.FrameworkModule

      `passwordHandler, service, serviceType`

    - ### Fields inherited from class org.licas.module.LicasModule

      `jarFile, syncOn, uuid`

    - ### Fields inherited from class java.lang.Thread

      `MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ControlModule(Service service, PasswordHandler pHandler)` Creates a new instance of ControlModule.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getServerPassword()` Get the local server password if it is stored.
    `void` | `setDataModule(DataModule theDm)` Set the data module to access any data directly.

    - ### Methods inherited from class org.licas.module.FrameworkModule

      `canAccess, canAccessTemp, getPasswordHandler, getPasswordHandler, getServicePassword, getServiceType, isAdminKey, setServiceDetails, setServiceType`

    - ### Methods inherited from class org.licas.module.LicasModule

      `getJarFile, getUUID, loadObject, setJarFile, setUUID, threadAliveState`

    - ### Methods inherited from class java.lang.Thread

      `activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.licas.def.ServiceDef

      `getUUID, setJarFile, setUUID`

- - ### Field Detail

    - #### dm

          protected DataModule dm

      This is the service data module

  - ### Constructor Detail

    - #### ControlModule

          public ControlModule(Service service,
                               PasswordHandler pHandler)
                        throws java.lang.Exception

      Creates a new instance of ControlModule.
      Parameters:
        `service` - the parent service.
        `pHandler` - the parent password handler.
      Throws:
        `java.lang.Exception` - any error.

  - ### Method Detail

    - #### setDataModule

          public void setDataModule(DataModule theDm)

      Set the data module to access any data directly.
      Parameters:
        `theDm` - the data module.

    - #### getServerPassword

          public java.lang.String getServerPassword()
                                             throws java.lang.Exception

      Get the local server password if it is stored.
      Overrides:
        `getServerPassword` in class `FrameworkModule`
      Returns:
        the local server password.
      Throws:
        `java.lang.Exception` - any error.