stella.sensor
Interface WeatherSurveying

All Superinterfaces:
Caster, ClusterDepending, Initializable, Parameter, PropertySupplying, StatusProviding, Trigger, WeatherCaster
All Known Implementing Classes:
AbstractWeatherSurveyor, SimulatorWeather, WeatherStation

public interface WeatherSurveying
extends StatusProviding, WeatherCaster, ClusterDepending, Trigger

An interface that describes the functinoality of a weather station, i.e. a collection of weather sensors. Methods are provided to retrieve individual sensors and the entire collection of sensors.
As concrete implementations may require some additional classes acting as an interface between the hardware sensors and their software representations, a method to register a driver object is provided. Starting the sensors with the appropriate method should not occur prior to the registering of the driver.

See Also:
RmiWeatherReporting, EnvironmentMaster

Nested Class Summary
static interface WeatherSurveying.DataBlock
          A block of sensor data.
 
Field Summary
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Method Summary
 Collection<? extends Telemetering> getAllSensors()
          Returns a collection of all sensors served by this weather surveyer.
 int getCurrentlyRetarding()
          Returns the number of sensors that are currently in a retarding state.
 WeatherEvent getCurrentWeather()
          Returns the current weather as a weather event.
 Telemetering getSensor(String name)
          Returns a single sensor served by this weater surveyer.
 void registerSensorDriver(Driver driver)
          Registers a driver to represent the hardware sensors in software.
 void startSensors()
          Starts all sensors that are not already running.
 
Methods inherited from interface util.StatusProviding
provideStatus
 
Methods inherited from interface stella.WeatherCaster
addWeatherListener, removeWeatherListener
 
Methods inherited from interface stella.ClusterDepending
registerCluster
 
Methods inherited from interface stella.Trigger
getElapsedToggleTime, getLastToggleTime, getTrigger, isTrue, setTrigger, toggleTrigger
 
Methods inherited from interface stella.Parameter
get, getFormatted, getName, getString, set
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface util.Initializable
init
 

Method Detail

getSensor

Telemetering getSensor(String name)
Returns a single sensor served by this weater surveyer. The sensor is specified by its unique name.


getAllSensors

Collection<? extends Telemetering> getAllSensors()
Returns a collection of all sensors served by this weather surveyer.


registerSensorDriver

void registerSensorDriver(Driver driver)
Registers a driver to represent the hardware sensors in software.


startSensors

void startSensors()
Starts all sensors that are not already running. Normally this method is called after the registerSensorDriver(io.Driver) method.


getCurrentWeather

WeatherEvent getCurrentWeather()
Returns the current weather as a weather event. Used for querying on start-up.


getCurrentlyRetarding

int getCurrentlyRetarding()
Returns the number of sensors that are currently in a retarding state.