Package org.sensorhub.api.data
Class DataStreamEvent
java.lang.Object
org.sensorhub.api.event.Event
org.sensorhub.api.system.SystemEvent
org.sensorhub.api.data.DataStreamEvent
- Direct Known Subclasses:
DataEvent
,DataStreamAddedEvent
,DataStreamChangedEvent
,DataStreamDisabledEvent
,DataStreamEnabledEvent
,DataStreamRemovedEvent
,ObsEvent
Base class for all datastream (i.e. output) related events
-
Field Summary
FieldsFields inherited from class org.sensorhub.api.system.SystemEvent
sourceID, systemID, systemUID
-
Constructor Summary
ConstructorsConstructorDescriptionDataStreamEvent
(long timeStamp, String sysUID, String outputName) DataStreamEvent
(String sysUID, String outputName) Helper constructor that sets the timestamp to current system timeDataStreamEvent
(IDataStreamInfo dsInfo) Helper constructor that sets the timestamp to current system time -
Method Summary
Modifier and TypeMethodDescriptionvoid
assignDataStreamID
(BigId internalID) Called by the framework to assign the datastream's local ID to this event.Gets the ID of the source of event.Methods inherited from class org.sensorhub.api.system.SystemEvent
assignSystemID, getSystemID, getSystemUID
Methods inherited from class org.sensorhub.api.event.Event
getSource, getTimeStamp, toString
-
Field Details
-
outputName
-
dataStreamID
-
-
Constructor Details
-
DataStreamEvent
- Parameters:
timeStamp
- time of event generation (unix time in milliseconds, base 1970)sysUID
- Unique ID of parent systemoutputName
- Name of output producing the datastream
-
DataStreamEvent
Helper constructor that sets the timestamp to current system time- Parameters:
sysUID
- Unique ID of parent systemoutputName
- Name of output producing the datastream
-
DataStreamEvent
Helper constructor that sets the timestamp to current system time- Parameters:
dsInfo
- Data stream the event relates to
-
-
Method Details
-
getOutputName
- Returns:
- Name of datastream
-
getDataStreamID
- Returns:
- Internal ID of the datastream related to this event
-
assignDataStreamID
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
Description copied from class:Event
Gets the ID of the source of event.- Overrides:
getSourceID
in classSystemEvent
- Returns:
- ID of the event source
-