public interface ISensorDataInterface extends IStreamingDataInterface
Interface to be implemented by all sensor drivers connected to the system.
Data provided by this interface can be actual measurements but also status information. Each sensor output is mapped to a separate instance of this interface, allowing them to have completely independent sampling rates.
Even when storage is not supported, implementations MUST at least be
capable of retaining the latest record received from sensor and make it
available with getLatestRecord()
.
Implementation MUST send events of type
SensorDataEvent
when new data is produced
by sensor.
Modifier and Type | Method and Description |
---|---|
int |
clearAllRecords()
Clears all records currently stored in driver or sensor memory.
This method must be implemented if isStorageSupported() returns true. |
List<net.opengis.swe.v20.DataBlock> |
getAllRecords(boolean clear)
Retrieves all records stored by the driver or sensor.
This method must be implemented if isStorageSupported() returns true. |
net.opengis.swe.v20.DataBlock |
getLatestRecord()
Gets the latest record received on this data channel.
|
List<net.opengis.swe.v20.DataBlock> |
getLatestRecords(int maxRecords,
boolean clear)
Retrieves the N last records stored.
This method must be implemented if isStorageSupported() returns true. |
long |
getLatestRecordTime()
Used to check when the last record was produced.
This is usually set as system time when the output is sent, and must be the same as the corresponding event time stamp. |
String |
getName()
Gets this output interface name.
|
int |
getNumberOfAvailableRecords()
Retrieves number of record currectly available from driver or on-board sensor memory.
This method must be implemented if isStorageSupported() returns true. |
ISensorModule<?> |
getParentModule()
Allows by-reference access to parent sensor module
|
int |
getStorageCapacity()
Gets the internal storage capacity.
This method must be implemented if isStorageSupported() returns true. |
boolean |
isStorageSupported()
Checks data storage capability
|
getAverageSamplingPeriod, getRecommendedEncoding, getRecordDescription, isEnabled
registerListener, unregisterListener
ISensorModule<?> getParentModule()
getParentModule
in interface IStreamingDataInterface
String getName()
It MUST be the name reported in the map by getXXXOutputs methods
of ISensorModule
getName
in interface IStreamingDataInterface
ISensorModule.getAllOutputs()
boolean isStorageSupported()
Note that storage can be provided by the sensor itself or by the driver.
net.opengis.swe.v20.DataBlock getLatestRecord()
When storage is supported, this method does not cause data to be removed from memory.
Note that this does not trigger a new measurement but simply retrieves the result of the last measurement made.
getLatestRecord
in interface IStreamingDataInterface
long getLatestRecordTime()
IStreamingDataInterface
Note: this method is useful to know if a record has been produced since the
last call to IStreamingDataInterface.getLatestRecord()
.
getLatestRecordTime
in interface IStreamingDataInterface
Long.MIN_VALUE
if no record is available yetint getStorageCapacity() throws SensorException
isStorageSupported()
returns true.SensorException
- if storage is not supported or a problem occured while
checking sensor on-board storage capacityint getNumberOfAvailableRecords() throws SensorException
isStorageSupported()
returns true.SensorException
- if storage is not supported or a problem occured while
reading from on-board sensor storageList<net.opengis.swe.v20.DataBlock> getLatestRecords(int maxRecords, boolean clear) throws SensorException
isStorageSupported()
returns true.maxRecords
- Maximum number of records to retrieveclear
- if true, also clears records from driver or sensor memorySensorException
- if storage is not supported or a problem occured while
reading from on-board sensor storageList<net.opengis.swe.v20.DataBlock> getAllRecords(boolean clear) throws SensorException
isStorageSupported()
returns true.clear
- if true, also clears records from driver or sensor memorySensorException
- if storage is not supported or a problem occured
while reading from on-board sensor storageint clearAllRecords() throws SensorException
isStorageSupported()
returns true.SensorException
- if storage is not supported or a problem occured while
clearing on-board sensor storageCopyright © 2015 Sensia Software LLC. All rights reserved.