Package org.sensorhub.api.system
Interface ISystemDriver
- All Superinterfaces:
IEventProducer
- All Known Subinterfaces:
IActuatorDriver
,ICommandReceiver
,IDataProcess
,IDataProducer
,IDataProducerModule<ConfigType>
,IOnDemandProcess
,IParallelProcess
,IProcessModule<ConfigType>
,ISensorDriver
,ISensorModule<ConfigType>
,IStreamProcess
,ISystemGroupDriver<T>
Base interface for all OSH system drivers that allow communication with an external (observing) system and provide a SensorML description for it.
Complex systems with subsystems can be modeled using the ISystemGroupDriver
interface when such level of details is required, but if not, such systems
can also be modeled as a "black box" using a single instance of this class.
- Since:
- June 9, 2017
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the most current SensorML description of the system.long
Used to check when the SensorML description was last updated.getName()
ISystemGroupDriver<? extends ISystemDriver>
boolean
Check if the system is enabled.Methods inherited from interface org.sensorhub.api.event.IEventProducer
registerListener, unregisterListener
-
Method Details
-
getName
String getName()- Returns:
- The system's name
-
getDescription
String getDescription()- Returns:
- A short description of the system
-
getUniqueIdentifier
String getUniqueIdentifier()- Returns:
- The globally unique identifier of the system.
-
getParentSystemUID
String getParentSystemUID()- Returns:
- The unique ID of the parent system or null if this system is not a member of any parent system
-
getParentSystem
ISystemGroupDriver<? extends ISystemDriver> getParentSystem()- Returns:
- The parent system driver or null if the parent is not
a system driver defined in the same module. Note that in this case,
the
getParentSystemUID()
must still return a non null value.
-
getCurrentDescription
AbstractProcess getCurrentDescription()Retrieves the most current SensorML description of the system. All implementations must return an instance of AbstractProcess with a valid unique identifier.
In the case of a module generating data from multiple subsystems (e.g. sensor network), this returns the description of the group as a whole.
The returned object is mutable but must NOT be mutated by the caller.- Returns:
- The SensorML description of the system or null if none is available at the time of the call
-
getLatestDescriptionUpdate
long getLatestDescriptionUpdate()Used to check when the SensorML description was last updated. This is useful to avoid requesting the object when it hasn't changed.- Returns:
- Date/time of last description update as unix time (millis since 1970)
or
Long.MIN_VALUE
if description was never updated.
-
isEnabled
boolean isEnabled()Check if the system is enabled. A system marked as disabled is not producing live data but historical data may still be available.- Returns:
- True if system is enabled, false otherwise
-