The VisAO Camera
VisAO::ESPMotorCtrl Class Reference

The ESP motor controller class. More...

#include <ESPMotorCtrl.h>

+ Inheritance diagram for VisAO::ESPMotorCtrl:

Public Member Functions

 ESPMotorCtrl ()
 Default constructor.
 
 ESPMotorCtrl (int no)
 Specify number of axes.
 
virtual ~ESPMotorCtrl ()
 Destructor.
 
std::string getErrString ()
 Get the error string.
 
int setNumAxes (int no)
 Sets the number of axes. Can only be called when uninitialized.
 
int powerOnInit ()
 Checks the controllers for current errors, and populates the stageName vector.
 
char getError (int axis)
 
std::string getStageName (int axis)
 
int getCtrlState (int axis, std::string &state)
 
double getCurPos (int axis)
 
int home (int axis)
 
int stop (int axis=0)
 
int gotoAbsPos (int axis, double apos)
 
int gotoRelPos (int axis, double rpos)
 
int makeCom (std::string &str, int axis, const char *com)
 
int makeCom (std::string &str, int axis, const char *com, int val)
 
int makeCom (std::string &str, int axis, const char *com, double val)
 
int makeCom (std::string &str, int axis, const char *com, std::string &val)
 
int splitResponse (int &axis, std::string &com, std::string &val, std::string &resp)
 
virtual int sendCommand (std::string &com, std::string &resp, int timeout=1000)
 
virtual int sendCommand (std::string &com)
 
virtual void moveStart ()
 Called before starting a move. Empty here, to be overridden.
 

Protected Member Functions

void getStageName (int axis, std::string &sname)
 

Protected Attributes

std::stringstream errStr
 
int numAxes
 Number of motor controllers.
 
std::vector< intaxisAddress
 The controller address of each axis.
 
std::vector< std::string > stageName
 The names of the connected motors.
 
int default_timeout
 

Detailed Description

Manges a set of ESP motor controllers chained together.

Definition at line 37 of file ESPMotorCtrl.h.


The documentation for this class was generated from the following files: