public class SensorEvent extends EntityEvent<SensorEvent.Type>
Event generated when sensor state/configuration changes.
Modifier and Type | Class and Description |
---|---|
static class |
SensorEvent.Type
Possible event types for a SensorEvent
|
relatedEntityID
Constructor and Description |
---|
SensorEvent(long timeStamp,
ISensorModule<?> sensorModule,
SensorEvent.Type type)
Constructs the event for an individual sensor
|
SensorEvent(long timeStamp,
java.lang.String sensorID,
ISensorModule<?> sensorModule,
SensorEvent.Type type)
Constructs the event for a sensor that is part of a network
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getSensorID()
Gets the unique ID of the sensor related to this event.
For sensor networks, this can be either the ID of the network as a whole (if the change is global) or the ID of one of the sensor in the network (if the change applies only to that particular sensor, e.g. |
ISensorModule<?> |
getSource()
Gets the source of the event as an object reference.
|
getRelatedEntityID
getTimeStamp, getType
public SensorEvent(long timeStamp, ISensorModule<?> sensorModule, SensorEvent.Type type)
timeStamp
- unix time of event generationsensorModule
- sensor module that generated the eventtype
- type of eventpublic SensorEvent(long timeStamp, java.lang.String sensorID, ISensorModule<?> sensorModule, SensorEvent.Type type)
timeStamp
- unix time of event generationsensorID
- Id of individual sensor in the networksensorModule
- sensor module that generated the eventtype
- type of eventpublic java.lang.String getSensorID()
public ISensorModule<?> getSource()
Event
getSource
in class Event<SensorEvent.Type>