SensorType
- Type of parent sensorpublic abstract class AbstractSensorControl<SensorType extends ISensorModule<?>> extends Object implements ISensorControlInterface
Default implementation of common sensor control interface API methods. By default, async exec, scheduling and status history are reported as unsupported.
Modifier and Type | Field and Description |
---|---|
protected static String |
ERROR_NO_ASYNC |
protected static String |
ERROR_NO_SCHED |
protected static String |
ERROR_NO_STATUS_HISTORY |
protected IEventHandler |
eventHandler |
protected SensorType |
parentSensor |
Constructor and Description |
---|
AbstractSensorControl(SensorType parentSensor) |
Modifier and Type | Method and Description |
---|---|
CommandStatus |
cancelCommand(String commandID)
Cancels a command before it is executed (for async or scheduled commands)
|
CommandStatus |
execCommandGroup(List<net.opengis.swe.v20.DataBlock> commands)
Executes multiple commands synchronously and in the order specified.
|
CommandStatus |
getCommandStatus(String commandID)
Retrieves command status
|
List<CommandStatus> |
getCommandStatusHistory(String commandID)
Gets complete status history for the specified command
|
ISensorModule<?> |
getParentSensor()
Allows by-reference access to parent sensor interface
|
boolean |
isAsyncExecSupported()
Checks asynchronous execution capability
|
boolean |
isEnabled()
Checks if this interface is enabled
|
boolean |
isSchedulingSupported()
Checks scheduled execution capability
|
boolean |
isStatusHistorySupported()
Checks status history capability
|
void |
registerListener(IEventListener listener)
Registers a listener with this event producer.
|
CommandStatus |
scheduleCommand(net.opengis.swe.v20.DataBlock command,
org.vast.util.DateTime execTime)
Schedules a command to be executed asynchronously at the specified time
|
CommandStatus |
scheduleCommandGroup(List<net.opengis.swe.v20.DataBlock> commands,
org.vast.util.DateTime execTime)
Schedules a group of commands to be executed asynchronously at the specified time.
|
CommandStatus |
sendCommand(net.opengis.swe.v20.DataBlock command)
Sends a command that will be executed asynchronously
|
CommandStatus |
sendCommandGroup(List<net.opengis.swe.v20.DataBlock> commands)
Sends a group of commands for asynchronous execution.
|
void |
unregisterListener(IEventListener listener)
Unregisters a listener from this event producer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execCommand, getCommandDescription, getName
protected static String ERROR_NO_ASYNC
protected static String ERROR_NO_SCHED
protected static String ERROR_NO_STATUS_HISTORY
protected SensorType extends ISensorModule<?> parentSensor
protected IEventHandler eventHandler
public AbstractSensorControl(SensorType parentSensor)
public ISensorModule<?> getParentSensor()
ISensorControlInterface
getParentSensor
in interface ISensorControlInterface
public boolean isEnabled()
ISensorControlInterface
isEnabled
in interface ISensorControlInterface
public CommandStatus execCommandGroup(List<net.opengis.swe.v20.DataBlock> commands) throws SensorException
ISensorControlInterface
execCommandGroup
in interface ISensorControlInterface
commands
- list of command messages dataSensorException
public boolean isAsyncExecSupported()
ISensorControlInterface
isAsyncExecSupported
in interface ISensorControlInterface
public boolean isSchedulingSupported()
ISensorControlInterface
isSchedulingSupported
in interface ISensorControlInterface
public boolean isStatusHistorySupported()
ISensorControlInterface
isStatusHistorySupported
in interface ISensorControlInterface
public CommandStatus sendCommand(net.opengis.swe.v20.DataBlock command) throws SensorException
ISensorControlInterface
sendCommand
in interface ISensorControlInterface
command
- command message dataSensorException
ISensorControlInterface.isAsyncExecSupported()
public CommandStatus sendCommandGroup(List<net.opengis.swe.v20.DataBlock> commands) throws SensorException
ISensorControlInterface
sendCommandGroup
in interface ISensorControlInterface
commands
- list of command messages dataSensorException
ISensorControlInterface.isAsyncExecSupported()
public CommandStatus scheduleCommand(net.opengis.swe.v20.DataBlock command, org.vast.util.DateTime execTime) throws SensorException
ISensorControlInterface
scheduleCommand
in interface ISensorControlInterface
command
- command message dataexecTime
- desired time of executionSensorException
ISensorControlInterface.isSchedulingSupported()
public CommandStatus scheduleCommandGroup(List<net.opengis.swe.v20.DataBlock> commands, org.vast.util.DateTime execTime) throws SensorException
ISensorControlInterface
scheduleCommandGroup
in interface ISensorControlInterface
SensorException
ISensorControlInterface.isSchedulingSupported()
public CommandStatus cancelCommand(String commandID) throws SensorException
ISensorControlInterface
cancelCommand
in interface ISensorControlInterface
commandID
- id of command to be canceledSensorException
ISensorControlInterface.isAsyncExecSupported()
public CommandStatus getCommandStatus(String commandID) throws SensorException
ISensorControlInterface
getCommandStatus
in interface ISensorControlInterface
commandID
- id of command to get status forSensorException
ISensorControlInterface.isAsyncExecSupported()
public List<CommandStatus> getCommandStatusHistory(String commandID) throws SensorException
ISensorControlInterface
getCommandStatusHistory
in interface ISensorControlInterface
commandID
- id of command to get status history forSensorException
ISensorControlInterface.isStatusHistorySupported()
public void registerListener(IEventListener listener)
IEventProducer
registerListener
in interface IEventProducer
public void unregisterListener(IEventListener listener)
IEventProducer
unregisterListener
in interface IEventProducer
Copyright © 2015 Sensia Software LLC. All rights reserved.