Class DataStreamEvent

Direct Known Subclasses:
DataEvent, DataStreamAddedEvent, DataStreamChangedEvent, DataStreamDisabledEvent, DataStreamEnabledEvent, DataStreamRemovedEvent, ObsEvent

public abstract class DataStreamEvent extends SystemEvent

Base class for all datastream (i.e. output) related events

  • Field Details

    • outputName

      protected String outputName
    • dataStreamID

      protected BigId dataStreamID
  • Constructor Details

    • DataStreamEvent

      public DataStreamEvent(long timeStamp, String sysUID, String outputName)
      Parameters:
      timeStamp - time of event generation (unix time in milliseconds, base 1970)
      sysUID - Unique ID of parent system
      outputName - Name of output producing the datastream
    • DataStreamEvent

      public DataStreamEvent(String sysUID, String outputName)
      Helper constructor that sets the timestamp to current system time
      Parameters:
      sysUID - Unique ID of parent system
      outputName - Name of output producing the datastream
    • DataStreamEvent

      public DataStreamEvent(IDataStreamInfo dsInfo)
      Helper constructor that sets the timestamp to current system time
      Parameters:
      dsInfo - Data stream the event relates to
  • Method Details

    • getOutputName

      public String getOutputName()
      Returns:
      Name of datastream
    • getDataStreamID

      public BigId getDataStreamID()
      Returns:
      Internal ID of the datastream related to this event
    • assignDataStreamID

      public void assignDataStreamID(BigId internalID)
      Called by the framework to assign the datastream's local ID to this event. This can only be called once and must be called before the event is dispatched.
      Parameters:
      internalID - Local ID of related datastream
    • getSourceID

      public String getSourceID()
      Description copied from class: Event
      Gets the ID of the source of event.
      Overrides:
      getSourceID in class SystemEvent
      Returns:
      ID of the event source