[Nut-upsdev] newhidups: new report system

Peter Selinger selinger at mathstat.dal.ca
Thu Nov 24 04:05:26 UTC 2005


Hi all,

I have created a branch "reportbuf" in the CVS repository, in which I
am experimenting with a new report retrieval system for newhidups.
The problem with the old system was that reports were always read into
fixed-size buffers; some UPS's would get upset if the buffer was too
large, others if the buffer was too small.

The new system actually looks at the report descriptor to figure out
the correct length of every report. 

I have also redesigned the report buffering system, so that all
reports are now remembered in memory for several seconds until they
expire. This can greatly reduce the necessary traffic between the
driver and the UPS. (The old system only remembered the last report
overall, rather than the last report of each report ID).

The code is useable, but I still need to iron out the odd bug here and
there. I have therefore put it into a separate branch for now. If it
stabilizes, I will merge it into the main Development branch.

See:
cvs diff -u -r reportbuf_base -r reportbuf

-- Peter





More information about the Nut-upsdev mailing list