public class SensorSystem extends AbstractSensorModule<SensorSystemConfig>
Class allowing to group several sensors drivers and processes into a single
system.
The system's outputs consist of the ones from the individual sensors and
processes included in the group.
Relative location and orientation of components can also be set
Modifier and Type | Field and Description |
---|---|
static String |
AUTO_ID |
static String |
DEFAULT_XMLID_PREFIX |
ERROR_NO_ENTITIES, ERROR_NO_HISTORY, ERROR_NO_UPDATE, foi, lastUpdatedSensorDescription, LOCATION_OUTPUT_ID, LOCATION_OUTPUT_NAME, locationOutput, randomUniqueID, sensorDescLock, sensorDescription, STATE_LAST_SML_UPDATE, STATE_UNIQUE_ID, uniqueID, UUID_URI_PREFIX, xmlID
config, eventHandler, lastError, logger, securityHandler, startRequested, state, stateLock, statusMsg
Constructor and Description |
---|
SensorSystem() |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Cleans up all ressources used by the module when deleted
All persistent resources created by the module should be cleaned
when this is called
|
protected void |
generateXmlIDFromUUID(String uuid) |
Map<String,IProcessModule<?>> |
getProcesses() |
Map<String,ISensorModule<?>> |
getSensors() |
void |
init()
Initializes the module synchronously with the current configuration.
Implementations of this method must block until the module is successfully initialized or send an exception. Module lifecycle events may not be generated when calling this method directly. |
boolean |
isConnected()
Returns the sensor connection status.
This method must do whatever it can to really detect the presence of the sensor. |
void |
loadState(IModuleStateManager loader)
Restores the state of this module
Implementations of this method must block until the module state is successfully loaded or send an exception. |
void |
saveState(IModuleStateManager saver)
Saves the state of this module.
Implementations of this method must block until the module state is successfully saved or send an exception. |
void |
start()
Starts the module synchronously with the current configuration.
Implementations of this method must block until the module is successfully started or send an exception. Module lifecycle events may not be generated when calling this method directly. init() should always be called before start(). |
void |
stop()
Stops the module.
All temporary resources created by the module should be cleaned when this is called (ex: memory, files, connections, etc.) Implementations of this method must block until the module is successfully stopped or send an exception. Module lifecycle events may not be generated when calling this method directly. stop() can be called right after init() even if start() hasn't been called. |
protected void |
updateSensorDescription()
This method should be called whenever the sensor description needs to be regenerated.
This default implementation reads the base description from the SensorML file if provided and then appends the unique sensor identifier, time validity and the description of all registered outputs and control inputs. |
addControlInput, addLocationOutput, addOutput, generateUniqueID, generateXmlID, getAllOutputs, getCommandInputs, getCurrentDescription, getCurrentFeatureOfInterest, getDefaultIdSuffix, getLastDescriptionUpdate, getLocalFrameID, getObservationOutputs, getStatusOutputs, getUniqueIdentifier, init, notifyNewDescription, removeAllControlInputs, removeAllOutputs, updateConfig
canInit, canStart, canStop, clearError, clearStatus, getConfiguration, getCurrentError, getCurrentState, getLocalID, getLogger, getName, getStatusMessage, isInitialized, isStarted, notifyConnectionStatus, registerListener, reportError, reportError, reportStatus, requestInit, requestStart, requestStop, setConfiguration, setState, toString, unregisterListener, waitForState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getConfiguration, getCurrentError, getCurrentState, getLocalID, getName, getStatusMessage, isInitialized, isStarted, registerListener, requestInit, requestStart, requestStop, setConfiguration, unregisterListener, waitForState
public static final String DEFAULT_XMLID_PREFIX
public static final String AUTO_ID
public void init() throws SensorHubException
IModule
init
in interface IModule<SensorSystemConfig>
init
in class AbstractSensorModule<SensorSystemConfig>
SensorHubException
protected void updateSensorDescription()
AbstractSensorModule
updateSensorDescription
in class AbstractSensorModule<SensorSystemConfig>
public void start() throws SensorHubException
IModule
SensorHubException
public void stop() throws SensorHubException
IModule
SensorHubException
public void cleanup() throws SensorHubException
IModule
SensorHubException
public boolean isConnected()
ISensorModule
public void loadState(IModuleStateManager loader) throws SensorHubException
IModule
loadState
in interface IModule<SensorSystemConfig>
loadState
in class AbstractSensorModule<SensorSystemConfig>
SensorHubException
public void saveState(IModuleStateManager saver) throws SensorHubException
IModule
saveState
in interface IModule<SensorSystemConfig>
saveState
in class AbstractSensorModule<SensorSystemConfig>
SensorHubException
public Map<String,ISensorModule<?>> getSensors()
public Map<String,IProcessModule<?>> getProcesses()
protected void generateXmlIDFromUUID(String uuid)
generateXmlIDFromUUID
in class AbstractSensorModule<SensorSystemConfig>
Copyright © 2016 Sensia Software LLC. All rights reserved.