2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-15 12:17:44 +00:00

Merge "Acknowledge PET alert on decode"

This commit is contained in:
Jenkins 2015-06-18 12:52:07 +00:00 committed by Gerrit Code Review
commit 20cbbf2470

View File

@ -447,6 +447,12 @@ class EventHandler(object):
sensorid = petdata[28]
event_data = petdata[31:34]
event = {}
seqnum = struct.unpack_from('>H', buffer(petdata[16:18]))
ltimestamp = struct.unpack_from('>I', buffer(petdata[18:22]))
petack = bytearray(struct.pack('<HIBBBBBB', seqnum, ltimestamp,
petdata[25], petdata[27], sensorid,
*event_data))
self.ipmicmd.xraw_command(netfn=4, command=0x17, data=petack)
self._populate_event(deassertion, event, event_data, event_type,
sensor_type, sensorid)
return event