public.cpp

来自「机械手IPC控制器伺服运动程序」· C++ 代码 · 共 67 行

CPP
67
字号
// public.cpp: implementation of the Cpublic class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "alfa.h"
#include "public.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
IMPLEMENT_SERIAL(Cpublic,CObject,1)
Cpublic::Cpublic()
{
      m_acctime=300;
	  m_acctype='T';
	  m_address=608;
	  m_coordtype=0;
	  m_dectime=300;
	  m_dectype='T';
	  m_irq=7;
	  m_unit=1;
	  m_maxspeed=1000;
	  m_interpolate=5;
}

Cpublic::~Cpublic()
{

}

void Cpublic::Serialize(CArchive & ar)
{
  if(ar.IsLoading())
  {
	  ar >> m_acctime;
	  ar >> m_acctype;
	  ar >> m_address;
	  ar >> m_coordtype;
	  ar >> m_dectime;
	  ar >> m_dectype;
	  ar >> m_irq;
	  ar >> m_unit;
	  ar >> m_maxspeed;
	  ar >> m_interpolate;
  }
  else 
  {
	  ar << m_acctime;
	  ar << m_acctype;
	  ar << m_address;
	  ar << m_coordtype;
	  ar << m_dectime;
	  ar << m_dectype;
	  ar << m_irq;
	  ar << m_unit;
	  ar << m_maxspeed;
	  ar << m_interpolate;
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?