#pragma once

#include "robbase.h"
#include "Options.h"
#include "axes.h"
#include "pos.h"


#define DEF_ACTION_ID   100

class CRobot;
class CMotion;
class COptions;
 
class ROBBASE_API CAction
{
public:
	CAction(void);
	//CAction(int actId, int sceneId);
	virtual ~CAction(void);

	virtual BOOL Excute(CRobot* pRobot, /*int sceneId,*/ HWND hNotifyWnd, int* pErrCode){ return FALSE; } ;
	// void     SetRobot(CRobot* pRobot);
	// CRobot*  GetRobot();
	// CMotion* GetMotion();
	// COptions* GetOptions();
	//int     GetLastError(){return m_nLastError; };
	 DWORD     GetClassId(){ return m_nClassId; };

	 int GetAxisCount (){
		 return m_axes.GetAxisCount();
	 }
	 void SetAxisCount (int count){
		   m_axes.SetAxisCount(count);
	 }
	 void SetAxisAt(int index, WORD axis){
		 m_axes.SetAxisAt(index, axis);
	 }
	 WORD GetAxisAt(int index){
		 return m_axes.GetAxisAt(index);
	 }
	 void SetPosAt(int index, double pos){
		 m_pos.SetPosAt(index,pos ); 
	 }

public:
	DWORD    m_actId;      //动作ID,运行时使用 
	int      m_concurrence;  //并行性
	
	CAxes    m_axes;
	CPos     m_pos;   //每个轴对应一个POS
	
	//可选参数
	COptions* m_pOptions;
	CRobot*   m_pRobot;
protected:
	DWORD     m_nClassId;
	 
};

