Lars -

When you are done making corrections and adjustments to your dynamic_simulator, 
please let us know so that we can download it from your development branch and 
run additional testing on it.

Once testing is completed - and everyone is satisfied with the quality - we can 
then proceed to the merge with the OpenHPI top-of-trunk.  And after the merge 
operation, we can then proceed with the 2.15.0 release cycle.

Please keep us posted.  And thanks for your efforts on getting your changes 
done in a timely fashion.  We're still looking to release 2.15.0 at the end of 
June.

--michael

Regards,
Michael Bishop
Enterprise Servers and Storage (ISB Linux/Telco)
Hewlett-Packard Company
3404 E. Harmony Rd.  Bldg. 5L, Post B7,  Mailstop 42
Fort Collins, CO  80528-9599
Phone: 970-898-4393
E-Mail: [email protected]




> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]
> Sent: Thursday, June 03, 2010 10:46 AM
> To: [email protected]
> Subject: [Openhpi-svn] SF.net SVN: openhpi:[7088]
> openhpi/branches/newsimulator/clients/ hpigensimdata.c
>
>
> Revision: 7088
>
> http://openhpi.svn.sourceforge.net/openhpi/?rev=7088&view=rev
> Author:   larswetzel
> Date:     2010-06-03 16:46:05 +0000 (Thu, 03 Jun 2010)
>
> Log Message:
> -----------
> Add workaround for Sensor.DataFormat.IsSupported == TRUE, but
> SensorReading returns IsSupported == FALSE.
>
> Modified Paths:
> --------------
>     openhpi/branches/newsimulator/clients/hpigensimdata.c
>
> Modified: openhpi/branches/newsimulator/clients/hpigensimdata.c
> ===================================================================
> --- openhpi/branches/newsimulator/clients/hpigensimdata.c
> 2010-06-03 13:35:20 UTC (rev 7087)
> +++ openhpi/branches/newsimulator/clients/hpigensimdata.c
> 2010-06-03 16:46:05 UTC (rev 7088)
> @@ -148,9 +148,13 @@
>                                        SaHpiResourceIdT resId,
>                                        SaHpiSensorRecT *sens);
>
> -static void       print_sensor_thresholds(FILE *out,
> +static int        print_sensor_thresholds(FILE *out,
>                                              int myoffset,
> -
> SaHpiSensorThresholdsT thres);
> +
> SaHpiSensorThresholdsT thres,
> +
> SaHpiSensorDataFormatT format);
> +
> +static int        check_sensor_reading(SaHpiSensorReadingT *read,
> +
> SaHpiSensorDataFormatT format);
>
>
>  static void       print_sensor_data_format(FILE *out,
>                                               int offset,
> @@ -1521,6 +1525,7 @@
>                                     SaHpiResourceIdT resId,
> SaHpiSensorRecT *sens) {
>     int rv = SA_OK;
>     int myoffset = offset;
> +   int corflag = 0;
>
>     SaHpiSensorReadingT read;
>     SaHpiEventStateT    event;
> @@ -1573,6 +1578,14 @@
>     // SensorReading
>     fprintf(out,"%sEventState=0x%04X\n", offSet[myoffset], event);
>     fprintf(out,"%sSensorReading={\n",offSet[myoffset++]);
> +   if ((sens->DataFormat.IsSupported == SAHPI_TRUE) &&
> +        (read.IsSupported == SAHPI_FALSE)) {
> +      read.IsSupported = SAHPI_TRUE;
> +      read.Type = sens->DataFormat.ReadingType;
> +      fprintf(stderr,
> +            "WARNING: SensorReading.IsSupported value must
> be changed for ResId %d sensNum %d\n",
> +            resId, sens->Num);
> +   }
>     print_sensor_reading(out, myoffset, read);
>     fprintf(out, "%s}\n", offSet[--myoffset]);
>
> @@ -1586,8 +1599,12 @@
>                   oh_lookup_error(rv), resId, sens->Num);
>        } else {
>           fprintf(out,"%sSensorThresholds={\n",offSet[myoffset++]);
> -         print_sensor_thresholds(out, myoffset, thres);
> +         corflag = print_sensor_thresholds(out, myoffset,
> thres, sens->DataFormat);
>           fprintf(out, "%s}\n", offSet[--myoffset]);
> +         if (corflag)
> +            fprintf(stderr,
> +            "WARNING: Reading for %d threshold value(s) must
> be changed for ResId %d sensNum %d\n",
> +            corflag, resId, sens->Num);
>        }
>     }
>
> @@ -1616,34 +1633,67 @@
>     return rv;
>  }
>
> +static int check_sensor_reading(SaHpiSensorReadingT *read,
> +                                  SaHpiSensorDataFormatT format) {
>
> -static void print_sensor_thresholds(FILE *out, int offset,
> SaHpiSensorThresholdsT thres) {
> +   if (format.IsSupported) {
> +     if (read->IsSupported == SAHPI_TRUE) {
> +         if (read->Type != format.ReadingType) {
> +               read->Type = format.ReadingType;
> +          return 1;
> +         }
> +     }
> +   }
> +
> +   return 0;
> +}
> +
> +static int print_sensor_thresholds(FILE *out, int offset,
> SaHpiSensorThresholdsT thres,
> +                                     SaHpiSensorDataFormatT format) {
>     int myoffset = offset;
> +   int check_val = 0;
>
>     fprintf(out, "%sLowCritical={\n", offSet[myoffset++]);
> +   if (check_sensor_reading(&thres.LowCritical, format)) check_val++;
>     print_sensor_reading(out, myoffset, thres.LowCritical);
>     fprintf(out, "%s}\n", offSet[--myoffset]);
> +
>     fprintf(out, "%sLowMajor={\n", offSet[myoffset++]);
> +   if (check_sensor_reading(&thres.LowMajor, format)) check_val++;
>     print_sensor_reading(out, myoffset, thres.LowMajor);
>     fprintf(out, "%s}\n", offSet[--myoffset]);
> +
>     fprintf(out, "%sLowMinor={\n", offSet[myoffset++]);
> +   if (check_sensor_reading(&thres.LowMinor, format)) check_val++;
>     print_sensor_reading(out, myoffset, thres.LowMinor);
>     fprintf(out, "%s}\n", offSet[--myoffset]);
> +
>     fprintf(out, "%sUpCritical={\n", offSet[myoffset++]);
> +   if (check_sensor_reading(&thres.UpCritical, format)) check_val++;
>     print_sensor_reading(out, myoffset, thres.UpCritical);
>     fprintf(out, "%s}\n", offSet[--myoffset]);
> +
>     fprintf(out, "%sUpMajor={\n", offSet[myoffset++]);
> +   if (check_sensor_reading(&thres.UpMajor, format)) check_val++;
>     print_sensor_reading(out, myoffset, thres.UpMajor);
>     fprintf(out, "%s}\n", offSet[--myoffset]);
> +
>     fprintf(out, "%sUpMinor={\n", offSet[myoffset++]);
> +   if (check_sensor_reading(&thres.UpMinor, format)) check_val++;
>     print_sensor_reading(out, myoffset, thres.UpMinor);
>     fprintf(out, "%s}\n", offSet[--myoffset]);
> +
>     fprintf(out, "%sPosThdHysteresis={\n", offSet[myoffset++]);
> +   if (check_sensor_reading(&thres.PosThdHysteresis,
> format)) check_val++;
>     print_sensor_reading(out, myoffset, thres.PosThdHysteresis);
>     fprintf(out, "%s}\n", offSet[--myoffset]);
> +
>     fprintf(out, "%sNegThdHysteresis={\n", offSet[myoffset++]);
> +   if (check_sensor_reading(&thres.NegThdHysteresis,
> format)) check_val++;
>     print_sensor_reading(out, myoffset, thres.NegThdHysteresis);
>     fprintf(out, "%s}\n", offSet[--myoffset]);
> +
> +   return check_val;
>  }
>
>
>
>
> This was sent by the SourceForge.net collaborative
> development platform, the world's largest Open Source
> development site.
>
> --------------------------------------------------------------
> ----------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Openhpi-svn mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/openhpi-svn
>

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Openhpi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openhpi-devel

Reply via email to