Re: [udf-dlm-develop] A possible bug
Brought to you by:
esm
From: Ed S. <es...@la...> - 2000-01-24 22:04:42
|
Steve, I'm having a hard time understanding your note -- but that's because I don't really understand all the UDF "units" lingo. One thing you said, though, concerns me: >Two units are convenient for housekeeping, because I don't have to modify >Chris's unit definitions. The first unit (Chris's) isolates the >housekeeping byte. The second unit (which I added) multiplies >the byte by the appropriate scaling constant. Is it your intent to invoke convert_to_units(), with the first set of tables, then with the second? I don't think that's how it's supposed to work (but I'm not certain). My understanding is that a "unit" thingy is self-sufficient, and you can ask for unit "1" or "2", but not "1, then 2". In other words, if you're adding a table/ops thingy that converts telemetry units to volts, I think you need to include the first step (conversion to telemetry) in your units definition. Support for my belief comes from the MENA housekeeping PIDF (ImMnHkA), which lists duplicate units for some "sensors", e.g: s# name v# units -- ---- -- ----- 24 Min CPU Temp 15 1,6 ...and those units are defined as follows: # range labels tables / ops - ----- ------ ------------ 1 [ 0.0, 260.0 ] : Unitless : Telemetry : Raw 8,0 7,5 6 [ -55.0, 95.0 ] : Degrees C : Temperature : Temp 8,0,9 7,5,0 See how unit "6" duplicates the 8,0 and 7,5 "steps" of unit 1? Of course, I'm not really sure. I'm not sure about _anything_ with UDF. If I'm wrong, then please let me know, because this will affect every instrument! Also, here are some suggestions for things you can try: 1) Use my "fpidf.pl" script, included in the CVS repository. The PIDF file is an unreadable and unmaintainable abomination. My script tries to present it in a human-readable form. Perhaps it will be of help to you in defining your units. Although the output isn't labeled, since this is just my personal hack, it should be fairly easy to read if you're familiar with PIDF. 2) try putting some printf()s just before the main convert_to_units() call, something such as printf("convert_to_units: units=%d, Ntbls=%d\n", fh->units[sensor], pu[fh-> units[sensor]].NTbls); ...and see if you get what you expect. 3) If all else fails, could you mail me a copy of your PIDF? Please keep me posted. This could be a serious issue, if I'm wrong in my handling of units. Thanks, and best wishes, ^E |