Package gda.device.timer
Class DummyTfg
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.timer.DummyTfg
- All Implemented Interfaces:
Device,Timer,Configurable,Findable,gda.observable.IObservable
A timer class for the VME time frame generator card implemented using DA.Server
-
Field Summary
Fields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFrameSet(int frameCount, double requestedDeadTime, double requestedLiveTime) Create a single frameSet object for a specified live and dead time.voidaddFrameSet(int frameCount, double requestedDeadTime, double requestedLiveTime, int deadPort, int livePort, int deadPause, int livePause) Create a single frameSet object for a specified live and dead time.voidClear all current frameSetsvoidclose()Close and unconfigure the device.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.voidcont()voidcountAsync(double time) Initiates a single specified timing period and allows the timer to proceed asynchronously.getAttribute(String attributeName) Get the value of the specified attributeintReturns the current cycle number.intReturns the current frame number.intReturns the total number of frame pairs supported (each specifying a live and a dead period)intReturns the current state of the timer All timers must fully implement this.intvoidLoad an array of frameSets obtained from calls to makeFrameSet() are loaded into the timer.voidOutput data from timer directly to filevoidRe-initialisation of values and states.voidrestart()Restarts framing from the paused statevoidsetAttribute(String attributeName, Object value) Set any attribute the implementing classes may providevoidsetCycles(int cycles) sets the number of times the timer cycles through the framesets.voidZero the total cycle countvoidshutdown()Stop the runner threadvoidstart()For a time framing counter-timer, this initiates framing, starting from the current frame number (specified by setFrameNumber())voidstop()Aborts any current timing and returns it to an idle state.Methods inherited from class gda.device.DeviceBase
addIObserver, deleteIObserver, deleteIObservers, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setConfigureAtStartup, setName, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
isConfigured, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gda.factory.Configurable
isConfigureAtStartup, isConfiguredMethods inherited from interface gda.device.Device
getProtectionLevel, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObservers
-
Constructor Details
-
DummyTfg
public DummyTfg()
-
-
Method Details
-
configure
public void 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
-
reconfigure
public void reconfigure()Description copied from interface:ConfigurableRe-initialisation of values and states.Moved from Reconfigurable which has been deleted
- Specified by:
reconfigurein interfaceConfigurable- Overrides:
reconfigurein classConfigurableBase
-
close
public void close()Description copied from interface:DeviceClose and unconfigure the device.- Specified by:
closein interfaceDevice- Overrides:
closein classDeviceBase
-
getStatus
public int getStatus()Description copied from interface:TimerReturns the current state of the timer All timers must fully implement this. -
stop
public void stop()Description copied from interface:TimerAborts any current timing and returns it to an idle state. -
getMaximumFrames
public int getMaximumFrames()Description copied from interface:TimerReturns the total number of frame pairs supported (each specifying a live and a dead period)- Specified by:
getMaximumFramesin interfaceTimer- Returns:
- maximum number of time frames available
-
getTotalFrames
public int getTotalFrames()- Returns:
- the total number of frames
-
getCurrentFrame
public int getCurrentFrame()Description copied from interface:TimerReturns the current frame number.- Specified by:
getCurrentFramein interfaceTimer- Returns:
- the current frame counter number (1st=0)
-
getCurrentCycle
public int getCurrentCycle()Description copied from interface:TimerReturns the current cycle number. If not implemented this should return a default of 1.- Specified by:
getCurrentCyclein interfaceTimer- Returns:
- the current cycle number
-
setCycles
public void setCycles(int cycles) Description copied from interface:Timersets the number of times the timer cycles through the framesets. Default is 1 if h/w does not allow the implementation -
setTotalCyclesToZero
public void setTotalCyclesToZero()Zero the total cycle count -
start
public void start()Description copied from interface:TimerFor a time framing counter-timer, this initiates framing, starting from the current frame number (specified by setFrameNumber()) -
cont
public void cont() -
restart
public void restart()Description copied from interface:TimerRestarts framing from the paused state -
addFrameSet
public void addFrameSet(int frameCount, double requestedDeadTime, double requestedLiveTime) Create a single frameSet object for a specified live and dead time. A count for identical frames is specified by the frameCount. Create a single frameSet object for a specified live and dead time. A count for identical frames is specified by the frameCount.- Specified by:
addFrameSetin interfaceTimer- Parameters:
frameCount- the requested number of frames required of this typerequestedDeadTime- the requested frame dead time in millisecondsrequestedLiveTime- the requested frame live time in milliseconds- See Also:
-
addFrameSet
public void addFrameSet(int frameCount, double requestedDeadTime, double requestedLiveTime, int deadPort, int livePort, int deadPause, int livePause) Create a single frameSet object for a specified live and dead time. A count for identical frames is specified by the frameCount. Create a single frameSet object for a specified live and dead time. A count for identical frames is specified by the frameCount.- Specified by:
addFrameSetin interfaceTimer- Parameters:
frameCount- the requested number of frames required of this typerequestedDeadTime- the requested frame dead time in millisecondsrequestedLiveTime- the requested frame live time in millisecondsdeadPort- the wait period output level 0 or 1livePort- the run period output level 0 or 1deadPause- the pause before wait period 0 or 1livePause- the pause before run period 0 or 1- See Also:
-
clearFrameSets
public void clearFrameSets()Description copied from interface:TimerClear all current frameSets- Specified by:
clearFrameSetsin interfaceTimer
-
loadFrameSets
public void loadFrameSets()Description copied from interface:TimerLoad an array of frameSets obtained from calls to makeFrameSet() are loaded into the timer.- Specified by:
loadFrameSetsin interfaceTimer
-
countAsync
public void countAsync(double time) Initiates a single specified timing period and allows the timer to proceed asynchronously. The end of period can be determined by calls to getStatus() returning IDLE.- Specified by:
countAsyncin interfaceTimer- Parameters:
time- the requested counting time in milliseconds
-
output
Description copied from interface:TimerOutput data from timer directly to file -
setAttribute
Set any attribute the implementing classes may provide Set attribute values for "Ext-Start", "Ext-Inhibit", "VME-Start".- Specified by:
setAttributein interfaceDevice- Overrides:
setAttributein classDeviceBase- Parameters:
attributeName- the attribute name to set.value- the attribute value to set.- See Also:
-
getAttribute
Get the value of the specified attribute Get attribute values for "Ext-Start", "Ext-Inhibit".- Specified by:
getAttributein interfaceDevice- Overrides:
getAttributein classDeviceBase- Parameters:
attributeName- the attribute name to get.- Returns:
- the attribute
- See Also:
-
shutdown
public void shutdown()Stop the runner thread
-