#include <command_to_pwm.hpp>
Public Member Functions | |
CommandToPWM (TiXmlElement *mapping_el, ros_ethercat_model::RobotState *robot) | |
virtual void | propagateFromRonex (ros_ethercat_model::JointState *js) |
virtual void | propagateToRonex (ros_ethercat_model::JointState *js) |
Protected Member Functions | |
bool | check_pins_in_bound_ () |
bool | init_ (TiXmlElement *mapping_el, ros_ethercat_model::RobotState *robot, const char *ronex_name) |
virtual bool | try_init_cb_ (const ros::TimerEvent &, TiXmlElement *mapping_el, ros_ethercat_model::RobotState *robot, const char *ronex_name) |
Protected Attributes | |
uint16_t | actual_period_ |
uint16_t | clock_divider_ |
size_t | digital_pin_index_ |
digital pin index for the motor direction digital pin | |
GeneralIO * | general_io_ |
Pointer to the GeneralIO module we specified in the transmission. | |
uint32_t | ideal_period_ |
Those are used for computing the PWM on time / PWM period. | |
uint16_t | on_time_ |
bool | pin_out_of_bound_ |
Are the pwm_module_, pwm_pin_index_ and digital_pin_index_ in the correct ranges? | |
size_t | pwm_module_ |
PWM module index and PWM pin (0 or 1) as we have 2 pins per pwm_module_. | |
size_t | pwm_pin_index_ |
Definition at line 36 of file command_to_pwm.hpp.
ronex::mapping::general_io::CommandToPWM::CommandToPWM | ( | TiXmlElement * | mapping_el, |
ros_ethercat_model::RobotState * | robot | ||
) |
Definition at line 35 of file command_to_pwm.cpp.
bool ronex::mapping::general_io::CommandToPWM::check_pins_in_bound_ | ( | ) | [protected] |
Check whether the pwm_module_ and pin_index_ are in the correct ranges.
Reimplemented in ronex::mapping::general_io::CommandToPWM2PinDir.
Definition at line 135 of file command_to_pwm.cpp.
bool ronex::mapping::general_io::CommandToPWM::init_ | ( | TiXmlElement * | mapping_el, |
ros_ethercat_model::RobotState * | robot, | ||
const char * | ronex_name | ||
) | [protected] |
Reimplemented in ronex::mapping::general_io::CommandToPWM2PinDir.
Definition at line 65 of file command_to_pwm.cpp.
virtual void ronex::mapping::general_io::CommandToPWM::propagateFromRonex | ( | ros_ethercat_model::JointState * | js | ) | [inline, virtual] |
This function is not doing anything as we're not propagating a status in this mapping.
Implements ronex::RonexMapping.
Reimplemented in ronex::mapping::general_io::CommandToPWM2PinDir.
Definition at line 45 of file command_to_pwm.hpp.
void ronex::mapping::general_io::CommandToPWM::propagateToRonex | ( | ros_ethercat_model::JointState * | js | ) | [virtual] |
Propagating the specified joint command to the given PWM module.
js | joint_state of the joint specified in the transmission |
Implements ronex::RonexMapping.
Reimplemented in ronex::mapping::general_io::CommandToPWM2PinDir.
Definition at line 178 of file command_to_pwm.cpp.
bool ronex::mapping::general_io::CommandToPWM::try_init_cb_ | ( | const ros::TimerEvent & | , |
TiXmlElement * | mapping_el, | ||
ros_ethercat_model::RobotState * | robot, | ||
const char * | ronex_name | ||
) | [protected, virtual] |
Timer callback for the transmission initialization. Stops the init_timer_ when the initialization is successful.
Implements ronex::RonexMapping.
Reimplemented in ronex::mapping::general_io::CommandToPWM2PinDir.
Definition at line 49 of file command_to_pwm.cpp.
uint16_t ronex::mapping::general_io::CommandToPWM::actual_period_ [protected] |
Definition at line 66 of file command_to_pwm.hpp.
uint16_t ronex::mapping::general_io::CommandToPWM::clock_divider_ [protected] |
Definition at line 66 of file command_to_pwm.hpp.
size_t ronex::mapping::general_io::CommandToPWM::digital_pin_index_ [protected] |
digital pin index for the motor direction digital pin
Definition at line 60 of file command_to_pwm.hpp.
Pointer to the GeneralIO module we specified in the transmission.
Definition at line 56 of file command_to_pwm.hpp.
uint32_t ronex::mapping::general_io::CommandToPWM::ideal_period_ [protected] |
Those are used for computing the PWM on time / PWM period.
Definition at line 65 of file command_to_pwm.hpp.
uint16_t ronex::mapping::general_io::CommandToPWM::on_time_ [protected] |
Definition at line 66 of file command_to_pwm.hpp.
bool ronex::mapping::general_io::CommandToPWM::pin_out_of_bound_ [protected] |
Are the pwm_module_, pwm_pin_index_ and digital_pin_index_ in the correct ranges?
Definition at line 62 of file command_to_pwm.hpp.
size_t ronex::mapping::general_io::CommandToPWM::pwm_module_ [protected] |
PWM module index and PWM pin (0 or 1) as we have 2 pins per pwm_module_.
Definition at line 58 of file command_to_pwm.hpp.
size_t ronex::mapping::general_io::CommandToPWM::pwm_pin_index_ [protected] |
Definition at line 58 of file command_to_pwm.hpp.