41 #ifndef YOCTO_STEPPERMOTOR_H 42 #define YOCTO_STEPPERMOTOR_H 55 #ifndef _Y_MOTORSTATE_ENUM 56 #define _Y_MOTORSTATE_ENUM 67 #ifndef _Y_STEPPING_ENUM 68 #define _Y_STEPPING_ENUM 78 #define Y_DIAGS_INVALID (YAPI_INVALID_UINT) 79 #define Y_STEPPOS_INVALID (YAPI_INVALID_DOUBLE) 80 #define Y_SPEED_INVALID (YAPI_INVALID_DOUBLE) 81 #define Y_PULLINSPEED_INVALID (YAPI_INVALID_DOUBLE) 82 #define Y_MAXACCEL_INVALID (YAPI_INVALID_DOUBLE) 83 #define Y_MAXSPEED_INVALID (YAPI_INVALID_DOUBLE) 84 #define Y_OVERCURRENT_INVALID (YAPI_INVALID_UINT) 85 #define Y_TCURRSTOP_INVALID (YAPI_INVALID_UINT) 86 #define Y_TCURRRUN_INVALID (YAPI_INVALID_UINT) 87 #define Y_ALERTMODE_INVALID (YAPI_INVALID_STRING) 88 #define Y_AUXMODE_INVALID (YAPI_INVALID_STRING) 89 #define Y_AUXSIGNAL_INVALID (YAPI_INVALID_INT) 90 #define Y_COMMAND_INVALID (YAPI_INVALID_STRING) 101 #pragma option push -w-8022 176 {
return this->get_motorState(); }
188 {
return this->get_diags(); }
204 int set_stepPos(
double newval);
206 {
return this->set_stepPos(newval); }
216 double get_stepPos(
void);
219 {
return this->get_stepPos(); }
229 double get_speed(
void);
232 {
return this->get_speed(); }
244 int set_pullinSpeed(
double newval);
246 {
return this->set_pullinSpeed(newval); }
256 double get_pullinSpeed(
void);
259 {
return this->get_pullinSpeed(); }
271 int set_maxAccel(
double newval);
273 {
return this->set_maxAccel(newval); }
282 double get_maxAccel(
void);
285 {
return this->get_maxAccel(); }
296 int set_maxSpeed(
double newval);
298 {
return this->set_maxSpeed(newval); }
307 double get_maxSpeed(
void);
310 {
return this->get_maxSpeed(); }
323 {
return this->get_stepping(); }
337 {
return this->set_stepping(newval); }
346 int get_overcurrent(
void);
349 {
return this->get_overcurrent(); }
360 int set_overcurrent(
int newval);
362 {
return this->set_overcurrent(newval); }
371 int get_tCurrStop(
void);
374 {
return this->get_tCurrStop(); }
386 int set_tCurrStop(
int newval);
388 {
return this->set_tCurrStop(newval); }
397 int get_tCurrRun(
void);
400 {
return this->get_tCurrRun(); }
412 int set_tCurrRun(
int newval);
414 {
return this->set_tCurrRun(newval); }
416 string get_alertMode(
void);
419 {
return this->get_alertMode(); }
421 int set_alertMode(
const string& newval);
423 {
return this->set_alertMode(newval); }
425 string get_auxMode(
void);
428 {
return this->get_auxMode(); }
430 int set_auxMode(
const string& newval);
432 {
return this->set_auxMode(newval); }
441 int get_auxSignal(
void);
444 {
return this->get_auxSignal(); }
456 int set_auxSignal(
int newval);
458 {
return this->set_auxSignal(newval); }
460 string get_command(
void);
463 {
return this->get_command(); }
465 int set_command(
const string& newval);
467 {
return this->set_command(newval); }
514 virtual int sendCommand(
string command);
522 virtual int reset(
void);
532 virtual int findHomePosition(
double speed);
544 virtual int changeSpeed(
double speed);
556 virtual int moveTo(
double absPos);
568 virtual int moveRel(
double relPos);
581 virtual int moveRelSlow(
double relPos,
double maxSpeed);
591 virtual int pause(
int waitMs);
599 virtual int emergencyStop(
void);
609 virtual int alertStepOut(
void);
621 virtual int alertStepDir(
int dir);
629 virtual int abortAndBrake(
void);
637 virtual int abortAndHiZ(
void);
652 {
return this->nextStepperMotor();}
YStepperMotorValueCallback _valueCallbackStepperMotor
static const double MAXACCEL_INVALID
static const string AUXMODE_INVALID
static const double MAXSPEED_INVALID
int setOvercurrent(int newval)
void(* YStepperMotorValueCallback)(YStepperMotor *func, const string &functionValue)
int setTCurrRun(int newval)
Y_MOTORSTATE_enum motorState(void)
int setAlertMode(const string &newval)
#define YAPI_INVALID_UINT
static YStepperMotor * FindStepperMotor(string func)
int setAuxMode(const string &newval)
virtual int _parseAttr(YJSONObject *json_val)
int setStepPos(double newval)
int setTCurrStop(int newval)
ROSLIB_DECL std::string command(const std::string &cmd)
static YStepperMotor * Find(string func)
static const double STEPPOS_INVALID
YStepperMotor * yFindStepperMotor(const string &func)
Y_STEPPING_enum _stepping
Y_STEPPING_enum stepping(void)
Y_MOTORSTATE_enum _motorState
int setAuxSignal(int newval)
int setMaxAccel(double newval)
virtual int registerValueCallback(YFunctionValueCallback callback)
YStepperMotor * yFirstStepperMotor(void)
static YStepperMotor * First(void)
static const double PULLINSPEED_INVALID
YStepperMotor * next(void)
#define YOCTO_CLASS_EXPORT
int setMaxSpeed(double newval)
static const string ALERTMODE_INVALID
static const string COMMAND_INVALID
static const double SPEED_INVALID
int setCommand(const string &newval)
int setStepping(Y_STEPPING_enum newval)
static YStepperMotor * FirstStepperMotor(void)
virtual int _invokeValueCallback(string value)
int setPullinSpeed(double newval)