ITemperature

class

Abstract Interface for temperature sensors.

This interface creates a hardware-independent abstraction layer for interacting with temperature sensors. Any hardware temperature sensor in Mono must subclass this interface.

In Mono Framework these is only initialized one global temperature sensor object. To obtain a reference to the temperature sensor, use the IApplicationContext object:

ITemperature *temp = mono::IApplicationContext::Instance->Temperature;

This object is automatically initialized by the IApplicationContext and the current ITemperature subclass. IT is the IApplicationContext‘s job to initialize the temperature sensor.

Public Functions

virtual int mono::sensor::ITemperature::Read()
= 0

Reads the current temperature from the temperature sensor

Return
the temperature in Celcius

virtual int mono::sensor::ITemperature::ReadMilliCelcius()

Reads the temperature in fixed point milli-Celcius.

To get a higher precision output, this method will return milliCelcius such that: 22,5 Celcius == 22500 mCelcius

Return
The temperature in mCelcius