Public Member Functions | Protected Member Functions | Protected Attributes
ronex::mapping::general_io::CommandToPWM Class Reference

#include <command_to_pwm.hpp>

Inheritance diagram for ronex::mapping::general_io::CommandToPWM:
Inheritance graph
[legend]

List of all members.

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
GeneralIOgeneral_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_

Detailed Description

Definition at line 36 of file command_to_pwm.hpp.


Constructor & Destructor Documentation

Definition at line 35 of file command_to_pwm.cpp.


Member Function Documentation

Check whether the pwm_module_ and pin_index_ are in the correct ranges.

Returns:
true if the pins 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.

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.

Propagating the specified joint command to the given PWM module.

Parameters:
jsjoint_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.


Member Data Documentation

Definition at line 66 of file command_to_pwm.hpp.

Definition at line 66 of file command_to_pwm.hpp.

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.

Those are used for computing the PWM on time / PWM period.

Definition at line 65 of file command_to_pwm.hpp.

Definition at line 66 of file command_to_pwm.hpp.

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.

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.

Definition at line 58 of file command_to_pwm.hpp.


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


sr_ronex_transmissions
Author(s): Ugo Cupcic, Toni Oliver, Mark Pitchless
autogenerated on Thu Jun 6 2019 21:21:55