#ifndef OMSController_H
#define OMSController_H

/*****************************************************************
 * OMSController class - serves as a layer between 
 */




#include "RobotController.h"				// Defines RobotController  interface
#include "ActuatorPositions.h"				// Defines ActuatorPositions structure
#ifdef OMSController_CPP					// Only for OMSController main program
#include "..\OMSNT\intDLL\NT3xliMF.h"			// ... include this file
#endif



#define		DEFAULT_BOARD_NAME		"OMS1"
#define		MAX_ACCEL				100000
#define		DEF_ACCEL				5000
#define		MAX_VEL					1000
#define		DEF_VEL					500


class OMSController
:public RobotController<ActuatorPositions>
{
	public:
		
		OMSController(char* boardName);
		OMSController();
		virtual ~OMSController();


		bool open (char* boardName = DEFAULT_BOARD_NAME);
		bool close();
		bool isOpened() const;
		void stop ();
		void kill ();

		void setVelocity    (double velocity);
		void setAcceleration(double acceleration);

//		int  moveRelative(class Coordinate c);
//		int  moveAbsolute(Coordinate c);
//		void moveVelocity(int axis
//					, double position, double endvelocity, double accel);
//		void stopAt(int axis, double position);

		void moveTo (const ActuatorPositions& p) 
			throw(RobotControllerException); 

//		int  queryBoardStatus();
		
		
		void goHome()
			throw(RobotControllerException);
		

	private:
		// All under private is visible only when included from "OMSController.cpp"
	#ifdef OMSController_CPP				// Private to all except OMSController main program
		HANDLE boardHandle;						// driver handle
		void throwExceptionIfError(	int errorCode
								,	char* message = NULL)
			throw (RobotControllerException);
	#endif
};
					

#endif



