📄 dxmangerview.cpp
字号:
j++;
}
if(m_listmonth.GetCheck(2))
{
SendData(m_targetaddress, 1, "1098");
if(Receive645Data())
AddReadStatusItem("read last 2 energy","finsihed");
else
{
SendData(m_targetaddress, 1, "1098");
if(Receive645Data())
AddReadStatusItem("read last 2 energy","finsihed");
else
AddReadStatusItem("read last 2 energy","failed");
}
m_prograss_status.SetPos(9);
Sleep(100);
j++;
}
if(m_listmonth.GetCheck(3))
{
SendData(m_targetaddress, 1, "109a");
if(Receive645Data())
AddReadStatusItem("read last 3 energy","finsihed");
else
{
SendData(m_targetaddress, 1, "109a");
if(Receive645Data())
AddReadStatusItem("read last 3 energy","finsihed");
else
AddReadStatusItem("read last 3 energy","failed");
}
m_prograss_status.SetPos(10);
Sleep(100);
j++;
}
CString temp,tempm;
if(m_chk_sevenday)
{
for(i=0;i<8;i++)
{
temp.Format("%x90",0x90+i);
tempm.Format("READ LAST%d 0:00",i+1);
SendData(m_targetaddress, 1, temp);//读上一月功电量
if(Receive645Data())
AddReadStatusItem(tempm,"finsihed");
else
{
SendData(m_targetaddress, 1, temp);//读上一月功电量
if(Receive645Data())
AddReadStatusItem(tempm,"finsihed");
else
AddReadStatusItem(tempm,"FAILED");
}
m_prograss_status.SetPos(i+11);
}
j++;
}
/////////////////////////////////////////////////
if(m_chk_zero)
{
temp.Format("%x90",0x9d);
tempm.Format("READING 0--3 days");
SendData(m_targetaddress, 1, temp);//读上一月功电量
if(Receive645Data())
AddReadStatusItem(tempm,"finsihed");
else
{
SendData(m_targetaddress, 1, temp);//读上一月功电量
if(Receive645Data())
AddReadStatusItem(tempm,"finsihed");
else
AddReadStatusItem(tempm,"FAILED");
}
m_prograss_status.SetPos(12);
j++;
}
/////////////////////////////////////////////////
if(m_chk_four)
{
temp.Format("%x90",0x9e);
tempm.Format("READING 4--7 days");
SendData(m_targetaddress, 1, temp);//读上一月功电量
if(Receive645Data())
AddReadStatusItem(tempm,"finsihed");
else
{
SendData(m_targetaddress, 1, temp);//读上一月功电量
if(Receive645Data())
AddReadStatusItem(tempm,"finsihed");
else
AddReadStatusItem(tempm,"FAILED");
}
m_prograss_status.SetPos(13);
j++;
}
/////////////////////////////////////////////////
if(m_chk_kuai)
{
temp.Format("%x90",0x9f);
tempm.Format("READING total days");
SendData(m_targetaddress, 1, temp);//读上一月功电量
if(Receive645Data())
AddReadStatusItem(tempm,"finsihed");
else
{
SendData(m_targetaddress, 1, temp);//读上一月功电量
if(Receive645Data())
AddReadStatusItem(tempm,"finsihed");
else
AddReadStatusItem(tempm,"FAILED");
}
m_prograss_status.SetPos(14);
j++;
}
/////////////////////////////////////
// if(!m_chk_twofour)
{
if(m_listhour.GetCheck(0))
{
SendData(m_targetaddress, 1, "A090");
if(Receive645Data())
AddReadStatusItem("read 1-3H energy","finsihed");
else
{
SendData(m_targetaddress, 1, "A090");
if(Receive645Data())
AddReadStatusItem("read 1-3H energy","finsihed");
else
AddReadStatusItem("read 1-3H energy","failed");
}
m_prograss_status.SetPos(15);
Sleep(100);
j++;
}
//////////////////////////////////////////
/////////////////////////////////////
if(m_listhour.GetCheck(1))
{
SendData(m_targetaddress, 1, "A190");
if(Receive645Data())
AddReadStatusItem("read 4-6H energy","finsihed");
else
{
SendData(m_targetaddress, 1, "A190");
if(Receive645Data())
AddReadStatusItem("read 4-6H energy","finsihed");
else
AddReadStatusItem("read 4-6H energy","failed");
}
m_prograss_status.SetPos(16);
Sleep(100);
j++;
}
/////////////////////////////////////
if(m_listhour.GetCheck(2))
{
SendData(m_targetaddress, 1, "A290");
if(Receive645Data())
AddReadStatusItem("read 7-9H energy","finsihed");
else
{
SendData(m_targetaddress, 1, "A290");
if(Receive645Data())
AddReadStatusItem("read 7-9H energy","finsihed");
else
AddReadStatusItem("read 7-9H energy","failed");
}
m_prograss_status.SetPos(17);
Sleep(100);
j++;
}
/////////////////////////////////////////////////
/////////////////////////////////////
if(m_listhour.GetCheck(3))
{
SendData(m_targetaddress, 1, "A390");
if(Receive645Data())
AddReadStatusItem("read 10-12H energy","finsihed");
else
{
SendData(m_targetaddress, 1, "A390");
if(Receive645Data())
AddReadStatusItem("read 10-12H energy","finsihed");
else
AddReadStatusItem("read 10-12H energy","failed");
}
m_prograss_status.SetPos(18);
Sleep(100);
j++;
}
/////////////////////////////////////////////////
/////////////////////////////////////
if(m_listhour.GetCheck(4))
{
SendData(m_targetaddress, 1, "A490");
if(Receive645Data())
AddReadStatusItem("read 13-15H energy","finsihed");
else
{
SendData(m_targetaddress, 1, "A490");
if(Receive645Data())
AddReadStatusItem("read 13-15H energy","finsihed");
else
AddReadStatusItem("read 13-15H energy","failed");
}
m_prograss_status.SetPos(19);
Sleep(100);
j++;
}
/////////////////////////////////////////////////
/////////////////////////////////////
if(m_listhour.GetCheck(5))
{
SendData(m_targetaddress, 1, "A590");
if(Receive645Data())
AddReadStatusItem("read 16-18H energy","finsihed");
else
{
SendData(m_targetaddress, 1, "A590");
if(Receive645Data())
AddReadStatusItem("read 16-18H energy","finsihed");
else
AddReadStatusItem("read 16-18H energy","failed");
}
m_prograss_status.SetPos(20);
Sleep(100);
j++;
}
/////////////////////////////////////////////////
/////////////////////////////////////
if(m_listhour.GetCheck(6))
{
SendData(m_targetaddress, 1, "A690");
if(Receive645Data())
AddReadStatusItem("read 19-21H energy","finsihed");
else
{
SendData(m_targetaddress, 1, "A690");
if(Receive645Data())
AddReadStatusItem("read 19-21H energy","finsihed");
else
AddReadStatusItem("read 19-21H energy","failed");
}
m_prograss_status.SetPos(21);
Sleep(100);
j++;
}
/////////////////////////////////////////////////
/////////////////////////////////////
if(m_listhour.GetCheck(7))
{
SendData(m_targetaddress, 1, "A790");
if(Receive645Data())
AddReadStatusItem("read 22-24H energy","finsihed");
else
{
SendData(m_targetaddress, 1, "A790");
if(Receive645Data())
AddReadStatusItem("read 22-24H energy","finsihed");
else
AddReadStatusItem("read 22-24H energy","failed");
}
m_prograss_status.SetPos(22);
Sleep(100);
j++;
}
}
/////////////////////////////////////////////////
/////////////////////////////////////
//if(!m_chk_eight)
{
if(m_listhour.GetCheck(8))
{
SendData(m_targetaddress, 1, "B090");
if(Receive645Data())
AddReadStatusItem("read 25-27H energy","finsihed");
else
{
SendData(m_targetaddress, 1, "B090");
if(Receive645Data())
AddReadStatusItem("read 25-27H energy","finsihed");
else
AddReadStatusItem("read 25-27H energy","failed");
}
m_prograss_status.SetPos(23);
Sleep(100);
j++;
}
/////////////////////////////////////////////////
/////////////////////////////////////
if(m_listhour.GetCheck(9))
{
SendData(m_targetaddress, 1, "B190");
if(Receive645Data())
AddReadStatusItem("read 28-30H energy","finsihed");
else
{
SendData(m_targetaddress, 1, "B190");
if(Receive645Data())
AddReadStatusItem("read 28-30H energy","finsihed");
else
AddReadStatusItem("read 28-30H energy","failed");
}
m_prograss_status.SetPos(24);
Sleep(100);
j++;
}
/////////////////////////////////////////////////
/////////////////////////////////////
if(m_listhour.GetCheck(10))
{
SendData(m_targetaddress, 1, "B290");
if(Receive645Data())
AddReadStatusItem("read 31-33H energy","finsihed");
else
{
SendData(m_targetaddress, 1, "B290");
if(Receive645Data())
AddReadStatusItem("read 31-33H energy","finsihed");
else
AddReadStatusItem("read 31-33H energy","failed");
}
m_prograss_status.SetPos(25);
Sleep(100);
j++;
}
/////////////////////////////////////////////////
/////////////////////////////////////
if(m_listhour.GetCheck(11))
{
SendData(m_targetaddress, 1, "B390");
if(Receive645Data())
AddReadStatusItem("read 34-36 energy","finsihed");
else
{
SendData(m_targetaddress, 1, "B390");
if(Receive645Data())
AddReadStatusItem("read 34-36H energy","finsihed");
else
AddReadStatusItem("read 34-36H energy","failed");
}
m_prograss_status.SetPos(26);
Sleep(100);
j++;
}
/////////////////////////////////////////////////
/////////////////////////////////////
if(m_listhour.GetCheck(12))
{
SendData(m_targetaddress, 1, "B490");
if(Receive645Data())
AddReadStatusItem("read 37-39H energy","finsihed");
else
{
SendData(m_targetaddress, 1, "B490");
if(Receive645Data())
AddReadStatusItem("read 37-39H energy","finsihed");
else
AddReadStatusItem("read 37-39H energy","failed");
}
m_prograss_status.SetPos(27);
Sleep(100);
j++;
}
/////////////////////////////////////////////////
/////////////////////////////////////
if(m_listhour.GetCheck(13))
{
SendData(m_targetaddress, 1, "B590");
if(Receive645Data())
AddReadStatusItem("read 40-42H energy","finsihed");
else
{
SendData(m_targetaddress, 1, "B590");
if(Receive645Data())
AddReadStatusItem("read 40-42H energy","finsihed");
else
AddReadStatusItem("read 40-42H energy","failed");
}
m_prograss_status.SetPos(28);
Sleep(100);
j++;
}
/////////////////////////////////////////////////
/////////////////////////////////////
if(m_listhour.GetCheck(14))
{
SendData(m_targetaddress, 1, "B690");
if(Receive645Data())
AddReadStatusItem("read 43-45H energy","finsihed");
else
{
SendData(m_targetaddress, 1, "B690");
if(Receive645Data())
AddReadStatusItem("read 43-45H energy","finsihed");
else
AddReadStatusItem("read 43-45H energy","failed");
}
m_prograss_status.SetPos(29);
Sleep(100);
j++;
}
/////////////////////////////////////////////////
/////////////////////////////////////
if(m_listhour.GetCheck(15))
{
SendData(m_targetaddress, 1, "B790");
if(Receive645Data())
AddReadStatusItem("read 46-48H energy","finsihed");
else
{
SendData(m_targetaddress, 1, "B790");
if(Receive645Data())
AddReadStatusItem("read 46-48H energy","finsihed");
else
AddReadStatusItem("read 46-48H energy","failed");
}
m_prograss_status.SetPos(30);
Sleep(100);
j++;
}
}
/////////////////////////////////////////////////
/////////////////////////////////////
if(m_chk_block1)
{
SendData(m_targetaddress, 1, "af90");
if(Receive645Data())
AddReadStatusItem("read 1-24H energy","finsihed");
else
{
S
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -