VChan class - femanov/pycx4 GitHub Wiki
Inheritance chain: CdaObject -> BaseChan -> VChan
This class provides a vector channel. Instances of this class registers required cda events to track time/value of selected control system channel. You can get information about channel trough it's properties. All the properties are read-only. It's an error if you try to assign properties If you need a notifications use instance signals.
properties:
inherited:
int max_nelems
- max number of elements
cda_dataref_t ref
- cda channel's id
cxdtype_t dtype
- cx data type
str name
- channel name (not full)
object context
- context
int64 time
- server-provided time of last value, us from UNIX epoch
int64 prev_time
- server-provided time of previous value, us from UNIX epoch
size_t itemsize
- value size, bytes
self-defined:
np.ndarray val
- last-known value
Methods:
__cinit__(self, str name, object context=None, cxdtype_t dtype=CXDTYPE_DOUBLE, int max_nelems=1 )
__str__(self)
setValue(self, np.ndarray value)
- request to set channel value, value is casted to type you select on instantiation
Signals:
valueMeasured(self)
- emitted when new value arrived
valueChanged(self)
- not used yet
Signals can be Signal or pyqtSignal depending on what you use pycda or cda. sdchan don't inherit Qobject in qcda, encapsulation is used to bring pyqtSignals to channel-like classes. Instance that emitted a signal will be passed as only argument to connected functions.