public class SensorManagerImpl extends Object implements ISensorManager
Default implementation of the sensor manager interface
Modifier and Type | Field and Description |
---|---|
protected ModuleRegistry |
moduleRegistry |
Constructor and Description |
---|
SensorManagerImpl(ModuleRegistry moduleRegistry) |
Modifier and Type | Method and Description |
---|---|
ISensorModule<?> |
findSensor(String uid)
Helper method to find a sensor by its global UID (instead of its localID)
|
Collection<ModuleConfig> |
getAvailableModules()
Gets the list of all modules handled by this manager
that are configured but not yet loaded (i.e.
|
Collection<ISensorModule<?>> |
getConnectedSensors()
Helper method to get the list of connected sensors only
|
Collection<IModuleProvider> |
getInstalledSensorDrivers() |
Collection<ISensorModule<?>> |
getLoadedModules()
Gets the list of all modules handled by this manager
that are already loaded (i.e.
|
ISensorModule<?> |
getModuleById(String moduleID)
Retrieves a module instance by its local ID
|
String |
installDriver(String driverPackageURL,
boolean replace)
Installs a driver package (jar file) from the specified URL
|
boolean |
isModuleLoaded(String moduleID) |
void |
uninstallDriver(String driverID)
Uninstalls the driver with the specified ID
|
protected ModuleRegistry moduleRegistry
public SensorManagerImpl(ModuleRegistry moduleRegistry)
public Collection<ISensorModule<?>> getLoadedModules()
IModuleManager
getLoadedModules
in interface IModuleManager<ISensorModule<?>>
public boolean isModuleLoaded(String moduleID)
isModuleLoaded
in interface IModuleManager<ISensorModule<?>>
moduleID
- local ID of modulepublic Collection<ModuleConfig> getAvailableModules()
IModuleManager
getAvailableModules
in interface IModuleManager<ISensorModule<?>>
public ISensorModule<?> getModuleById(String moduleID) throws SensorHubException
IModuleManager
getModuleById
in interface IModuleManager<ISensorModule<?>>
moduleID
- Id of module to retrieveSensorHubException
- if no module with given ID can be foundpublic ISensorModule<?> findSensor(String uid)
ISensorManager
findSensor
in interface ISensorManager
uid
- global unique identifier of sensor (= SensorML UID)public Collection<ISensorModule<?>> getConnectedSensors()
ISensorManager
getConnectedSensors
in interface ISensorManager
public String installDriver(String driverPackageURL, boolean replace)
ISensorManager
installDriver
in interface ISensorManager
driverPackageURL
- URL of jar containing implementation of new driverreplace
- if true, an older version of the same driver will be replacedpublic void uninstallDriver(String driverID)
ISensorManager
uninstallDriver
in interface ISensorManager
public Collection<IModuleProvider> getInstalledSensorDrivers()
getInstalledSensorDrivers
in interface ISensorManager
Copyright © 2016 Sensia Software LLC. All rights reserved.