Class EpicsChannelPollerService
java.lang.Object
ch.psi.wica.controlsystem.epics.poller.EpicsChannelPollerService
A service which schedules the polling of user-specified EPICS channels of
interest, subsequently publishing the results of each poll operation to
interested consumers within the application.
-
Constructor Summary
ConstructorsConstructorDescriptionEpicsChannelPollerService
(EpicsChannelManager.EpicsPolledChannelManagerService epicsChannelManager, EpicsChannelPollerPublisher epicsChannelPollerPublisher) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the service.Returns the statistics associated with this service.void
startPolling
(EpicsChannelPollerRequest requestObject) Starts polling the EPICS control system channel according to the parameters in the supplied request object.void
stopPolling
(EpicsChannelPollerRequest requestObject) Stops polling the EPICS control system channel specified by the supplied request object.
-
Constructor Details
-
EpicsChannelPollerService
public EpicsChannelPollerService(@Autowired EpicsChannelManager.EpicsPolledChannelManagerService epicsChannelManager, @Autowired EpicsChannelPollerPublisher epicsChannelPollerPublisher) Constructs a new instance.- Parameters:
epicsChannelManager
- an object which can be used to get the channel.epicsChannelPollerPublisher
- an object which can be used to get the channel value.
-
-
Method Details
-
getStatistics
Returns the statistics associated with this service.- Returns:
- the statistics.
-
startPolling
Starts polling the EPICS control system channel according to the parameters in the supplied request object.The creation of the underlying EPICS poller is performed asynchronously so the invocation of this method does NOT incur the cost of a network round trip.
The EPICS channel may or may not be online when this method is invoked. The connection-state-change event will be published when the connection to the remote IOC is eventually established. Subsequently, the value-change event updates will be published on each periodic polling cycle to provide the latest value of the channel.
- Parameters:
requestObject
- the request specification object.- Throws:
NullPointerException
- if the 'requestObject' argument was null.IllegalStateException
- if this service was previously closed.IllegalStateException
- if the 'requestObject' was already active.
-
stopPolling
Stops polling the EPICS control system channel specified by the supplied request object.- Parameters:
requestObject
- the request specification object.- Throws:
NullPointerException
- if the 'requestObject' argument was null.IllegalStateException
- if this service was previously closed.IllegalStateException
- if the 'requestObject' was not recognised.
-
close
public void close()Closes the service.
-