public class SWEVirtualSensor extends AbstractSensorModule<SWEVirtualSensorConfig>
Driver for SWE enabled sensors communicating via SOS & SPS standard services. This can also be used to communicate with a sensor deployed on another (usually remote) sensor hub node. TODO forward full SensorML description
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
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 |
---|
SWEVirtualSensor() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkConfig() |
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
|
AbstractFeature |
getCurrentFeatureOfInterest()
Retrieves the feature of interest for which this producer is
currently generating data.
In the case of a module generating data from multiple entities (e.g. |
boolean |
isConnected()
Returns the sensor connection status.
This method must do whatever it can to really detect the presence of the sensor. |
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, generateXmlIDFromUUID, getAllOutputs, getCommandInputs, getCurrentDescription, getDefaultIdSuffix, getLastDescriptionUpdate, getLocalFrameID, getObservationOutputs, getStatusOutputs, getUniqueIdentifier, init, init, loadState, notifyNewDescription, removeAllControlInputs, removeAllOutputs, saveState, 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
protected void checkConfig() throws SensorHubException
SensorHubException
public void start() throws SensorHubException
IModule
SensorHubException
public void stop() throws SensorHubException
IModule
SensorHubException
protected void updateSensorDescription()
AbstractSensorModule
updateSensorDescription
in class AbstractSensorModule<SWEVirtualSensorConfig>
public AbstractFeature getCurrentFeatureOfInterest()
IDataProducerModule
IMultiSourceDataProducer.getCurrentFeatureOfInterest(String)
getCurrentFeatureOfInterest
in interface IDataProducerModule<SWEVirtualSensorConfig>
getCurrentFeatureOfInterest
in class AbstractSensorModule<SWEVirtualSensorConfig>
public void cleanup() throws SensorHubException
IModule
SensorHubException
public boolean isConnected()
ISensorModule
Copyright © 2016 Sensia Software LLC. All rights reserved.