public class DirectSensorConnector extends Object implements ISPSConnector, IEventListener
SPS connector for directly sending commands to sensors. This connector doesn't support scheduling or persistent task management
Constructor and Description |
---|
DirectSensorConnector(SPSServlet service,
SensorConnectorConfig config) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkEnabled() |
void |
cleanup()
Called when the connector is removed
|
SPSOfferingCapabilities |
generateCapabilities()
Builds the offering capabilities using the connector configuration
This will connect to source to retrieve the necessary metadata
|
AbstractProcess |
generateSensorMLDescription(double time)
Retrieves the SensorML description associated to this connector
|
protected List<DataComponent> |
getCommandsFromSensor() |
SPSConnectorConfig |
getConfig() |
protected List<String> |
getObservablePropertiesFromSensor() |
void |
handleEvent(Event<?> e) |
boolean |
isEnabled()
Allows to check if provider is enabled
|
void |
sendSubmitData(ITask task,
DataBlock data)
Sends the command data through the connector
|
void |
updateCapabilities()
Update capabilities previously generated by this connector if needed.
|
public DirectSensorConnector(SPSServlet service, SensorConnectorConfig config) throws SensorHubException
SensorHubException
public SPSOfferingCapabilities generateCapabilities() throws ServiceException
ISPSConnector
generateCapabilities
in interface ISPSConnector
ServiceException
protected List<DataComponent> getCommandsFromSensor() throws SensorException
SensorException
protected List<String> getObservablePropertiesFromSensor() throws SensorException
SensorException
public void updateCapabilities() throws Exception
ISPSConnector
ISPSConnector.generateCapabilities()
updateCapabilities
in interface ISPSConnector
Exception
public AbstractProcess generateSensorMLDescription(double time) throws Exception
ISPSConnector
generateSensorMLDescription
in interface ISPSConnector
time
- Time at which the description should be validException
public void sendSubmitData(ITask task, DataBlock data) throws ServiceException
ISPSConnector
sendSubmitData
in interface ISPSConnector
ServiceException
protected void checkEnabled() throws ServiceException
ServiceException
public void handleEvent(Event<?> e)
handleEvent
in interface IEventListener
public boolean isEnabled()
ISPSConnector
isEnabled
in interface ISPSConnector
public SPSConnectorConfig getConfig()
getConfig
in interface ISPSConnector
public void cleanup()
ISPSConnector
cleanup
in interface ISPSConnector
Copyright © 2016 Sensia Software LLC. All rights reserved.