[Nut-upsdev] questions re. patching bcmxcp.c and choosing variable names

Arjen de Korte nut+devel at de-korte.org
Fri Apr 6 08:02:02 UTC 2007


Hi Oliver!

> I've patched bcmxcp.c such that it can power cycle the outlet load
> segments independently on a Powerware PW5125 UPS.  I presume that it will
> work for any XCP protocol UPS with 2 load segments.

Just to make sure I understand what this does, would this do the same as
sending

   load.off
   load.on

for just one output?

> Should these instant commands be called
> outlet.1.shutdown.return
> outlet.2.shutdown.return
> ?

Preferably not. This naming convention is too similar to 'shutdown.return'
which is totally different. I would prefer something like 'load.n.off',
'load.n.on' and 'load.n.cycle', assuming that you would also be able to
switch off one output.

> Where do the descriptions displayed by upscmd -l come from?  Presently it
> shows
>  outlet.1.shutdown.return - Unavailable
>  outlet.2.shutdown.return - Unavailable

This is described in docs/new-names.txt (which tells you that this is in
data/cmdvartab), which you really should have read first, before making up
new variables. It also tells you to contact the Development Team, which
you have done now.

> And just in case there is someone out there who has documentation of the
> XCP protocol.  What is the 4th byte of the 0x8A command for?  I tinkered
> with values until it worked, but it would be nice to know if sending 0x00
> means something unpleasant that hasn't yet become apparent...
>
> And since I'm so green that I don't know what a patch in diff -u format
> means, would someone be kind enough to explain how to submit this patch
> (or point me to a succinct description).

Usually, a 'diff -uN orignalfile.c modifiedfile.c' would yield something
useable. For other options, you may want to look at 'man diff'.

Best regards, Arjen
-- 
Eindhoven - The Netherlands
Key fingerprint - 66 4E 03 2C 9D B5 CB 9B  7A FE 7E C1 EE 88 BC 57




More information about the Nut-upsdev mailing list