Temperature Entity¶
API Documentation: [cpp] [python] [.NET] [LabVIEW]
Certain modules have a temperature measurement available. The temperature entity gives access to these measurements. Check your module datasheet to see if your module has a temperature entity.
Temperature (Get)¶
temperature [ index ] . getTemperature => (int) microcelsius
Returns a temperature measurement in microcelsius.
Temperature Value (Get)¶
temperature [ index ] . getValue <= (int) microcelsius
Returns the current temperature measurement in microcelsius. This is the same as getTemperature but follows the standard naming convention.
Temperature Maximum (Get)¶
temperature [ index ] . getValueMax <= (int) microcelsius
Returns the maximum temperature recorded since the last power cycle in microcelsius. This tracks the highest temperature the module has reached.
Temperature Minimum (Get)¶
temperature [ index ] . getValueMin <= (int) microcelsius
Returns the minimum temperature recorded since the last power cycle in microcelsius. This tracks the lowest temperature the module has reached.
Code Examples¶
C++¶
// All commands return aErr values when errors are encountered and aErrNone on
// success. Get commands fill the variable with the returned value.
stem.temperature[0].getTemperature(microcelsius);
stem.temperature[0].getValue(currentTemp);
stem.temperature[0].getValueMax(maxTemp);
stem.temperature[0].getValueMin(minTemp);
Reflex¶
//Get commands fill the variable with the returned value.
stem.temperature[0].getTemperature(microcelsius);
stem.temperature[0].getValue(currentTemp);
stem.temperature[0].getValueMax(maxTemp);
stem.temperature[0].getValueMin(minTemp);
Python¶
microcelsius = stem.temperature[0].getTemperature();
print microcelsius.value
currentTemp = stem.temperature[0].getValue();
print currentTemp.value
maxTemp = stem.temperature[0].getValueMax();
print maxTemp.value
minTemp = stem.temperature[0].getValueMin();
print minTemp.value