sdr: Use registerHandler instead of ipmi_register_callback

Since ipmi_register_callback declared in api.h has been gradually
deprecated, this submission is to use registerHandler instead of
ipmi_register_callback.

Change-Id: I0adfcd6c0e41daafe2d81918a527925997f96585
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
diff --git a/dbus-sdr/sensorcommands.cpp b/dbus-sdr/sensorcommands.cpp
index 06d039a..c6a167f 100644
--- a/dbus-sdr/sensorcommands.cpp
+++ b/dbus-sdr/sensorcommands.cpp
@@ -695,8 +695,7 @@
         {
             return GENERAL_ERROR;
         }
-        data.header.record_id_msb = recordID >> 8;
-        data.header.record_id_lsb = recordID & 0xFF;
+        data.header.recordId = recordID;
         recordData.insert(recordData.end(), reinterpret_cast<uint8_t*>(&data),
                           reinterpret_cast<uint8_t*>(&data) + sizeof(data));
     }
@@ -1778,12 +1777,10 @@
 void constructSensorSdrHeaderKey(uint16_t sensorNum, uint16_t recordID,
                                  get_sdr::SensorDataFullRecord& record)
 {
-    get_sdr::header::set_record_id(
-        recordID, reinterpret_cast<get_sdr::SensorDataRecordHeader*>(&record));
-
     uint8_t sensornumber = static_cast<uint8_t>(sensorNum);
     uint8_t lun = static_cast<uint8_t>(sensorNum >> 8);
 
+    record.header.recordId = recordID;
     record.header.sdr_version = ipmiSdrVersion;
     record.header.record_type = get_sdr::SENSOR_DATA_FULL_RECORD;
     record.header.record_length = sizeof(get_sdr::SensorDataFullRecord) -
@@ -2043,9 +2040,7 @@
     uint8_t sensornumber = static_cast<uint8_t>(sensorNum);
     uint8_t lun = static_cast<uint8_t>(sensorNum >> 8);
 
-    get_sdr::header::set_record_id(
-        recordID, reinterpret_cast<get_sdr::SensorDataRecordHeader*>(&record));
-
+    record.header.recordId = recordID;
     record.header.sdr_version = ipmiSdrVersion;
     record.header.record_type = get_sdr::SENSOR_DATA_EVENT_RECORD;
     record.header.record_length = sizeof(get_sdr::SensorDataEventRecord) -