Main Page | Modules | Class Hierarchy | Data Structures | File List | Data Fields | Globals | Related Pages

UDReg.h

Go to the documentation of this file.
00001 #pragma once
00002 
00003 #include "resource.h"
00004 #include "ini2.h"
00005 #include "math.h"
00006 #include "types.h"
00007 
00008 struct UDReg_Struct{
00009     float   ULFeedUp;
00010     float   ULFeedDn;
00011     float   ULOffset;
00012     float   ULAbsMax;
00013 
00014     float   DLFeedUp;
00015     float   DLFeedDn;
00016     float   DLOffset;
00017     float   DLAbsMax;
00018 
00019     float   Ratio0;
00020     float   Ratio1;
00021     float   Ratio2;
00022     float   Ratio3;
00023     float   Thres0;
00024     float   Thres1;
00025     float   Thres2;
00026 
00027     float   hystup;
00028     float   hystdown;
00029 
00030     BOOL    DLEnable;
00031     BOOL    ULEnable;
00032 
00033     sint16  DLBoostTR;
00034     sint16  DLBuckTR;
00035     sint16  ULBoostTR;
00036     sint16  ULBuckTR;
00037 };
00038 
00039 class CUDReg : public CDialog
00040 {
00041     DECLARE_DYNAMIC(CUDReg)
00042 
00043 public:
00044     enum { IDD = IDD_UDR_MONITOR };
00045 
00046     CUDReg(CWnd* pParent = NULL);
00047     ~CUDReg(void);
00048     virtual BOOL OnInitDialog();
00049     void WriteConfig(CIni &ini);
00050     void LoadConfig(CIni &ini);
00051     void UpdateRates(float lastdownrate);
00052     void SetConfig(UDReg_Struct &NewUDReg);
00053     void GetConfig(UDReg_Struct &NewUDReg) {memcpy(&NewUDReg, &UDReg, sizeof(UDReg));}
00054 
00055 protected:
00056     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00057     DECLARE_MESSAGE_MAP()
00058 
00059 private:
00060     UDReg_Struct    UDReg;
00061 
00062     static uint16   alpha_to_sec(float alpha) {return (uint32) (-2.0F / log(alpha));}
00063     static float    sec_to_alpha(uint16 sec) {return exp(-2.0F / sec);}
00064 };

Generated on Sun Oct 26 12:02:54 2003 for Moonlight's eMule Tweaks Documentation by doxygen 1.3.4