event record device support broken with constant INP

Bug #1829770 reported by Andrew Johnson on 2019-05-20
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
EPICS Base
Status tracked in 7.0
3.15
Medium
Gabriel Fedel
7.0
Medium
Unassigned

Bug Description

Eric Norum reported:

------------------ 8< ---------------------

record(event, "$(P)$(R)reconn_") {
    field(DTYP, "Soft Channel")
    field(INP, "55")
  field(TPRO, "1")
}
record(fanout, "$(P)$(R)reconnWFR_") {
    field(SCAN, "Event")
    field(EVNT, "55")
  field(TPRO, "1")
}

When the “reconn_” record is processed, niether ”reconnWFR_” nor any other record with that SCAN setup gets triggered. It’s not enough to set INP=55 in the .db file, I must explicitly set VAL for it to work.

------------------ 8< ---------------------

The init_record() routine in devEventSoft.c (Base-3.15 branch) doesn't look right, I think it's missing a call to eventNameToHandle().

Andrew Johnson (anj) on 2019-11-01
tags: added: codeathon
Gabriel Fedel (fedel) wrote :

Hello EPICS Core Developers,

I would like to investigate this bug during the codeathon, Do you think is a good one to start?
I've never worked on epics base source code.

Best Regards

Gabriel Fedel

Andrew Johnson (anj) wrote :

Hi Gabriel,

I hadn't looked at the code for this before just now but Eric's assessment looks right to me and the change shouldn't need to be more than a few lines of C, so yes this would be a good starting point.

You will need to check out and build Base-3.15 and create a database for the softIoc that demonstrates the problem, then modify the device support code to fix it. Once it's working as expected you would commit your changes and push them to Launchpad, then generate a Merge Request against Base-3.15 for that fix.

Thanks, see you next week!

- Andrew

Gabriel Fedel (fedel) wrote :

Hi Andrew,

thank you very much for the answer.

See you next week!

Dirk Zimoch (dirk.zimoch) wrote :

Swapping the lines
    prec->epvt = eventNameToHandle(prec->val);
and
    if( (pdset=(struct eventdset *)(prec->dset)) && (pdset->init_record) )
  status=(*pdset->init_record)(prec);
should solve the problem.

Gabriel Fedel (fedel) wrote :

Thanks Dirk,

I will test this solution

Best Regards

Gabriel Fedel (fedel) wrote :

This bug doesn't apply to 7.0

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers