Project

General

Profile

Support #22295

Some new Dawn VME crates have an extra field in the parameters read back

Added by Dennis Nicklaus 8 months ago. Updated 8 months ago.

Status:
Feedback
Priority:
Normal
Start date:
04/05/2019
Due date:
% Done:

0%

Estimated time:
Duration:

Description

As reported by Bobby Santucci, the readback string from the Dawn VME crates has changed to include an additional VAUX parameter in the reply string, which
breaks the sscanf parsing of the reply..

new sscanf input: (MBPM10)

Cmd=Q;Ans=V3=3336,V5=5131,V+12=12071,V12=12073,VAUX=00000,T1=35,T2=33,T3=32,T4=30,F1=02250,F2=02250,F3=02310,F4=02280,F5=02400,F6=02310,F7=00000,F8=00000,F9=00000

old sscanf input: (MBPM12)

Cmd=Q;Ans=V3=3374,V5=5059,V+12=12073,V12=12159,T1=31,T2=31,T3=30,T4=32,F1=01935,F2=01965,F3=01950,F4=02085,F5=02115,F6=02010,F7=00000,F8=00000,F9=00000

The old sscanf function call was

sscanf(bf, "V3=%d,V5=%d,V+12=%d,V12=%d,T1=%d,T2=%d,T3=%d,T4=%d,F1=%d,F2=%d,F3=%d,F4=%d,F5=%d,F6=%d,F7=%d,F8=%d,F9=%d",
       &an[0], &an[1], &an[2], &an[3], &an[4], &an[5], &an[6], &an[7], &an[8], &an[9], &an[10], &an[11], &an[12], &an[13],
       &an[14], &an[15], &an[16]);

History

#1 Updated by Dennis Nicklaus 8 months ago

  • Status changed from Assigned to Feedback

These crates are generally read through optilogic boxes, so the relevant code is in the CVS optilogic directory.
I made the necessary change in olserialcratedev.c and have tested it, booted into mcr03 with the mbpm10 optilogic. And it seems to work.
My changes overall were pretty innocuous and I would hope they otherwise wouldn't affect systems using this code that pick up my version. However...
I wanted to preserve the existing objects in their current state as they were last built by Charlie Briegel.
Here's what I did as an installation process: I increased the version number to 1.1 in optilogic's Makefile.
The optilogic objects get installed into $PRODUCTS_MODDIR/optilogic.
In all of the various MODDIR variations, version 1.0 was both the -beta and -latest. Since doing a "make promote" will over-write the current objects [shaggy dog story omitted], I rm-ed by hand all the $PRODUCTS_MODDIR/**/optilogic/*-beta* softlink files. Then I did a "make beta-install" with my 1.1 version (with the changes for this issue).

Now for the usage implications: grep tells me that all the involved front ends use the -latest version of the optilogic product, ol.out (and http.out). So the next time any of them are booted, they are going to pick up this new version that I built. That is a good thing, but we should be aware there is a potential for problems, and if needed, we can make them load the old 1.0 version.

NB: There is a vxworks_boot/fe/optilogic directory which was formerly used as the install destination for the optilogic objects. I don't think any current startup scripts reference that directory, though it is still seen in older versions or test versions of startup scripts.

So, this issue awaiting feedback on how this affects (hopefully not at all) other nodes that reboot with this new code.

#2 Updated by Richard Neswold 8 months ago

  • Description updated (diff)

Reformatted the sccanf example. Since it wasn't in a <pre> section, the array subscripts were getting formatted as footnotes.



Also available in: Atom PDF