Package gda.device
Interface CounterTimer
- All Superinterfaces:
Configurable,Detector,Device,Findable,gda.observable.IObservable,Scannable
- All Known Implementing Classes:
AceApdDetector,BufferedScaler,CallableTfgScalerWithLogValues,CallableTfgXmap,CallableTfgXspress2,CounterTimerBase,DummyCounterTimer,PositionStreamingTfgScaler,TFGCounterTimer,TfgEncoderCounter,TfgEpicsMCACounterTimer,TfgScaler,TfgScalerWithDarkCurrent,TfgScalerWithFrames,TfgScalerWithLogValues,TFGScalerWithRatio,TFGStruck,TFGTriggeredScaler,TfgXmap,TfgXspress2,TfgXspress2NoCorrection,TfgXspress2Raw
Interface for Detector classes which read their data from scalers (channels) driven by an external Timer object
(mainly the TFG card). The Timer interface has collections of timing periods known as FrameSets.
The methods in this interface are to allow those Detector objects to have the same FrameSets functionality provided in the Timer interface.
- See Also:
-
Field Summary
Fields inherited from interface gda.device.Scannable
ATTR_NEXUS_CATEGORY, ATTR_NX_CLASS, DEFAULT_INPUT_NAME, VALUE_UNAVAILABLE -
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.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).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.double[]readChannel(int startFrame, int frameCount, int channel) For a time framing counter-timer read out a specified channel, beginning from the specified start frame number using the requested frame count.double[]readFrame(int startChannel, int channelCount, int frame) For a time framing counter-timer read out a specified frame, beginning from the specified start channel number using the requested channel count.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) voidstart()For a time framing counter-timer this initiates framing.Methods inherited from interface gda.factory.Configurable
configure, isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.Detector
collectData, createsOwnFiles, endCollection, getCollectionTime, getDataDimensions, getDescription, getDetectorID, getDetectorType, getFileStructure, getStatus, 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, stop, toFormattedString
-
Method Details
-
getMaximumFrames
For a time framing counter-timer, this returns the total number of frame pairs supported (each specifying a live and a dead period).- Returns:
- maximum number of time frames available
- Throws:
DeviceException
-
getCurrentFrame
For a time framing counter-timer, this returns the current frame number pointer. During counting this can give an idea of progress.- Returns:
- the current frame counter number (1st=0)
- Throws:
DeviceException
-
getCurrentCycle
For 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.- Returns:
- the current cycle number
- Throws:
DeviceException
-
setCycles
For 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.- Parameters:
cycles- sets the cycle count to the specified number- Throws:
DeviceException
-
start
For a time framing counter-timer this initiates framing.- Throws:
DeviceException
-
restart
For a time framing counter-timer this restarts framing, from the paused state.- Throws:
DeviceException
-
addFrameSet
void addFrameSet(int frameCount, double requestedLiveTime, double requestedDeadTime) throws DeviceException For 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.- Parameters:
frameCount- number of frames required of this typerequestedLiveTime- frame live time in millisecondsrequestedDeadTime- frame dead time in milliseconds- Throws:
DeviceException
-
addFrameSet
void addFrameSet(int frameCount, double requestedLiveTime, double requestedDeadTime, int deadPort, int livePort, int deadPause, int livePause) throws DeviceException For 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.- 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
For a time framing counter-timer all current frameSets are cleared.- Throws:
DeviceException
-
loadFrameSets
For 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.- Throws:
DeviceException
-
readChannel
For a time framing counter-timer read out a specified channel, beginning from the specified start frame number using the requested frame count.- Parameters:
startFrame- starting frame number (1st=0)frameCount- number of frames to read the counter data out fromchannel- read this channel- Returns:
- array of requested readout counter-timer data
- Throws:
DeviceException
-
readFrame
For a time framing counter-timer read out a specified frame, beginning from the specified start channel number using the requested channel count.- Parameters:
startChannel- starting channel number (1st=0)channelCount- number of channels to read the counter data out fromframe- read this frame- Returns:
- array of requested readout counter-timer data
- Throws:
DeviceException
-
isSlave
If 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.- Returns:
- true if the underlying
- Throws:
DeviceException
-
setSlave
- Parameters:
slave-- Throws:
DeviceException
-