MityDSP Documentation Index
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
MityDSP::tcDspThermBase Class Reference

The tcDspThermBase class is a virtual base class to provide consistent access to various thermistor devices. More...

#include <core/DspThermBase.h>

Inheritance diagram for MityDSP::tcDspThermBase:
MityDSP::tcDspThermERTJV1G

List of all members.

Public Member Functions

 tcDspThermBase (float anVref, unsigned int anAdcBits, float anFeedbackR, float anBeta)
 This constructor is used to initialize the thermistor base class.
virtual ~tcDspThermBase ()
 Destructor.
virtual void SetSensorVal (unsigned short anVal)
 This routine updates the sensor's current value, and computes the matching temperature.
virtual float GetSensorTemp (void)
 This routine returns a given sensor's current temperature, in deg-C.
virtual void GetThermoParams (float &arT0, float &arRt0, float &arVin)
 This routine returns the current constants in use by the Thermistor derived class.
virtual bool SetThermoParams (float anT0=0.0f, float anRt0=0.0f, float anVin=0.0f)
 This routine may be used to update the constants in use by the Thermistor derived class.

Static Public Attributes

static const int gnKelvinToCentigrade = 273
 Conversion from deg-K to deg-C.

Protected Member Functions

virtual void ComputeTemp (void)=0

Protected Attributes

SEM_Handle mhMutex
 Serial access across threads.
unsigned int mnAdcSteps
 ADC data range.
float mnVReference
 Reference voltage.
float mnFeebackR
 feedback resistor value (ohms)
float mnBeta
 thermistor beta value
unsigned short mnAdcCount
 last-known ADC count
float mnTempDegC
 last computed temperature (deg-C)
float mnT0
 Temperature T0 (in deg-K)
float mnRt0
 Resistance @ T0.
float mnVin
 Thermistor input voltage.

Detailed Description

The tcDspThermBase class is a virtual base class to provide consistent access to various thermistor devices.

It provides functions for converting ADC counts into temperatures and storing the last-known values.

See also:
tcDspThermBase Page

Constructor & Destructor Documentation

tcDspThermBase::tcDspThermBase ( float  anVref,
unsigned int  anAdcBits,
float  anFeedbackR,
float  anBeta 
)

This constructor is used to initialize the thermistor base class.

Parameters:
[in]anVrefReference voltage for the thermistor.
[in]anAdcBitsNumber of bits returned by ADC.
[in]anFeedbackRFeedback resistor value.
[in]anBetaThermistor Beta value.
tcDspThermBase::~tcDspThermBase ( )
virtual

Destructor.


Member Function Documentation

void tcDspThermBase::SetSensorVal ( unsigned short  anVal)
virtual

This routine updates the sensor's current value, and computes the matching temperature.

Parameters:
[in]anValLatest ADC value.
Returns:
None.
float tcDspThermBase::GetSensorTemp ( void  )
virtual

This routine returns a given sensor's current temperature, in deg-C.

Returns:
Last-known temperature value (deg-C).
void tcDspThermBase::GetThermoParams ( float &  arT0,
float &  arRt0,
float &  arVin 
)
virtual

This routine returns the current constants in use by the Thermistor derived class.

It is provided mainly for situations where fine tuning of the default parameters may be required.

Parameters:
[in]arT0Reference to T0 temperature (deg-K)
[in]arRt0Reference to resistance at T0 (ohms)
[in]arVinReference to thermistor input voltage (volts)
Returns:
None.
bool tcDspThermBase::SetThermoParams ( float  anT0 = 0.0f,
float  anRt0 = 0.0f,
float  anVin = 0.0f 
)
virtual

This routine may be used to update the constants in use by the Thermistor derived class.

It is provided mainly for situations where fine tuning of the default parameters may be required.

Note:
Any parameter with a value of zero is not updated.
Parameters:
[in]anT0New T0 temperature (deg-K)
[in]anRt0New resistance at T0 (ohms)
[in]anVinNew thermistor input voltage (volts)
Returns:
Number of parameters updated.
virtual void MityDSP::tcDspThermBase::ComputeTemp ( void  )
protectedpure virtual

Member Data Documentation

const int MityDSP::tcDspThermBase::gnKelvinToCentigrade = 273
static

Conversion from deg-K to deg-C.

SEM_Handle MityDSP::tcDspThermBase::mhMutex
protected

Serial access across threads.

unsigned int MityDSP::tcDspThermBase::mnAdcSteps
protected

ADC data range.

float MityDSP::tcDspThermBase::mnVReference
protected

Reference voltage.

float MityDSP::tcDspThermBase::mnFeebackR
protected

feedback resistor value (ohms)

float MityDSP::tcDspThermBase::mnBeta
protected

thermistor beta value

unsigned short MityDSP::tcDspThermBase::mnAdcCount
protected

last-known ADC count

float MityDSP::tcDspThermBase::mnTempDegC
protected

last computed temperature (deg-C)

float MityDSP::tcDspThermBase::mnT0
protected

Temperature T0 (in deg-K)

float MityDSP::tcDspThermBase::mnRt0
protected

Resistance @ T0.

float MityDSP::tcDspThermBase::mnVin
protected

Thermistor input voltage.


  
Generated on Mon Apr 22 2013 11:33:04 for MityDSP Core by  Doxygen Version 1.8.1.1
Copyright © 2009, Critical Link LLC, All rights reserved.