public class SensorDataEvent extends DataEvent
Type of event generated when new data is available from sensors. It is immutable and carries sensor data by reference
DataEvent.Type
relatedEntityID
Constructor and Description |
---|
SensorDataEvent(long timeStamp,
ISensorDataInterface dataInterface,
DataBlock... records)
Constructs an event for data produced by an isolated sensor.
The sensor ID is obtained from the sensor description of the parent sensor module. |
SensorDataEvent(long timeStamp,
java.lang.String sensorID,
IStreamingDataInterface dataInterface,
DataBlock... records)
Constructs an event for data produced by the specified sensor.
This flavor is used to identify a particular sensor within 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, it can be either the ID of the network as a whole (if the attached data includes records generated by all or several members of the network) or the ID of one of the sensor in the network (if the attached data has been generated by a single sensor). |
ISensorDataInterface |
getSource()
Gets the source of the event as an object reference.
|
getRecordDescription, getRecords, getType
getRelatedEntityID
getTimeStamp
public SensorDataEvent(long timeStamp, ISensorDataInterface dataInterface, DataBlock... records)
timeStamp
- time of event generation (unix time in milliseconds, base 1970)dataInterface
- sensor output interface that produced the associated datarecords
- arrays of records that triggered this notificationpublic SensorDataEvent(long timeStamp, java.lang.String sensorID, IStreamingDataInterface dataInterface, DataBlock... records)
timeStamp
- time of event generation (unix time in milliseconds, base 1970)sensorID
- Unique ID of the sensor that produced the datadataInterface
- stream interface that generated the associated datarecords
- arrays of records that triggered this notificationpublic java.lang.String getSensorID()
public ISensorDataInterface getSource()
Event