Package gda.device.detector.countertimer
Class CounterTimerBase
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.detector.DetectorBase
gda.device.detector.countertimer.CounterTimerBase
- All Implemented Interfaces:
CounterTimer,Detector,Device,Scannable,Configurable,Findable,gda.observable.IObservable,Serializable
- Direct Known Subclasses:
TFGCounterTimer
- See Also:
-
Field Summary
FieldsFields inherited from class gda.device.detector.DetectorBase
collectionTimeFields inherited from class gda.device.scannable.ScannableBase
__doc__, DEFAULT_INPUT_NAME, DEFAULT_OUTPUT_FORMAT, extraNames, inputNames, level, outputFormatFields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTYFields inherited from interface gda.device.Scannable
ATTR_NEXUS_CATEGORY, ATTR_NX_CLASS, DEFAULT_INPUT_NAME, VALUE_UNAVAILABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFrameSet(int frameCount, double requestedLiveTime, double requestedDeadTime) For a time framing counter-timer a single frameSet object is created for a specified live and dead time.voidaddFrameSet(int frameCount, double requestedLiveTime, double requestedDeadTime, int deadPort, int livePort, int deadPause, int livePause) For a time framing counter-timer a single frameSet object is created for a specified live and dead time.voidFor a time framing counter-timer all current frameSets are cleared.voidDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.intFor a time framing counter-timer, this returns the current cycle number.intFor a time framing counter-timer, this returns the current frame number pointer.intFor a time framing counter-timer, this returns the total number of frame pairs supported (each specifying a live and a dead period).intReturns the current collecting state of the device.getTimer()booleanisSlave()If there are multiple detectors in the same scan operated by the same Timer then only one CounterTimer object should drive the Timer class.voidFor a time framing counter-timer an array of frameSets obtained from calls to makeFrameSet() is loaded into the counter-timer.voidrestart()For a time framing counter-timer this restarts framing, from the paused state.voidsetCycles(int cycles) For a time framing counter-timer this sets the number of times the counter-timer cycles through the framesets.voidsetSlave(boolean slave) voidvoidsetTimerName(String tfgName) voidstart()For a time framing counter-timer this initiates framing.voidstop()Stop the current move/operation.Methods inherited from class gda.device.detector.DetectorBase
asynchronousMoveTo, checkPositionValid, endCollection, getCollectionTime, getDataDimensions, getDescription, getDetectorID, getDetectorType, getPosition, isBusy, prepareForCollection, setCollectionTime, toFormattedStringMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, externalToInternal, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, internalToExternal, isAt, moveTo, rawAsynchronousMoveTo, rawGetPosition, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, throwExceptionIfInvalidTarget, toString, validateScannable, valueUnavailableString, waitWhileBusy, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getAttribute, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setAttribute, setConfigureAtStartup, setName, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
isConfigured, reconfigure, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gda.factory.Configurable
isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.CounterTimer
readChannel, readFrameMethods inherited from interface gda.device.Detector
collectData, createsOwnFiles, endCollection, getCollectionTime, getDataDimensions, getDescription, getDetectorID, getDetectorType, getFileStructure, prepareForCollection, readout, setCollectionTime, waitWhileBusyMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObserversMethods inherited from interface gda.device.Scannable
asynchronousMoveTo, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, checkPositionValid, getExtraNames, getInputNames, getLevel, getOutputFormat, getPosition, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, isBusy, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, toFormattedString
-
Field Details
-
slave
protected boolean slave -
timer
-
-
Constructor Details
-
CounterTimerBase
public CounterTimerBase()
-
-
Method Details
-
configure
Description copied from class:ConfigurableBaseDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classConfigurableBase- Throws:
FactoryException- if there is an error in configuration e.g. required variable not set or cannot connect to device
-
isSlave
public boolean isSlave()Description copied from interface:CounterTimerIf there are multiple detectors in the same scan operated by the same Timer then only one CounterTimer object should drive the Timer class. In that case the other CounterTimers should have their slave flag set to true.- Specified by:
isSlavein interfaceCounterTimer- Returns:
- true if the underlying
-
setSlave
public void setSlave(boolean slave) - Specified by:
setSlavein interfaceCounterTimer- Parameters:
slave-
-
getMaximumFrames
Description copied from interface:CounterTimerFor a time framing counter-timer, this returns the total number of frame pairs supported (each specifying a live and a dead period).- Specified by:
getMaximumFramesin interfaceCounterTimer- Returns:
- maximum number of time frames available
- Throws:
DeviceException
-
getCurrentFrame
Description copied from interface:CounterTimerFor a time framing counter-timer, this returns the current frame number pointer. During counting this can give an idea of progress.- Specified by:
getCurrentFramein interfaceCounterTimer- Returns:
- the current frame counter number (1st=0)
- Throws:
DeviceException
-
getCurrentCycle
Description copied from interface:CounterTimerFor a time framing counter-timer, this returns the current cycle number. During counting this can give an idea of progress. If not implemented this should return a default of 1.- Specified by:
getCurrentCyclein interfaceCounterTimer- Returns:
- the current cycle number
- Throws:
DeviceException
-
setCycles
Description copied from interface:CounterTimerFor a time framing counter-timer this sets the number of times the counter-timer cycles through the framesets. Default is 1 if h/w does not allow the implementation.- Specified by:
setCyclesin interfaceCounterTimer- Parameters:
cycles- sets the cycle count to the specified number- Throws:
DeviceException
-
addFrameSet
public void addFrameSet(int frameCount, double requestedLiveTime, double requestedDeadTime) throws DeviceException Description copied from interface:CounterTimerFor a time framing counter-timer a single frameSet object is created for a specified live and dead time. A count for identical frames is specified by the frameCount.- Specified by:
addFrameSetin interfaceCounterTimer- Parameters:
frameCount- number of frames required of this typerequestedLiveTime- frame live time in millisecondsrequestedDeadTime- frame dead time in milliseconds- Throws:
DeviceException
-
addFrameSet
public void addFrameSet(int frameCount, double requestedLiveTime, double requestedDeadTime, int deadPort, int livePort, int deadPause, int livePause) throws DeviceException Description copied from interface:CounterTimerFor a time framing counter-timer a single frameSet object is created for a specified live and dead time. A count for identical frames is specified by the frameCount.- Specified by:
addFrameSetin interfaceCounterTimer- Parameters:
frameCount- requested number of frames required of this typerequestedLiveTime- requested frame live time in millisecondsrequestedDeadTime- requested frame dead time in millisecondsdeadPort- wait period output level 0 or 1livePort- run period output level 0 or 1deadPause- pause before wait period 0 or 1livePause- pause before run period 0 or 1- Throws:
DeviceException
-
clearFrameSets
Description copied from interface:CounterTimerFor a time framing counter-timer all current frameSets are cleared.- Specified by:
clearFrameSetsin interfaceCounterTimer- Throws:
DeviceException
-
loadFrameSets
Description copied from interface:CounterTimerFor a time framing counter-timer an array of frameSets obtained from calls to makeFrameSet() is loaded into the counter-timer. The current mode specified in setMode() is used to create the real frames before actual loading to the timer.- Specified by:
loadFrameSetsin interfaceCounterTimer- Throws:
DeviceException
-
restart
Description copied from interface:CounterTimerFor a time framing counter-timer this restarts framing, from the paused state.- Specified by:
restartin interfaceCounterTimer- Throws:
DeviceException
-
start
Description copied from interface:CounterTimerFor a time framing counter-timer this initiates framing.- Specified by:
startin interfaceCounterTimer- Throws:
DeviceException
-
stop
Description copied from class:ScannableBaseStop the current move/operation. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
stopin interfaceScannable- Overrides:
stopin classScannableBase- Throws:
DeviceException- See Also:
-
getStatus
Description copied from interface:DetectorReturns the current collecting state of the device.- Specified by:
getStatusin interfaceDetector- Returns:
- BUSY if the detector has not finished the requested operation(s), IDLE if in an completely idle state and STANDBY if temporarily suspended.
- Throws:
DeviceException- See Also:
-
setTimerName
-
getTimerName
-
getTimer
-
setTimer
-