ev3_control::H4REv3Motor Class Reference
Inheritance diagram for ev3_control::H4REv3Motor:
[legend]
Collaboration diagram for ev3_control::H4REv3Motor:
[legend]

Public Member Functions

 H4REv3Motor (const std::string &port_name)
 
bool setDutyCycleSP (int value)
 
bool setSpeedRegulation (Ev3Strings::Ev3Switch onoff)
 
bool setSpeedSP (int value)
 
bool setPositionSP (int value)
 
bool position (int &value)
 
bool speed (int &value)
 
bool setMotorCommand (Ev3Strings::Ev3MotorCommands command)
 
bool setMotorPolarity (Ev3Strings::Ev3Polarity pol)
 
bool setSpeedPID_Kp (unsigned int value)
 
bool setSpeedPID_Ki (unsigned int value)
 
bool setSpeedPID_Kd (unsigned int value)
 
- Public Member Functions inherited from ev3_control::H4REv3Port
 H4REv3Port (const std::string &port_name, H4Ev3IoPortType port_type)
 
bool isConnected ()
 
bool readInt (const char *filename, int &value, OpenFile &openFile, bool device_dir=true)
 
bool writeInt (const char *filename, int value, OpenFile &openFile, bool device_dir=true)
 
const std::string & getPortName () const
 
H4Ev3IoPortType getPortType () const
 
bool getDriverName (Ev3Strings::Ev3DriverName &drvname)
 
template<typename T >
bool writeKey (const char *filename, const StringEnum< T > &strmap, T key, OpenFile &openFile, bool device_dir=true)
 
template<typename T >
bool readKey (const char *filename, const StringEnum< T > &strmap, T &key, OpenFile &openFile, bool device_dir=true)
 

Additional Inherited Members

- Public Types inherited from ev3_control::H4REv3Port
enum  H4Ev3IoPortType { H4REV3PORT_OUT, H4REV3PORT_IN }
 
- Protected Member Functions inherited from ev3_control::H4REv3Port
FILE * get_fileptr_ (const char *filename, OpenFile::FileMode mode, OpenFile &file, bool device_dir=true)
 
bool getDeviceDirectory ()
 
bool getPortDirectory ()
 
- Protected Attributes inherited from ev3_control::H4REv3Port
OpenFile f_driver_name
 
Ev3Strings::Ev3DriverName last_driver_
 
int last_driver_check_connected_id_
 
const std::string port_name_
 
bool connected_
 
int connect_id_
 
H4Ev3IoPortType port_type_
 
FileNameBuffer sys_port_directory_
 
FileNameBuffer sys_device_directory_
 

Constructor & Destructor Documentation

ev3_control::H4REv3Motor::H4REv3Motor ( const std::string &  port_name)
inline
Parameters
port_name

Member Function Documentation

bool ev3_control::H4REv3Motor::position ( int &  value)
inline

Get the current position of the motor

Parameters
[out]valueThe position value if return is true
Returns
True if successful, false otherwise

Here is the call graph for this function:

bool ev3_control::H4REv3Motor::setDutyCycleSP ( int  value)
inline

Sets the pwm duty cycle value

Parameters
valueThe pwm value
Returns
True if successful, false otherwise

Here is the call graph for this function:

bool ev3_control::H4REv3Motor::setMotorCommand ( Ev3Strings::Ev3MotorCommands  command)
inline

Setting the command (especially for motors)

Parameters
commandThe
Returns
True if successful, false otherwise

Here is the call graph for this function:

bool ev3_control::H4REv3Motor::setMotorPolarity ( Ev3Strings::Ev3Polarity  pol)
inline

Sets the rotation direction of the motor

Parameters
polThe direction
Returns
True if successful
bool ev3_control::H4REv3Motor::setPositionSP ( int  value)
inline

Set Position setpoint for position control

Parameters
valueThe position value
Returns
True if successful, false otherwise

Here is the call graph for this function:

bool ev3_control::H4REv3Motor::setSpeedPID_Kd ( unsigned int  value)
inline

Sets the Kd part of the motors speed control

Parameters
value
Returns
True if successful

Here is the call graph for this function:

bool ev3_control::H4REv3Motor::setSpeedPID_Ki ( unsigned int  value)
inline

Sets the Ki part of the motors speed control

Parameters
value
Returns
True if successful

Here is the call graph for this function:

bool ev3_control::H4REv3Motor::setSpeedPID_Kp ( unsigned int  value)
inline

Sets the Kp part of the motors speed control

Parameters
value
Returns
True if successful

Here is the call graph for this function:

bool ev3_control::H4REv3Motor::setSpeedRegulation ( Ev3Strings::Ev3Switch  onoff)
inline

This function enables or disables the speed regulation functionality

Parameters
onoffOn/Off
Returns
True if successful, false otherwise

Here is the call graph for this function:

bool ev3_control::H4REv3Motor::setSpeedSP ( int  value)
inline

Set speed setpoint

Parameters
valueThe speed value in 1/10 rounds per second
Returns
True if successful, false otherwise

Here is the call graph for this function:

bool ev3_control::H4REv3Motor::speed ( int &  value)
inline

Get the current speed of the motor

Parameters
[out]valueThe position value if return is true
Returns
True if successful, false otherwise

Here is the call graph for this function:


The documentation for this class was generated from the following file:
  • /data/Daten/Entwicklung/ros_workspaces/h4r_ev3_ws/src/h4r_ev3/h4r_ev3_control/include/h4r_ev3_control/H4REv3Port.h