Comment 6 for bug 1939568

Revision history for this message
Andrew Johnson (anj) wrote :

The Record Reference for the mbboDirect record is a bit contradictory about what the record should do, and the code doesn't do everything you might want either.

In the intro at the top it says "The mbboDirect record performs the opposite function to that of the mbbiDirect record. It accumulates bits (in the fields B0 - BF) as unsigned characters, and converts them to a word which is then written out to hardware." That description isn't really correct because in closed-loop mode the Bn fields are neither read from nor written to by process(), so they don't reflect the bits in the VAL field at all.

However the "Desired Output Parameters" section says: "The desired output can be written into the VAL field via dpPuts at run-time when the record is in supervisory mode." This describes the result of the change that Dirk is proposing. It's not particularly efficient since when dbPut() writes to VAL the new value gets round-tripped into the Bn fields by special() and back to VAL by process(), but doing anything else would probably get complicated.

Currently writing "supervisory" to OMSL sets the Bn fields from VAL and (since my 2012 changes) posts monitors on those Bn fields that change, but any timestamps that accompany those monitors will be from when the record last processed. Dirk's change extends that behavior to any writes to the VAL field while OMSL is supervisory; the Bn timestamps will still be from the last time the record processed, while the monitor which process() posts on the VAL field will have the new timestamp.

Do we want to make any other changes while we're fixing this record? I'm collecting edits in my base-3.15 tree and will merge that up to the 7.0 branch when we're done.