def _populate_event(self, deassertion, event, event_data, event_type,
                        sensor_type, sensorid):
        event['component_id'] = sensorid
        try:
            event['component'] = self._sdr.sensors[sensorid].name
        except __HOLE__:
            if sensorid == 0:
                event['component'] = None
            else:
                event['component'] = 'Sensor {0}'.format(sensorid)
        event['deassertion'] = deassertion
        event['event_data_bytes'] = event_data
        byte2type = (event_data[0] & 0b11000000) >> 6
        byte3type = (event_data[0] & 0b110000) >> 4
        if byte2type == 1:
            event['triggered_value'] = event_data[1]
        evtoffset = event_data[0] & 0b1111
        event['event_type_byte'] = event_type
        if event_type <= 0xc:
            event['component_type_id'] = sensor_type
            event['event_id'] = '{0}.{1}'.format(event_type, evtoffset)
            # use generic offset decode for event description
            event['component_type'] = ipmiconst.sensor_type_codes.get(
                sensor_type, '')
            evreading = ipmiconst.generic_type_offsets.get(
                event_type, {}).get(evtoffset, {})
            if event['deassertion']:
                event['event'] = evreading.get('deassertion_desc', '')
                event['severity'] = evreading.get(
                    'deassertion_severity', pygconst.Health.Ok)
            else:
                event['event'] = evreading.get('desc', '')
                event['severity'] = evreading.get(
                    'severity', pygconst.Health.Ok)
        elif event_type == 0x6f:
            event['component_type_id'] = sensor_type
            event['event_id'] = '{0}.{1}'.format(event_type, evtoffset)
            event['component_type'] = ipmiconst.sensor_type_codes.get(
                sensor_type, '')
            evreading = ipmiconst.sensor_type_offsets.get(
                sensor_type, {}).get(evtoffset, {})
            if event['deassertion']:
                event['event'] = evreading.get('deassertion_desc', '')
                event['severity'] = evreading.get(
                    'deassertion_severity', pygconst.Health.Ok)
            else:
                event['event'] = evreading.get('desc', '')
                event['severity'] = evreading.get(
                    'severity', pygconst.Health.Ok)
        if event_type == 1:  # threshold
            if byte3type == 1:
                event['threshold_value'] = event_data[2]
        if 3 in (byte2type, byte3type) or event_type == 0x6f:
            # sensor specific decode, see sdr module...
            # 2 - 0xc: generic discrete, 0x6f, sensor specific
            additionaldata = decode_eventdata(
                sensor_type, evtoffset, event_data, self._sdr)
            if additionaldata:
                event['event_data'] = additionaldata
dataset/ETHPy150Open openstack/pyghmi/pyghmi/ipmi/events.py/EventHandler._populate_event