dk.deepthought.sidious.services
Class ServiceEngine

java.lang.Object
  extended by dk.deepthought.sidious.services.ServiceEngine

public class ServiceEngine
extends java.lang.Object

This class handles interaction with environment. It implements convenience methods for handling of sensors.

Author:
Deepthought

Field Summary
private static org.apache.commons.logging.Log logger
          Logger for this class
private static java.util.Collection<SensorInput> sensorList
          All the sensors in the environment.
 
Constructor Summary
ServiceEngine()
           
 
Method Summary
static State getCurrentState()
          Method returns the current state of the system.
private static java.util.Collection<SensorInput> getEnvironmentSensors()
          Returns a snapshot of the sensors and their current setting in the system.
static double getSensorValue(SuperLinkID id)
          Method returns the value of the sensor associated with the given id.
static void reset()
          Resets the service engine.
static void setSensorList(java.util.Collection<SensorInput> sensorList)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sensorList

private static java.util.Collection<SensorInput> sensorList
All the sensors in the environment.


logger

private static final org.apache.commons.logging.Log logger
Logger for this class

Constructor Detail

ServiceEngine

public ServiceEngine()
Method Detail

getEnvironmentSensors

private static java.util.Collection<SensorInput> getEnvironmentSensors()
Returns a snapshot of the sensors and their current setting in the system.

Returns:
the sensors of the system

getCurrentState

public static State getCurrentState()
Method returns the current state of the system.

Returns:
the current state

getSensorValue

public static double getSensorValue(SuperLinkID id)
Method returns the value of the sensor associated with the given id.

Parameters:
id - the id of the sensor
Returns:
the value of the sensor

setSensorList

public static void setSensorList(java.util.Collection<SensorInput> sensorList)
Parameters:
sensorList - the sensorList to set

reset

public static void reset()
Resets the service engine.



Copyright © Deepthought Development - All Rights Reserved.