You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.0 KiB
C++

#include "StdAfx.h"
#include "MarkPar.h"
#include "GlobalDefine.h"
CMarkPar::CMarkPar(void)
{
m_color = RGB_GRAY;//<2F>ʵ<EFBFBD><CAB5><EFBFBD>ɫ
ms = 100;//<2F><><EFBFBD><EFBFBD><EFBFBD>ٶ<EFBFBD>mm/s
mms = 500;//<2F><><EFBFBD><EFBFBD><EFBFBD>ٶ<EFBFBD>mm/s
tof = 100;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>ʱus
toh = 80;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱus
tcf = 20;//<2F>ؼ<EFBFBD><D8BC><EFBFBD>ǰ<EFBFBD><C7B0>ʱus
tch = 70;//<2F>ؼ<EFBFBD><D8BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱus
dr_time = 30;//<2F>յ<EFBFBD><D5B5><EFBFBD>ʱ us
laserfre = 10;//<2F><><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5>
laserpower = 40;//<2F><><EFBFBD><EFBFBD><E2B9A6>
maxlaserpower = 150;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
}
CMarkPar::~CMarkPar(void)
{
}
void CMarkPar::Serialize(CArchive &ar)
{
if(ar.IsStoring())
{
ar<<m_color;
ar<<ms;
ar<<mms;
ar<<tcf;
ar<<tch;
ar<<tof;
ar<<toh;
ar<<dr_time;
ar<<laserfre;
ar<<laserpower;
ar<<maxlaserpower;
}
else
{
ar>>m_color;
ar>>ms;
ar>>mms;
ar>>tcf;
ar>>tch;
ar>>tof;
ar>>toh;
ar>>dr_time;
ar>>laserfre;
ar>>laserpower;
ar>>maxlaserpower;
}
}
void CMarkPar::WriteWorkFile(vector<CLab> &LabVec)
{
LabVec.push_back(CLab(LAB_NULL,(double)ms));
LabVec.push_back(CLab(LAB_NULL,(double)mms));
LabVec.push_back(CLab(LAB_NULL,(int)tcf));
LabVec.push_back(CLab(LAB_NULL,(int)tch));
LabVec.push_back(CLab(LAB_NULL,(int)tof));
LabVec.push_back(CLab(LAB_NULL,(int)toh));
LabVec.push_back(CLab(LAB_NULL,(int)dr_time));
LabVec.push_back(CLab(LAB_NULL,(int)laserfre));
LabVec.push_back(CLab(LAB_NULL,(int)laserpower));
}
void CMarkPar::ReadWorkFile(CLabVecRang &LabVecRang)
{
int idx = LabVecRang.GetStart();
ms = LabVecRang.GetDouble(idx++);
mms = LabVecRang.GetDouble(idx++);
tcf = LabVecRang.GetInt(idx++);
tch = LabVecRang.GetInt(idx++);
tof = LabVecRang.GetInt(idx++);
toh = LabVecRang.GetInt(idx++);
dr_time = LabVecRang.GetInt(idx++);
laserfre = LabVecRang.GetDouble(idx++);
laserpower = LabVecRang.GetDouble(idx++);
}