15,979
社区成员
发帖
与我相关
我的任务
分享
class CSignalAI : public CSignal
{
public:
bool CheckOut();
float Input();
bool ReadFromIni();
bool SaveToIni();
void CalcKB();
void CalcKB(float x1,float x2,float y1,float y2);
float Value;//采集值
float HighValue;//采集上限*
float LowValue;//采集下限*
float k;//K系数
float b;//B系数
float CalcValue;//计算值
float HighCalcValue;//量程上限*
float LowCalcValue;//量程下限*
bool bAlarm;//是否报警*
float HighAlarmValue;//报警上限*
float LowAlarmValue;//报警下限*
CString szOut;//格式化字符串*
};
class CSignal
{
public:
CSignal();
virtual bool ReadFromIni()=0;
virtual bool SaveToIni()=0;
public:
int index;
int nBoard; //板卡号*
int nChannel; //通道号*
CString Name; //物理名称*
CString szTag; //附加说明,不参与程序运行,只起辅助作用*
protected:
CBoardControl *pBoard;
};
void CDlgSetTstPara::OnOK()
{
CString strPath,strPath1;
char buffer[30];
int i=0;
CString keyName;
CString str;
strPath=((CZWJApp*)AfxGetApp())->m_IniPath + "Testconfig.ini";
strPath1=((CZWJApp*)AfxGetApp())->m_IniPath + "SignalAI.ini";
GetDlgItemText(IDC_EDIT_250,str);
WritePrivateProfileString("0","HighCalcValue",str,strPath1);
WritePrivateProfileString("1","HighCalcValue",str,strPath1);
WritePrivateProfileString("2","HighCalcValue",str,strPath1);
BOOL CDlgSetAI::OnInitDialog()
{
……
m_editHighCalcValue=p->HighCalcValue;