pcdsdevices.signal.PytmcSignal
- class pcdsdevices.signal.PytmcSignal(prefix, io=None, **kwargs)
- Class for a connection to a pytmc-generated EPICS record. - This uses the same args as the pragma, so you can refer to the pytmc pragmas to select args for your components. This will automatically append the ‘_RBV’ suffix and wrap the read/write PVs into the same signal object as appropriate, and pick between a read-only signal and a writable one. - Under the hood this actually gives you the RW or RO version of the signal depending on your io argument. - Methods - describe()
- Return the description as a dictionary - Returns:
- dict – Dictionary of name and formatted description string 
 
 - get(*, count=None, as_string=None, timeout=<object object>, connection_timeout=<object object>, form='time', use_monitor=None, **kwargs)
- Get the readback value through an explicit call to EPICS. - Parameters:
- count (int, optional) – Explicitly limit count for array data 
- as_string (bool, optional) – Get a string representation of the value, defaults to as_string from this signal, optional 
- as_numpy (bool) – Use numpy array as the return type for array data. 
- timeout (float, optional) – maximum time to wait for value to be received. (default = 0.5 + log10(count) seconds) 
- use_monitor (bool, optional) – to use value from latest monitor callback or to make an explicit CA call for the value. (default: True) 
- connection_timeout (float, optional) – If not already connected, allow up to - connection_timeoutseconds for the connection to complete.
- form ({'time', 'ctrl'}) – PV form to request 
 
 
 - read()
- Put the status of the signal into a simple dictionary format for data acquisition - Returns:
- dict 
 
 - read_configuration()
- Dictionary mapping names to value dicts with keys: value, timestamp 
 - set(value, *, timeout=None, settle_time=None, **kwargs)
- Set the value of the Signal and return a Status object. - Returns:
- st (Status) – This status object will be finished upon return in the case of basic soft Signals 
 
 - classmethod set_default_timeout(**kwargs)
 - classmethod set_defaults(*, timeout=2.0, connection_timeout=1.0, write_timeout=None, auto_monitor=False)
- Set class-wide defaults for EPICS CA communications - This may be called only before any instances of EpicsSignalBase are made. - This setting applies to the class it is called on and all its subclasses. For example, - >>> EpicsSignalBase.set_defaults(...) - will apply to - EpicsSignalROand- EpicsSignal, which are both subclasses of- EpicsSignalBase.- but - >>> EpicsSignal.set_defaults(...) - will not apply to - EpicsSignalRO.- Parameters:
- auto_monitor (bool, optional) – If - True, update cached value from EPICS CA monitor callbacks. If- False, request new value from EPICS each time get() is called.
- connection_timeout (float, optional) – Time (seconds) allocated for establishing a connection with the IOC. 
- timeout (float, optional) – Total time budget (seconds) for reading, not including connection time. 
- write_timeout (float, optional) – Time (seconds) allocated for writing, not including connection time. The write_timeout is very different than the connection and read timeouts above. It relates to how long an action takes to complete. Any default value we choose here is likely to cause problems—either by being too short and giving up too early on a lengthy action or being too long and delaying the report of a failure. The default, None, waits forever. 
 
- Raises:
- RuntimeError – If called after - EpicsSignalBasehas been instantiated for the first time.
 
 - trigger()
- Call that is used by bluesky prior to read() 
 - Attributes - SUB_META = 'meta'
 - alarm_severity
- PV alarm severity 
 - alarm_status
- PV status 
 - as_string
- Attempt to cast the EPICS PV value to a string by default 
 - connected
- Is the signal connected to its associated hardware, and ready to use? 
 - connection_timeout
 - enum_strs
- List of strings if PV is an enum type 
 - high_limit
- The high, inclusive control limit for the Signal 
 - hints
- Field hints for plotting 
 - kind
 - limits
- The PV control limits (low, high), such that low <= value <= high 
 - low_limit
- The low, inclusive control limit for the Signal 
 - metadata
- A copy of the metadata dictionary associated with the signal 
 - metadata_keys
- Metadata keys that will be passed along on value subscriptions 
 - precision
- The precision of the read PV, as reported by EPICS 
 - pvname
- The readback PV name 
 - read_access
- Can the signal be read? 
 - source_name
 - timeout
 - timestamp
- Timestamp of readback PV, according to EPICS 
 - tolerance
- The absolute tolerance associated with the value. 
 - value
- The signal’s value 
 - write_access
- Can the signal be written to? 
 - write_timeout