00001
00012
#ifndef CONVERT_H
00013
#define CONVERT_H
00014
00017
const unsigned int MAX_STUETZSTELLEN= 62;
00018
00023 class CFpsConvert
00024 {
00025
public:
00027 enum FPS_MEASURE_MODE
00028 {
00029 MM,
00030
VOLT
00031 };
00032
00033
CFpsConvert();
00034
virtual ~
CFpsConvert();
00035
00040
int GetVersion(
void ) const;
00041
00046
void SetMeasureMode( const FPS_MEASURE_MODE NewMode );
00047
00052 FPS_MEASURE_MODE GetMeasureMode(
void ) const;
00053
00058
void clear(
void );
00059
00064
float GetMaxMm(
void ) const;
00065
00070
float GetMinMm(
void ) const;
00071
00076
unsigned int GetNumStuetzstellen(
void ) const;
00077
00083
void SetNumStuetzstellen(
unsigned int uiNewNumStuetzstellen );
00084
00091
bool AddStuetzstelle( const
float fX, const
float fY );
00092
00099
void SetStuetzstelle( const
unsigned int uiIndex, const
float fX, const
float fY );
00100
00108
bool GetStuetzstelle( const
unsigned int uiIndex,
float& fX,
float& fY ) const;
00109
00110
00111
00121
void SetCurStuetzstelle( const
unsigned int uiCurStuetzstelle );
00122
00130
unsigned int GetCurStuetzstelle(
void ) const;
00131
00140
void SetCurStuetzstelle( const
float fX, const
float fY );
00141
00150
void GetCurStuetzstelle(
float& fX,
float& fY ) const;
00151
00159
void IncCurStuetzstelle(
void );
00160
00168
void DecCurStuetzstelle(
void );
00169
00176
bool StuetzstelleWasModified( const
unsigned int uiIndex ) const;
00177
00182
void ClearModifiedFlag( const
unsigned int uiCurPoint );
00183
00190
bool ConvertMvToMm( const
float fValueIn,
float& fValueOut ) const;
00191
00198
bool ConvertMmToMv( const
float fValueIn,
float& fValueOut ) const;
00199
00205
void ConvertMvToNative( const
float fValueIn,
int& iValueOut ) const;
00206
00215
void ConvertMmToNative( const
float fValueIn,
int& iValueOut ) const;
00216
00225
bool ConvertSpecToNative( const
float fValueIn,
int& iValueOut ) const;
00226
00232
void ConvertNativeToMv( const
unsigned int iValueIn,
float& fValueOut ) const;
00233
00242
void ConvertNativeToMm( const
unsigned int iValueIn,
float& fValueOut ) const;
00243
00252
bool ConvertNativeToSpec( const
unsigned int iValueIn,
float& fValueOut ) const;
00253
00254 private:
00255
00257 FPS_MEASURE_MODE m_CurMeasureMode;
00258
00260
int m_iStuetzArrayVersion;
00261
00263 unsigned int m_CurNumStuetzstellen;
00264
00266 unsigned int m_uiCurStuetzstelle;
00267
00269
float m_StuetzX[ MAX_STUETZSTELLEN ];
00270
00272
float m_StuetzY[ MAX_STUETZSTELLEN ];
00273
00275 bool m_Modified[ MAX_STUETZSTELLEN ];
00276 };
00277 #endif