private EventData ExtractSystemEventRecordMessage(byte sensorType, byte eventTypeCode, byte[] payload)
        {
            // [IPMI 2.0 Tbl: 42.1] Event Type Code determines the
            // system event log event message type.
            if (eventTypeCode == 0x01) // Threshold
            {
                ThresholdEvent eventDataField =
                    new ThresholdEvent(EventLogMsgType.Threshold, sensorType, eventTypeCode, payload);

                return(eventDataField);
            }
            else if ((eventTypeCode >= 0x02) && (eventTypeCode <= 0x0C)) // Generic
            {
                DiscreteEvent eventDataField =
                    new DiscreteEvent(EventLogMsgType.Discrete, sensorType, eventTypeCode, payload);

                return(eventDataField);
            }
            else if (eventTypeCode == 0x6f) // Sensor - Specific
            {
                DiscreteEvent eventDataField =
                    new DiscreteEvent(EventLogMsgType.SensorSpecific, sensorType, eventTypeCode, payload);

                return(eventDataField);
            }
            else if ((eventTypeCode >= 0x70) && (eventTypeCode <= 0x7F)) // OEM
            {
                OemEvent eventDataField =
                    new OemEvent(EventLogMsgType.Oem, sensorType, eventTypeCode, payload);

                return(eventDataField);
            }
            else // Unknown Event Type Code
            {
                UnknownEvent eventDataField =
                    new UnknownEvent(EventLogMsgType.Unspecified, sensorType, eventTypeCode, payload);

                return(eventDataField);
            }
        }
        private EventData ExtractSystemEventRecordMessage(byte sensorType, byte eventTypeCode, byte[] payload)
        {
            // [IPMI 2.0 Tbl: 42.1] Event Type Code determines the
            // system event log event message type.
            if (eventTypeCode == 0x01) // Threshold
            {
                ThresholdEvent eventDataField =
                    new ThresholdEvent(EventLogMsgType.Threshold, sensorType, eventTypeCode, payload);

                return eventDataField;
            }
            else if ((eventTypeCode >= 0x02) && (eventTypeCode <= 0x0C)) // Generic
            {
                DiscreteEvent eventDataField =
                        new DiscreteEvent(EventLogMsgType.Discrete, sensorType, eventTypeCode, payload);

                return eventDataField;
            }
            else if (eventTypeCode == 0x6f) // Sensor - Specific
            {
                DiscreteEvent eventDataField =
                    new DiscreteEvent(EventLogMsgType.SensorSpecific, sensorType, eventTypeCode, payload);

                return eventDataField;
            }
            else if ((eventTypeCode >= 0x70) && (eventTypeCode <= 0x7F)) // OEM
            {
                OemEvent eventDataField =
                    new OemEvent(EventLogMsgType.Oem, sensorType, eventTypeCode, payload);

                return eventDataField;
            }
            else // Unknown Event Type Code
            {
                UnknownEvent eventDataField =
                    new UnknownEvent(EventLogMsgType.Unspecified, sensorType, eventTypeCode, payload);

                return eventDataField;
            }
        }