[Nut-upsdev] [nut-commits] svn commit r1210 - in trunk: . drivers
Arjen de Korte
nut+devel at de-korte.org
Fri Jan 4 08:08:06 UTC 2008
>> It looks like (but correct me if I'm wrong) that reports for which the
>> HID path ends in 0x00000000 are placeholders only.
>
> I agree with the rest of your logic about complexity, but they are
> less like placeholders, and more like bugs in the parser.
Looking at the output from the Tripplite UPS I wrote about lately, this
doesn't seem to be due to a bug in the parser.
Path: UPS.PowerSummary.RunTimeToEmpty, Type: Feature, ReportID: 0x35,
Offset: 0, Size: 16, Value: 2379.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Input, ReportID:
0x32, Offset: 0, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Input, ReportID:
0x32, Offset: 1, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Input, ReportID:
0x32, Offset: 2, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Input, ReportID:
0x32, Offset: 3, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Input, ReportID:
0x32, Offset: 4, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Input, ReportID:
0x32, Offset: 5, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Input, ReportID:
0x32, Offset: 6, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.InternalFailure, Type: Input,
ReportID: 0x32, Offset: 7, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Input, ReportID:
0x32, Offset: 8, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.ShutdownImminent, Type: Input,
ReportID: 0x32, Offset: 9, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Input, ReportID:
0x32, Offset: 10, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Input, ReportID:
0x32, Offset: 11, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Input, ReportID:
0x32, Offset: 12, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Input, ReportID:
0x32, Offset: 13, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Input, ReportID:
0x32, Offset: 14, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Input, ReportID:
0x32, Offset: 15, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Input, ReportID:
0x32, Offset: 16, Size: 1, Value: 1.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Input, ReportID:
0x32, Offset: 17, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type:
Input, ReportID: 0x32, Offset: 18, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.FullyCharged, Type: Input,
ReportID: 0x32, Offset: 19, Size: 1, Value: 1.000000
Path: UPS.PowerSummary.PresentStatus.Charging, Type: Input, ReportID:
0x32, Offset: 20, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Input, ReportID:
0x32, Offset: 21, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.FullyDischarged, Type: Input,
ReportID: 0x32, Offset: 22, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.NeedReplacement, Type: Input,
ReportID: 0x32, Offset: 23, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Feature, ReportID:
0x32, Offset: 0, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Feature, ReportID:
0x32, Offset: 1, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Feature, ReportID:
0x32, Offset: 2, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Feature, ReportID:
0x32, Offset: 3, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Feature, ReportID:
0x32, Offset: 4, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Feature, ReportID:
0x32, Offset: 5, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Feature, ReportID:
0x32, Offset: 6, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.InternalFailure, Type: Feature,
ReportID: 0x32, Offset: 7, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Feature, ReportID:
0x32, Offset: 8, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.ShutdownImminent, Type: Feature,
ReportID: 0x32, Offset: 9, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Feature, ReportID:
0x32, Offset: 10, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Feature, ReportID:
0x32, Offset: 11, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Feature, ReportID:
0x32, Offset: 12, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Feature, ReportID:
0x32, Offset: 13, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Feature, ReportID:
0x32, Offset: 14, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Feature, ReportID:
0x32, Offset: 15, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, ReportID:
0x32, Offset: 16, Size: 1, Value: 1.000000
Path: UPS.PowerSummary.PresentStatus.00000000, Type: Feature, ReportID:
0x32, Offset: 17, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type:
Feature, ReportID: 0x32, Offset: 18, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.FullyCharged, Type: Feature,
ReportID: 0x32, Offset: 19, Size: 1, Value: 1.000000
Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, ReportID:
0x32, Offset: 20, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Feature,
ReportID: 0x32, Offset: 21, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.FullyDischarged, Type: Feature,
ReportID: 0x32, Offset: 22, Size: 1, Value: 0.000000
Path: UPS.PowerSummary.PresentStatus.NeedReplacement, Type: Feature,
ReportID: 0x32, Offset: 23, Size: 1, Value: 0.000000
Path: UPS.BatterySystem.Battery.ConfigVoltage, Type: Feature, ReportID:
0x04, Offset: 0, Size: 16, Value: 48.000000
I think that the UPS is trying to tell us the following. Peter Selinger
already figured out many of these about a year ago (for the same device),
I added some missing ones:
byte 0, bit 0-6: unused
byte 0, bit 7: UPS.PowerSummary.PresentStatus.InternalFailure
byte 1, bit 0: unused
byte 1, bit 1: UPS.PowerSummary.PresentStatus.ShutdownImminent
byte 1, bit 2-7: unused
byte 2, bit 0: UPS.PowerSummary.PresentStatus.ACPresent
byte 2, bit 1: unused
byte 2, bit 2: UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit
byte 2, bit 3: UPS.PowerSummary.PresentStatus.FullyCharged
byte 2, bit 4: UPS.PowerSummary.PresentStatus.Charging
byte 2, bit 5: UPS.PowerSummary.PresentStatus.Discharging
byte 2, bit 6: UPS.PowerSummary.PresentStatus.FullyDischarged
byte 2, bit 7: UPS.PowerSummary.PresentStatus.NeedReplacement
So it may be a good idea after all to disregard HID paths that end in
0x00000000, even if the hidparser would be fixed. Although it would be
nice to get a confirmation that this is indeed to be interpreted as
'unused'.
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