Class TimeSensor
- java.lang.Object
-
- eu.h2020.helios_social.core.sensor.Sensor
-
- eu.h2020.helios_social.core.sensor.ext.TimeSensor
-
public class TimeSensor extends Sensor
This class implements a simple time sensor class. It extends the abstract base class sensor. Time is obtained directly from the system, and sensor value listeners are notified with given time interval about the current time.
-
-
Constructor Summary
Constructors Constructor Description TimeSensor(int timeInterval)
Creates a new TimeSensorTimeSensor(java.lang.String id, int timeInterval)
Creates a new TimeSensor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
startUpdates()
Starts receiving sensor data valuesvoid
stopUpdates()
Stops receiving sensor data values-
Methods inherited from class eu.h2020.helios_social.core.sensor.Sensor
finalize, getId, getSensorById, getValueListeners, receiveValue, registerValueListener, unregisterValueListener
-
-
-
-
Constructor Detail
-
TimeSensor
public TimeSensor(java.lang.String id, int timeInterval)
Creates a new TimeSensor- Parameters:
timeInterval
- the time interval in milliseconds
-
TimeSensor
public TimeSensor(int timeInterval)
Creates a new TimeSensor- Parameters:
timeInterval
- the time interval in milliseconds
-
-
Method Detail
-
startUpdates
public void startUpdates()
Description copied from class:Sensor
Starts receiving sensor data values- Specified by:
startUpdates
in classSensor
-
stopUpdates
public void stopUpdates()
Description copied from class:Sensor
Stops receiving sensor data values- Specified by:
stopUpdates
in classSensor
-
-