Interface IStreamingDataInterface

All Superinterfaces:
IEventProducer
All Known Subinterfaces:
IProcessOutput

public interface IStreamingDataInterface extends IEventProducer

Output interface used by data producers using the SWE model to describe structure and encoding of data they generate (e.g. sensors, processes...)

Since:
Feb 21, 2015
  • Method Details

    • getParentProducer

      IDataProducer getParentProducer()
      Allows by-reference access to parent producer
      Returns:
      parent producer instance
    • getName

      String getName()
      Gets this output interface name.

      It MUST be the name reported in the map obtained by the getOutputs() method of IDataProducer

      Returns:
      name of this data interface
    • isEnabled

      boolean isEnabled()
      Checks if this interface is enabled
      Returns:
      true if interface is enabled, false otherwise
    • getRecordDescription

      DataComponent getRecordDescription()
      Retrieves the definition of records produced by this interface.

      Note that this is usually sent by reference and MUST not be modified by the caller. If you really need to modify it, first get an independent copy using DataComponent.copy()

      Returns:
      a DataComponent object defining the structure of the produced data
    • getRecommendedEncoding

      DataEncoding getRecommendedEncoding()
      Provides the recommended encoding for records produced by this interface.

      Note that this is usually sent by reference and MUST not be modified by the caller. If you really need to modify it, first get an independent copy using DataEncoding.copy()

      Returns:
      recommended encoding description for the produced data
    • getLatestRecord

      DataBlock getLatestRecord()
      Gets the latest record received on this data channel.

      Note that this does not trigger a new measurement but simply retrieves the result of the last measurement made.

      Returns:
      the last measurement record or null if no data is available
    • getLatestRecordTime

      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. However, it does not usually equal the sampling time stamp that is often sent with the data.

      Note: this method is useful to know if a record has been produced since the last call to getLatestRecord().

      Returns:
      time of last record as unix time (ms since 1970) or Long.MIN_VALUE if no record is available yet
    • getAverageSamplingPeriod

      double getAverageSamplingPeriod()
      Gets the average rate at which this interface produces data.
      This can be Double.NaN if the data is not streamed regularly (e.g. case of a sensor/process that is triggered manually or by another unpredictable external stimulus)
      Returns:
      sampling period in seconds or Double.NaN if unknown