Countable PV¶
This is the basic Python class to help in the use of simple pvs as counters.
Using EPICS-Countable PV class¶
Usage of Python Class
-
class
py4syn.epics.CountablePVClass.
CountablePV
(pvName, mnemonic)[source]¶ Class to add fake ICountable support for generic PV.
Examples
>>> from py4syn.epics.CountablePVClass import CountablePV >>> >>> myCountable = CountablePV('LNLS:ANEL:corrente','corrente') >>> myCountable.getValue() >>>
Constructor See
py4syn.epics.StandardDevice
Seepy4syn.epics.ICountable
Parameters: - pvName : string
PV name (Process Variable)
- mnemonic : string
Mnemonic
-
canMonitor
()[source]¶ Abstract method to check if the device can or cannot be used as monitor.
Returns: - out : bool
-
canStopCount
()[source]¶ Abstract method to check if the device can or cannot stop the count and return values.
Returns: - out : bool
-
getValue
(**kwargs)[source]¶ Get the current value of a countable device.
Parameters: - kwargs : value
Where needed informations can be passed, e.g. select which channel must be read.
Returns: - out : value
Returns the current value of the device. Type of the value depends on device settings.
-
isCounting
()[source]¶ Abstract method to check if the device is counting or not.
Returns: - out : bool
-
setCountTime
(t)[source]¶ Abstract method to set the count time of a countable target device.
Parameters: - t : value
The target count time to be set.
Returns: - out : None