17 #ifndef __ESPMotorCtrl_h__
18 #define __ESPMotorCtrl_h__
32 #define MOVE_RESOLUTION 0.00005
51 std::stringstream errStr;
59 void getStageName(
int axis, std::string &sname);
71 char getError(
int axis);
73 std::string getStageName(
int axis);
75 int getCtrlState(
int axis, std::string &state);
77 double getCurPos(
int axis);
81 int stop(
int axis = 0);
83 int gotoAbsPos(
int axis,
double apos);
85 int gotoRelPos(
int axis,
double rpos);
88 int makeCom(std::string &str,
int axis,
const char *com);
89 int makeCom(std::string &str,
int axis,
const char *com,
int val);
90 int makeCom(std::string &str,
int axis,
const char *com,
double val);
91 int makeCom(std::string &str,
int axis,
const char *com, std::string &val);
93 int splitResponse(
int &axis, std::string &com, std::string &val, std::string &resp);
95 virtual int sendCommand(std::string &com, std::string &resp,
int timeout=1000);
97 virtual int sendCommand(std::string &com);
106 #endif //__ESPMotorCtrl_h__
int numAxes
Number of motor controllers.
The ESP motor controller class.
std::vector< int > axisAddress
The controller address of each axis.
int powerOnInit()
Checks the controllers for current errors, and populates the stageName vector.
ESPMotorCtrl()
Default constructor.
virtual void moveStart()
Called before starting a move. Empty here, to be overridden.
std::vector< std::string > stageName
The names of the connected motors.
The namespace of VisAO software.
int setNumAxes(int no)
Sets the number of axes. Can only be called when uninitialized.
std::string getErrString()
Get the error string.
virtual ~ESPMotorCtrl()
Destructor.