|
@@ -203,6 +203,7 @@ void getSensorInfo(Webs *wp){
|
|
int SensorAccessibleFlags;
|
|
int SensorAccessibleFlags;
|
|
struct sensor_data *pSensorBuff = NULL;
|
|
struct sensor_data *pSensorBuff = NULL;
|
|
char reading[10], lownr[10],lowct[10],lownc[10],highnc[10],highct[10],highnr[10];
|
|
char reading[10], lownr[10],lowct[10],lownc[10],highnc[10],highct[10],highnr[10];
|
|
|
|
+ char maxReading[10], minReading[10];
|
|
unsigned char *pStartBuff = NULL;
|
|
unsigned char *pStartBuff = NULL;
|
|
IPMI20_UDS_SESSION_T UDSSession;
|
|
IPMI20_UDS_SESSION_T UDSSession;
|
|
|
|
|
|
@@ -266,6 +267,8 @@ void getSensorInfo(Webs *wp){
|
|
sprintf(highnc, "%.3f", pSensorBuff->high_non_crit_thresh);
|
|
sprintf(highnc, "%.3f", pSensorBuff->high_non_crit_thresh);
|
|
sprintf(highct, "%.3f", pSensorBuff->high_crit_thresh);
|
|
sprintf(highct, "%.3f", pSensorBuff->high_crit_thresh);
|
|
sprintf(highnr, "%.3f", pSensorBuff->high_non_recov_thresh);
|
|
sprintf(highnr, "%.3f", pSensorBuff->high_non_recov_thresh);
|
|
|
|
+ sprintf(maxReading, "%.3f", pSensorBuff->max_reading);
|
|
|
|
+ sprintf(minReading, "%.3f", pSensorBuff->min_reading);
|
|
|
|
|
|
cJSON_AddItemToArray(pJsonArry,pJsonsub=cJSON_CreateObject()); /* 给创建的数组增加对对象*/
|
|
cJSON_AddItemToArray(pJsonArry,pJsonsub=cJSON_CreateObject()); /* 给创建的数组增加对对象*/
|
|
cJSON_AddNumberToObject(pJsonsub, "sensorNum", pSensorBuff->sensor_num);
|
|
cJSON_AddNumberToObject(pJsonsub, "sensorNum", pSensorBuff->sensor_num);
|
|
@@ -289,6 +292,8 @@ void getSensorInfo(Webs *wp){
|
|
cJSON_AddStringToObject(pJsonsub, "highnc", highnc);
|
|
cJSON_AddStringToObject(pJsonsub, "highnc", highnc);
|
|
cJSON_AddStringToObject(pJsonsub, "highct", highct);
|
|
cJSON_AddStringToObject(pJsonsub, "highct", highct);
|
|
cJSON_AddStringToObject(pJsonsub, "highnr", highnr);
|
|
cJSON_AddStringToObject(pJsonsub, "highnr", highnr);
|
|
|
|
+ cJSON_AddStringToObject(pJsonsub, "maxReading", maxReading);
|
|
|
|
+ cJSON_AddStringToObject(pJsonsub, "minReading", minReading);
|
|
|
|
|
|
switch(pSensorBuff->sensor_units[1]) //sensorUinits2
|
|
switch(pSensorBuff->sensor_units[1]) //sensorUinits2
|
|
{
|
|
{
|