Closed exzombie closed 3 months ago
Correction, the record $(user):random2
is processed, but VAL remains unchanged. The change ends up in RVAL and is not propagated to VAL and B0-B1F.
It appears that the same block of code that sets RVAL also then sets VAL. https://github.com/epics-modules/asyn/blob/33a66b58732521ee176b28dfeb9ebc1e2e985e47/asyn/devEpics/devAsynUInt32Digital.c#L1088
Can you add some debugging there to see why VAL is not changing?
What happens there is that RVAL is set from the callback result, then VAL is set, bit by bit, based on values of B1-B1F. RVAL is not considered, and bits are zero, so VAL stays at zero. Given that this piece of code is intended specifically for handling callbacks, that should be turned around, no? VAL should be set from RVAL (after a shift), and B1-B1F should be set from VAL.
With the database below, combined with a driver that periodically calls
setUIntDigitalParam()
andcallParamCallbacks()
for theRANDOM
reason, the first record is processed, while the second is not. If it's relevant, I tried setting bothvalueMask
andinterruptMask
parameters tosetUIntDigitalParam()
to0xffff
.