}
}
}
else if ( qname.equals(PropertyQNames.MINIMUMTEMPERATURE ) )
{
IntegerMetric minTempMetric = getProperties( ).getMinimumTemperature();
if (minTempMetric == null)
{
minTempMetric = getProperties( ).addNewMinimumTemperature();
minTempMetric.setChangeType(IntegerMetric.ChangeType.GAUGE);
minTempMetric.setLastUpdated(Calendar.getInstance());
minTempMetric.setTimeScope(IntegerMetric.TimeScope.INTERVAL);
}
minTempMetric.setStringValue( m_sensorData.minimum().toString() );
}
else if ( qname.equals(PropertyQNames.MAXIMUMTEMPERATURE ) )
{
IntegerMetric maxTempMetric = getProperties( ).getMaximumTemperature();
if (maxTempMetric == null)
{
maxTempMetric = getProperties( ).addNewMaximumTemperature();
maxTempMetric.setChangeType(IntegerMetric.ChangeType.GAUGE);
maxTempMetric.setLastUpdated(Calendar.getInstance());
maxTempMetric.setTimeScope(IntegerMetric.TimeScope.INTERVAL);
}
maxTempMetric.setStringValue( m_sensorData.maximum().toString() );
}
else if ( qname.equals(PropertyQNames.AVERAGETEMPERATURE ) )
{
IntegerMetric avgTempMetric = getProperties( ).getAverageTemperature();
if (avgTempMetric == null)
{
avgTempMetric = getProperties( ).addNewAverageTemperature();
avgTempMetric.setChangeType(IntegerMetric.ChangeType.GAUGE);
avgTempMetric.setLastUpdated(Calendar.getInstance());
avgTempMetric.setTimeScope(IntegerMetric.TimeScope.INTERVAL);
}
avgTempMetric.setStringValue( m_sensorData.average(400).toString() );
}
return;
}