pyepics / epicsapps

Epics Applications using PyEpics
http://pyepics.github.io/epicsapps/
Other
17 stars 10 forks source link

Creating PV on uninitialized waveform record fails in ca.py #10

Closed rokstefanic closed 11 years ago

rokstefanic commented 11 years ago

Set-up:

Issue description:

When creating a PV as the following: pv1= PV(pvname = 'WF_SP', callback = onChanges, auto_monitor=True, form='ctrl');

The following error is reported and callback is not called: Traceback (most recent call last): File "_ctypes/callbacks.c", line 314, in 'calling callback function' File "/usr/local/lib/python2.7/dist-packages/pyepics-3.2.1-py2.7.egg/epics/ca.py", line 436, in _onMonitorEvent tmpv = value[0] IndexError: invalid index

This means that callback should be called with no value(?) and count set to 0(?), but one could still use other information from other callback arguments and kwargs.

The same issue does not happen when this is done on an uninitialized longout record (I guess this is true also for other types)

Best Regards, Rok

rokstefanic commented 11 years ago

I am sorry for mixing the repo - the issue was meant for pyepics repository and not epicapp.

I am sorry again.