|
@@ -52,7 +52,7 @@
|
|
|
#include "com_IPMI_SensorEvent.h"
|
|
|
|
|
|
/* 35.2 Get Device SDR Info Command */
|
|
|
-uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
+uint16_t IPMICMD_GetSDRInfo( IPMI20_UDS_SESSION_T *pUDSSession,
|
|
|
uint8_t *pReqGetSDRInfo,
|
|
|
GetSDRInfoRes_T *pResGetSDRInfo,
|
|
|
int timeout)
|
|
@@ -61,7 +61,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
uint32_t dwResLen;
|
|
|
|
|
|
dwResLen = MAX_RESPONSE_SIZE;
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
NETFNLUN_IPMI_SENSOR, CMD_GET_DEV_SDR_INFO,
|
|
|
(uint8_t*)pReqGetSDRInfo, sizeof(uint8_t),
|
|
|
(uint8_t *)pResGetSDRInfo, &dwResLen,
|
|
@@ -71,7 +71,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
}
|
|
|
|
|
|
/* 35.3 Get Device SDR Command */
|
|
|
- uint16_t IPMICMD_GetDevSDR( IPMI20_SESSION_T *pSession,
|
|
|
+ uint16_t IPMICMD_GetDevSDR( IPMI20_UDS_SESSION_T *pUDSSession,
|
|
|
GetDevSDRReq_T *pReqDevSDR,
|
|
|
GetDevSDRRes_T *pResDevSDR,
|
|
|
uint32_t *pOutBuffLen,
|
|
@@ -81,7 +81,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
uint32_t dwResLen;
|
|
|
|
|
|
dwResLen = sizeof(GetDevSDRRes_T);
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
NETFNLUN_IPMI_SENSOR, CMD_GET_DEV_SDR,
|
|
|
(uint8_t*)pReqDevSDR, sizeof(GetDevSDRReq_T),
|
|
|
(uint8_t *)pResDevSDR, &dwResLen,
|
|
@@ -93,7 +93,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
}
|
|
|
|
|
|
/* 35.4 Reserve Device SDR Repository Command */
|
|
|
- uint16_t IPMICMD_ReserveDevSDR( IPMI20_SESSION_T *pSession,
|
|
|
+ uint16_t IPMICMD_ReserveDevSDR( IPMI20_UDS_SESSION_T *pUDSSession,
|
|
|
ReserveDevSDRRes_T *pResReserveDevSDR,
|
|
|
int timeout)
|
|
|
{
|
|
@@ -102,7 +102,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
uint32_t dwResLen;
|
|
|
|
|
|
dwResLen = sizeof(ReserveDevSDRRes_T);
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
NETFNLUN_IPMI_SENSOR, CMD_RESERVE_DEV_SDR_REPOSITORY,
|
|
|
(uint8_t*)Req, 0,
|
|
|
(uint8_t *)pResReserveDevSDR, &dwResLen,
|
|
@@ -112,7 +112,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
}
|
|
|
|
|
|
/* 35.5 Get Sensor Reading Factors Command */
|
|
|
- uint16_t IPMICMD_GetSensorReadingFactor( IPMI20_SESSION_T *pSession,
|
|
|
+ uint16_t IPMICMD_GetSensorReadingFactor( IPMI20_UDS_SESSION_T *pUDSSession,
|
|
|
GetSensorReadingFactorReq_T *pReqGetSensorReadingFactor,
|
|
|
GetSensorReadingFactorRes_T *pResGetSensorReadingFactor,
|
|
|
int timeout)
|
|
@@ -121,7 +121,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
uint32_t dwResLen;
|
|
|
|
|
|
dwResLen = sizeof(GetSensorReadingFactorRes_T);
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
NETFNLUN_IPMI_SENSOR, CMD_GET_SENSOR_READING_FACTORS,
|
|
|
(uint8_t*)pReqGetSensorReadingFactor, sizeof(GetSensorReadingFactorReq_T),
|
|
|
(uint8_t *)pResGetSensorReadingFactor, &dwResLen,
|
|
@@ -131,7 +131,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
}
|
|
|
|
|
|
/* 35.6 Set Sensor Hysteresis Command */
|
|
|
- uint16_t IPMICMD_SetSensorHysterisis( IPMI20_SESSION_T *pSession,
|
|
|
+ uint16_t IPMICMD_SetSensorHysterisis( IPMI20_UDS_SESSION_T *pUDSSession,
|
|
|
SetSensorHysterisisReq_T *pReqSetSensorHysterisis,
|
|
|
SetSensorHysterisisRes_T *pResSetSensorHysterisis,
|
|
|
int timeout)
|
|
@@ -140,7 +140,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
uint32_t dwResLen;
|
|
|
|
|
|
dwResLen = sizeof(SetSensorHysterisisRes_T);
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
NETFNLUN_IPMI_SENSOR, CMD_SET_SENSOR_HYSTERISIS,
|
|
|
(uint8_t*)pReqSetSensorHysterisis, sizeof(SetSensorHysterisisReq_T),
|
|
|
(uint8_t *)pResSetSensorHysterisis, &dwResLen,
|
|
@@ -150,7 +150,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
}
|
|
|
|
|
|
/* 35.7 Get Sensor Hysteresis Command */
|
|
|
- uint16_t IPMICMD_GetSensorHysterisis( IPMI20_SESSION_T *pSession,
|
|
|
+ uint16_t IPMICMD_GetSensorHysterisis( IPMI20_UDS_SESSION_T *pUDSSession,
|
|
|
GetSensorHysterisisReq_T *pReqGetSensorHysterisis,
|
|
|
GetSensorHysterisisRes_T *pResGetSensorHysterisis,
|
|
|
int timeout)
|
|
@@ -159,7 +159,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
uint32_t dwResLen;
|
|
|
|
|
|
dwResLen = sizeof(GetSensorHysterisisRes_T);
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
NETFNLUN_IPMI_SENSOR, CMD_GET_SENSOR_HYSTERISIS,
|
|
|
(uint8_t*)pReqGetSensorHysterisis, sizeof(GetSensorHysterisisReq_T),
|
|
|
(uint8_t *)pResGetSensorHysterisis, &dwResLen,
|
|
@@ -169,7 +169,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
}
|
|
|
|
|
|
/* 35.8 Set Sensor Thresholds Command */
|
|
|
- uint16_t IPMICMD_SetSensorThreshold( IPMI20_SESSION_T *pSession,
|
|
|
+ uint16_t IPMICMD_SetSensorThreshold( IPMI20_UDS_SESSION_T *pUDSSession,
|
|
|
SetSensorThresholdReq_T *pReqSetSensorThreshold,
|
|
|
SetSensorThresholdRes_T *pResSetSensorThreshold,
|
|
|
int timeout)
|
|
@@ -178,7 +178,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
uint32_t dwResLen;
|
|
|
|
|
|
dwResLen = sizeof(SetSensorThresholdRes_T);
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
NETFNLUN_IPMI_SENSOR, CMD_SET_SENSOR_THRESHOLDS,
|
|
|
(uint8_t*)pReqSetSensorThreshold, sizeof(SetSensorThresholdReq_T),
|
|
|
(uint8_t *)pResSetSensorThreshold, &dwResLen,
|
|
@@ -188,7 +188,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
}
|
|
|
|
|
|
/* 35.9 Get Sensor Thresholds Command */
|
|
|
- uint16_t IPMICMD_GetSensorThreshold( IPMI20_SESSION_T *pSession,
|
|
|
+ uint16_t IPMICMD_GetSensorThreshold( IPMI20_UDS_SESSION_T *pUDSSession,
|
|
|
GetSensorThresholdReq_T *pReqGetSensorThreshold,
|
|
|
GetSensorThresholdRes_T *pResGetSensorThreshold,
|
|
|
int timeout)
|
|
@@ -197,7 +197,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
uint32_t dwResLen;
|
|
|
|
|
|
dwResLen = sizeof(GetSensorThresholdRes_T);
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
NETFNLUN_IPMI_SENSOR, CMD_GET_SENSOR_THRESHOLDS,
|
|
|
(uint8_t*)pReqGetSensorThreshold, sizeof(GetSensorThresholdReq_T),
|
|
|
(uint8_t *)pResGetSensorThreshold, &dwResLen,
|
|
@@ -207,7 +207,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
}
|
|
|
|
|
|
/* 35.10 Set Sensor Event Enable Command */
|
|
|
- uint16_t IPMICMD_SetSensorEventEnable( IPMI20_SESSION_T *pSession,
|
|
|
+ uint16_t IPMICMD_SetSensorEventEnable( IPMI20_UDS_SESSION_T *pUDSSession,
|
|
|
SetSensorEventEnableReq_T *pReqSetSensorEventEnable,
|
|
|
SetSensorEventEnableRes_T *pResSetSensorEventEnable,
|
|
|
int timeout)
|
|
@@ -216,7 +216,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
uint32_t dwResLen;
|
|
|
|
|
|
dwResLen = sizeof(SetSensorEventEnableRes_T);
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
NETFNLUN_IPMI_SENSOR, CMD_SET_SENSOR_EVENT_ENABLE,
|
|
|
(uint8_t*)pReqSetSensorEventEnable, sizeof(SetSensorEventEnableReq_T),
|
|
|
(uint8_t *)pResSetSensorEventEnable, &dwResLen,
|
|
@@ -226,7 +226,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
}
|
|
|
|
|
|
/* 35.11 Get Sensor Event Enable Command */
|
|
|
- uint16_t IPMICMD_GetSensorEventEnable( IPMI20_SESSION_T *pSession,
|
|
|
+ uint16_t IPMICMD_GetSensorEventEnable( IPMI20_UDS_SESSION_T *pUDSSession,
|
|
|
GetSensorEventEnableReq_T *pReqGetSensorEventEnable,
|
|
|
GetSensorEventEnableRes_T *pResGetSensorEventEnable,
|
|
|
int timeout)
|
|
@@ -235,7 +235,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
uint32_t dwResLen;
|
|
|
|
|
|
dwResLen = sizeof(GetSensorEventEnableRes_T);
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
NETFNLUN_IPMI_SENSOR, CMD_GET_SENSOR_EVENT_ENABLE,
|
|
|
(uint8_t*)pReqGetSensorEventEnable, sizeof(GetSensorEventEnableReq_T),
|
|
|
(uint8_t *)pResGetSensorEventEnable, &dwResLen,
|
|
@@ -246,7 +246,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
|
|
|
|
|
|
/* 35.12 ReArm Sensor Events Command */
|
|
|
- uint16_t IPMICMD_ReArmSensorEvents( IPMI20_SESSION_T *pSession,
|
|
|
+ uint16_t IPMICMD_ReArmSensorEvents( IPMI20_UDS_SESSION_T *pUDSSession,
|
|
|
ReArmSensorReq_T *pReArmSensorReq,
|
|
|
ReArmSensorRes_T *pReArmSensorRes,
|
|
|
int timeout)
|
|
@@ -255,7 +255,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
uint32_t dwResLen;
|
|
|
|
|
|
dwResLen = sizeof(ReArmSensorRes_T);
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
NETFNLUN_IPMI_SENSOR, CMD_REARM_SENSOR_EVENTS,
|
|
|
(uint8_t*)pReArmSensorReq, sizeof(ReArmSensorReq_T),
|
|
|
(uint8_t *)pReArmSensorRes, &dwResLen,
|
|
@@ -266,7 +266,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
|
|
|
|
|
|
/* 35.13 Get Sensor Event Status Command */
|
|
|
- uint16_t IPMICMD_GetSensorEventStatus( IPMI20_SESSION_T *pSession,
|
|
|
+ uint16_t IPMICMD_GetSensorEventStatus( IPMI20_UDS_SESSION_T *pUDSSession,
|
|
|
GetSensorEventStatusReq_T *pReqGetSensorEventStatus,
|
|
|
GetSensorEventStatusRes_T *pResGetSensorEventStatus,
|
|
|
int timeout)
|
|
@@ -275,7 +275,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
uint32_t dwResLen;
|
|
|
|
|
|
dwResLen = sizeof(GetSensorEventStatusRes_T);
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
NETFNLUN_IPMI_SENSOR, CMD_GET_SENSOR_EVENT_STATUS,
|
|
|
(uint8_t*)pReqGetSensorEventStatus, sizeof(GetSensorEventEnableReq_T),
|
|
|
(uint8_t *)pResGetSensorEventStatus, &dwResLen,
|
|
@@ -285,7 +285,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
}
|
|
|
|
|
|
/* 35.14 Get Sensor Reading Command */
|
|
|
- uint16_t IPMICMD_GetSensorReading( IPMI20_SESSION_T *pSession,
|
|
|
+ uint16_t IPMICMD_GetSensorReading( IPMI20_UDS_SESSION_T *pUDSSession,
|
|
|
GetSensorReadingReq_T *pReqGetSensorReading,
|
|
|
GetSensorReadingRes_T *pResGetSensorReading,
|
|
|
int timeout)
|
|
@@ -294,7 +294,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
uint32_t dwResLen;
|
|
|
|
|
|
dwResLen = sizeof(GetSensorReadingRes_T);
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
NETFNLUN_IPMI_SENSOR, CMD_GET_SENSOR_READING,
|
|
|
(uint8_t*)pReqGetSensorReading, sizeof(GetSensorReadingReq_T),
|
|
|
(uint8_t *)pResGetSensorReading, &dwResLen,
|
|
@@ -304,7 +304,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
}
|
|
|
|
|
|
/* 35.15 Set Sensor Type Command */
|
|
|
- uint16_t IPMICMD_SetSensorType( IPMI20_SESSION_T *pSession,
|
|
|
+ uint16_t IPMICMD_SetSensorType( IPMI20_UDS_SESSION_T *pUDSSession,
|
|
|
SetSensorTypeReq_T *pReqSetSensorType,
|
|
|
SetSensorTypeRes_T *pResSetSensorType,
|
|
|
int timeout)
|
|
@@ -313,7 +313,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
uint32_t dwResLen;
|
|
|
|
|
|
dwResLen = sizeof(SetSensorTypeRes_T);
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
NETFNLUN_IPMI_SENSOR, CMD_GET_SENSOR_READING,
|
|
|
(uint8_t*)pReqSetSensorType, sizeof(SetSensorTypeReq_T),
|
|
|
(uint8_t *)pResSetSensorType, &dwResLen,
|
|
@@ -324,7 +324,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
|
|
|
|
|
|
/* 35.16 Get Sensor Type Command */
|
|
|
- uint16_t IPMICMD_GetSensorType( IPMI20_SESSION_T *pSession,
|
|
|
+ uint16_t IPMICMD_GetSensorType( IPMI20_UDS_SESSION_T *pUDSSession,
|
|
|
GetSensorTypeReq_T *pReqGetSensorType,
|
|
|
GetSensorTypeRes_T *pResGetSensorType,
|
|
|
int timeout)
|
|
@@ -333,7 +333,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
uint32_t dwResLen;
|
|
|
|
|
|
dwResLen = sizeof(GetSensorTypeRes_T);
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
NETFNLUN_IPMI_SENSOR, CMD_GET_SENSOR_READING,
|
|
|
(uint8_t*)pReqGetSensorType, sizeof(GetSensorTypeReq_T),
|
|
|
(uint8_t *)pResGetSensorType, &dwResLen,
|
|
@@ -341,7 +341,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
|
|
|
return wRet;
|
|
|
}
|
|
|
- uint16_t IPMICMD_SetSensorReading( IPMI20_SESSION_T *pSession,
|
|
|
+ uint16_t IPMICMD_SetSensorReading( IPMI20_UDS_SESSION_T *pUDSSession,
|
|
|
SetSensorReadingReq_T *pReqSetSensorReading,
|
|
|
SetSensorReadingRes_T *pResSetSensorReading,
|
|
|
int timeout)
|
|
@@ -350,7 +350,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
uint32_t dwResLen;
|
|
|
|
|
|
dwResLen = sizeof(SetSensorReadingRes_T);
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
NETFNLUN_IPMI_SENSOR,CMD_SET_SENSOR_READING,
|
|
|
(uint8_t*)pReqSetSensorReading, sizeof(SetSensorReadingReq_T),
|
|
|
(uint8_t *)pResSetSensorReading , &dwResLen,
|
|
@@ -365,7 +365,7 @@ uint16_t IPMICMD_GetSDRInfo( IPMI20_SESSION_T *pSession,
|
|
|
//#define SDR_FILE_PATH "/tmp/sdr_data"
|
|
|
|
|
|
uint16_t
|
|
|
-LIBIPMI_HL_ReadSensorFromSDR( IPMI20_SESSION_T *pSession, uint8_t *sdr_buffer,
|
|
|
+LIBIPMI_HL_ReadSensorFromSDR( IPMI20_UDS_SESSION_T *pUDSSession, uint8_t *sdr_buffer,
|
|
|
uint8_t *raw_reading, float *reading,
|
|
|
uint8_t *discrete, int timeout )
|
|
|
{
|
|
@@ -392,7 +392,7 @@ LIBIPMI_HL_ReadSensorFromSDR( IPMI20_SESSION_T *pSession, uint8_t *sdr_buffer,
|
|
|
// *discrete = record->EventTypeCode;
|
|
|
// if(record->OwnerID != 0x20)
|
|
|
// {
|
|
|
- // wRet = IPMICMD_AMIGetChNum (pSession,&pAMIGetChNumRes,
|
|
|
+ // wRet = IPMICMD_AMIGetChNum (pUDSSession,&pAMIGetChNumRes,
|
|
|
// timeout);
|
|
|
// SendMsg = TRUE;
|
|
|
// SendMsgReq[0] = 0x40 | pAMIGetChNumRes.ChannelNum;
|
|
@@ -417,7 +417,7 @@ LIBIPMI_HL_ReadSensorFromSDR( IPMI20_SESSION_T *pSession, uint8_t *sdr_buffer,
|
|
|
// *discrete = record->EventTypeCode;
|
|
|
// if(record->OwnerID != 0x20)
|
|
|
// {
|
|
|
- // wRet = IPMICMD_AMIGetChNum (pSession,&pAMIGetChNumRes,
|
|
|
+ // wRet = IPMICMD_AMIGetChNum (pUDSSession,&pAMIGetChNumRes,
|
|
|
// timeout);
|
|
|
// SendMsg = TRUE;
|
|
|
// SendMsgReq[0] = 0x40 | pAMIGetChNumRes.ChannelNum;
|
|
@@ -442,7 +442,7 @@ LIBIPMI_HL_ReadSensorFromSDR( IPMI20_SESSION_T *pSession, uint8_t *sdr_buffer,
|
|
|
// if(SendMsg == TRUE)
|
|
|
// {
|
|
|
// /*SendMessage Command to Get Sensor Reading when sensor Owner ID is not 0x20 */
|
|
|
- // wRet = IPMICMD_SendMessage(pSession,SendMsgReq,(uint8_t *)&get_reading_res,
|
|
|
+ // wRet = IPMICMD_SendMessage(pUDSSession,SendMsgReq,(uint8_t *)&get_reading_res,
|
|
|
// SendMsgReqLen,timeout);
|
|
|
|
|
|
// if(get_reading_res.CompletionCode == CC_TIMEOUT)
|
|
@@ -458,7 +458,7 @@ LIBIPMI_HL_ReadSensorFromSDR( IPMI20_SESSION_T *pSession, uint8_t *sdr_buffer,
|
|
|
// else
|
|
|
// {
|
|
|
// /* Get the sensor reading */
|
|
|
- // wRet = IPMICMD_GetSensorReading( pSession, &get_reading_req,
|
|
|
+ // wRet = IPMICMD_GetSensorReading( pUDSSession, &get_reading_req,
|
|
|
// &get_reading_res, timeout );
|
|
|
// if( wRet != LIBIPMI_E_SUCCESS )
|
|
|
// {
|
|
@@ -494,7 +494,7 @@ LIBIPMI_HL_ReadSensorFromSDR( IPMI20_SESSION_T *pSession, uint8_t *sdr_buffer,
|
|
|
|
|
|
|
|
|
uint16_t
|
|
|
-LIBIPMI_HL_LoadSensorSDRs( IPMI20_SESSION_T *pSession, uint8_t **sdr_buffer,
|
|
|
+LIBIPMI_HL_LoadSensorSDRs( IPMI20_UDS_SESSION_T *pUDSSession, uint8_t **sdr_buffer,
|
|
|
int *count, int timeout )
|
|
|
{
|
|
|
// FILE *sdrfile;
|
|
@@ -517,7 +517,7 @@ LIBIPMI_HL_LoadSensorSDRs( IPMI20_SESSION_T *pSession, uint8_t **sdr_buffer,
|
|
|
// }
|
|
|
|
|
|
// /* Read the SDRs from the BMC (Note: this function calls malloc) */
|
|
|
- // *count = read_sensor_sdrs( pSession,
|
|
|
+ // *count = read_sensor_sdrs( pUDSSession,
|
|
|
// (struct sensor_info **)&local_sdr_buffer,
|
|
|
// timeout );
|
|
|
// if( *count < 0 )
|
|
@@ -614,12 +614,12 @@ LIBIPMI_HL_LoadSensorSDRs( IPMI20_SESSION_T *pSession, uint8_t **sdr_buffer,
|
|
|
|
|
|
|
|
|
uint16_t
|
|
|
-LIBIPMI_HL_GetSensorCount( IPMI20_SESSION_T *pSession, int *sdr_count, int timeout )
|
|
|
+LIBIPMI_HL_GetSensorCount( IPMI20_UDS_SESSION_T *pUDSSession, int *sdr_count, int timeout )
|
|
|
{
|
|
|
uint16_t wRet;
|
|
|
SDRRepositoryInfo_T pResSDRRepoInfo;
|
|
|
|
|
|
- wRet = IPMICMD_GetSDRRepositoryInfo( pSession,
|
|
|
+ wRet = IPMICMD_GetSDRRepositoryInfo( pUDSSession,
|
|
|
&pResSDRRepoInfo,
|
|
|
timeout);
|
|
|
if(wRet != LIBIPMI_E_SUCCESS)
|
|
@@ -634,7 +634,7 @@ LIBIPMI_HL_GetSensorCount( IPMI20_SESSION_T *pSession, int *sdr_count, int timeo
|
|
|
|
|
|
#if 0
|
|
|
uint16_t
|
|
|
-LIBIPMI_HL_GetAllSensorReadings( IPMI20_SESSION_T *pSession,
|
|
|
+LIBIPMI_HL_GetAllSensorReadings( IPMI20_UDS_SESSION_T *pUDSSession,
|
|
|
struct sensor_data *sensor_list, int timeout )
|
|
|
{
|
|
|
uint16_t wRet;
|
|
@@ -645,7 +645,7 @@ LIBIPMI_HL_GetAllSensorReadings( IPMI20_SESSION_T *pSession,
|
|
|
GetSensorThresholdRes_T * pResGetSensorThreshold;
|
|
|
|
|
|
/* Load the SDRs related to sensors into memory */
|
|
|
- wRet = LIBIPMI_HL_LoadSensorSDRs( pSession, &sdr_buffer, &sdr_count, timeout );
|
|
|
+ wRet = LIBIPMI_HL_LoadSensorSDRs( pUDSSession, &sdr_buffer, &sdr_count, timeout );
|
|
|
if( wRet != LIBIPMI_E_SUCCESS )
|
|
|
{
|
|
|
printf( "Cannot load sensor SDRs\n" );
|
|
@@ -662,7 +662,7 @@ LIBIPMI_HL_GetAllSensorReadings( IPMI20_SESSION_T *pSession,
|
|
|
FullSensorRec_T *record = (FullSensorRec_T *)( sensor->sdr_buffer );
|
|
|
|
|
|
/* Get the reading from this sensor */
|
|
|
- wRet = LIBIPMI_HL_ReadSensorFromSDR( pSession, sensor->sdr_buffer,
|
|
|
+ wRet = LIBIPMI_HL_ReadSensorFromSDR( pUDSSession, sensor->sdr_buffer,
|
|
|
&raw_reading, &reading, &discrete, 15 );
|
|
|
|
|
|
//assume sensor is accessible till we find out otherwise
|
|
@@ -698,7 +698,7 @@ LIBIPMI_HL_GetAllSensorReadings( IPMI20_SESSION_T *pSession,
|
|
|
memset(pResGetSensorThreshold, 0, sizeof(GetSensorThresholdRes_T));
|
|
|
|
|
|
pReqGetSensorThreshold->SensorNum = record->SensorNum;
|
|
|
- wRet = IPMICMD_GetSensorThreshold(pSession, pReqGetSensorThreshold,
|
|
|
+ wRet = IPMICMD_GetSensorThreshold(pUDSSession, pReqGetSensorThreshold,
|
|
|
pResGetSensorThreshold, 15);
|
|
|
|
|
|
if( wRet == LIBIPMI_E_SUCCESS )
|
|
@@ -736,7 +736,7 @@ LIBIPMI_HL_GetAllSensorReadings( IPMI20_SESSION_T *pSession,
|
|
|
|
|
|
/* ...if we have thresholds, get the threshold state and copy */
|
|
|
/* all the threshold information to the caller's array. */
|
|
|
- retval = GetSensorState( pSession, raw_reading, sensor->sdr_buffer, & (sensor_list[ i ].sensor_state) , 15);
|
|
|
+ retval = GetSensorState( pUDSSession, raw_reading, sensor->sdr_buffer, & (sensor_list[ i ].sensor_state) , 15);
|
|
|
if( retval < 0 )
|
|
|
printf( "get_sdr_sensor_state failed\n" );
|
|
|
sensor_list[ i ].discrete_state = 0;
|
|
@@ -770,7 +770,7 @@ LIBIPMI_HL_GetAllSensorReadings( IPMI20_SESSION_T *pSession,
|
|
|
#endif
|
|
|
|
|
|
|
|
|
- uint16_t LIBIPMI_HL_GetSensorReadingFactors( IPMI20_SESSION_T *pSession,
|
|
|
+ uint16_t LIBIPMI_HL_GetSensorReadingFactors( IPMI20_UDS_SESSION_T *pUDSSession,
|
|
|
GetSensorReadingFactorReq_T *pReqGetSensorReadingFactor,
|
|
|
GetSensorReadingFactorRes_T *pResGetSensorReadingFactor,
|
|
|
uint32_t* nNumSensor,
|
|
@@ -780,7 +780,7 @@ LIBIPMI_HL_GetAllSensorReadings( IPMI20_SESSION_T *pSession,
|
|
|
uint32_t dwResLen;
|
|
|
|
|
|
dwResLen = sizeof(GetSensorReadingFactorRes_T);
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
|
|
|
NETFNLUN_IPMI_SENSOR,
|
|
|
CMD_GET_SENSOR_READING_FACTORS,
|
|
@@ -791,7 +791,7 @@ LIBIPMI_HL_GetAllSensorReadings( IPMI20_SESSION_T *pSession,
|
|
|
timeout);
|
|
|
|
|
|
#if 0
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
|
|
|
NetFnLunBladeSts,
|
|
|
CMD_GET_BLADE_STS,
|
|
@@ -805,7 +805,7 @@ LIBIPMI_HL_GetAllSensorReadings( IPMI20_SESSION_T *pSession,
|
|
|
uint32_t dwResLen;
|
|
|
|
|
|
dwResLen = sizeof(GetSensorReadingFactorRes_T);
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
NETFNLUN_IPMI_SENSOR, CMD_GET_SENSOR_READING_FACTORS,
|
|
|
(uint8_t*)pReqGetSensorReadingFactor,
|
|
|
sizeof(GetSensorReadingFactorReq_T),
|
|
@@ -817,7 +817,7 @@ LIBIPMI_HL_GetAllSensorReadings( IPMI20_SESSION_T *pSession,
|
|
|
}
|
|
|
|
|
|
//
|
|
|
-// uint16_t LIBIPMI_HL_GetSensorHistoryReadingData( IPMI20_SESSION_T *pSession, SensorhistoryData_T *pHistoryData, uint8_t nNumSensor, int timeout)
|
|
|
+// uint16_t LIBIPMI_HL_GetSensorHistoryReadingData( IPMI20_UDS_SESSION_T *pUDSSession, SensorhistoryData_T *pHistoryData, uint8_t nNumSensor, int timeout)
|
|
|
//{
|
|
|
// uint8_t nReq;
|
|
|
// uint16_t wRet;
|
|
@@ -827,7 +827,7 @@ LIBIPMI_HL_GetAllSensorReadings( IPMI20_SESSION_T *pSession,
|
|
|
// nReq = nNumSensor;
|
|
|
// printf("LIBIPMI_HL_GetSensorHistoryReadingData: nReq=%d\n",nReq);
|
|
|
// dwResLen = sizeof(SensorhistoryData_T);
|
|
|
-// wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession,
|
|
|
+// wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession,
|
|
|
//
|
|
|
// NETFN_OEM<<2,
|
|
|
// 0x0A,
|
|
@@ -855,7 +855,7 @@ LIBIPMI_HL_GetAllSensorReadings( IPMI20_SESSION_T *pSession,
|
|
|
*/
|
|
|
|
|
|
uint16_t
|
|
|
-LIBIPMI_HL_GetAllSensorReadings( IPMI20_SESSION_T *pSession, struct sensor_data *sensor_list, uint32_t nNumSensor, int timeout )
|
|
|
+LIBIPMI_HL_GetAllSensorReadings( IPMI20_UDS_SESSION_T *pUDSSession, struct sensor_data *sensor_list, uint32_t nNumSensor, int timeout )
|
|
|
{
|
|
|
uint16_t wRet;
|
|
|
int sdr_count;
|
|
@@ -870,7 +870,7 @@ LIBIPMI_HL_GetAllSensorReadings( IPMI20_SESSION_T *pSession, struct sensor_data
|
|
|
for(i = 0; i < nNumSensor; i++)
|
|
|
{
|
|
|
Req[0] = i;
|
|
|
- wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pSession, //notice!
|
|
|
+ wRet = LIBIPMI_Send_RAW_IPMI2_0_Command(pUDSSession, //notice!
|
|
|
(NETFN_STORLEAD << 2), CMD_GET_SENSOR_INFO,
|
|
|
Req, 1,
|
|
|
(uint8_t*)&GetSensorInfoRes, &dwResLen,
|