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++
77 lines
2.0 KiB
C++
#include "StdAfx.h"
|
|
#include "MarkPar.h"
|
|
#include "GlobalDefine.h"
|
|
|
|
CMarkPar::CMarkPar(void)
|
|
{
|
|
m_color = RGB_GRAY;//笔的颜色
|
|
ms = 100;//标刻速度mm/s
|
|
mms = 500;//空移速度mm/s
|
|
tof = 100;//开激光前延时us
|
|
toh = 80;//开激光后延时us
|
|
tcf = 20;//关激光前延时us
|
|
tch = 70;//关激光后延时us
|
|
dr_time = 30;//拐点延时 us
|
|
laserfre = 10;//激光频率
|
|
laserpower = 40;//激光功率
|
|
maxlaserpower = 150;//激光最大功率
|
|
}
|
|
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++);
|
|
} |