Class blmc_drivers::Motor¶
-
class Motor : public blmc_drivers::MotorInterface, public blmc_drivers::MotorInterface¶
This class implements the MotorInterface.
Subclassed by blmc_drivers::SafeMotor, blmc_drivers::SafeMotor
Public Functions
-
Motor(Ptr<MotorBoardInterface> board, bool motor_id)¶
Construct a new Motor object.
- Parameters:
board – is the MotorBoard to be used.
motor_id – is the id of the motor on the on-board card
-
inline virtual void send_if_input_changed()¶
Actually send the command and controls via the network, See MotorInterface for more information.
-
virtual Ptr<const ScalarTimeseries> get_measurement(const int &index = 0) const¶
Getters.
Get the measurements
- Parameters:
index – is the kind of measurement we are instersted in. see MotorInterface::MeasurementIndex.
- Returns:
Ptr<const ScalarTimeseries> The history of the measurement
-
virtual Ptr<const ScalarTimeseries> get_current_target() const¶
Get the current target to be sent.
- Returns:
Ptr<const ScalarTimeseries> the list of current values to be sent.
-
virtual Ptr<const ScalarTimeseries> get_sent_current_target() const¶
Get the already sent current target values.
- Returns:
Ptr<const ScalarTimeseries>
-
virtual void set_current_target(const double ¤t_target)¶
Setters.
Set the current (Ampere) target. See MotorInterface for more information.
- Parameters:
current_target – in Ampere
-
inline virtual void set_command(const MotorBoardCommand &command)¶
Set the command.
See MotorInterface for more information.
- Parameters:
command –
-
virtual void print() const¶
Print the motor status and state.
-
Motor(Ptr<MotorBoardInterface> board, bool motor_id)
Construct a new Motor object.
- Parameters:
board – is the MotorBoard to be used.
motor_id – is the id of the motor on the on-board card
-
inline virtual ~Motor()
Destroy the Motor object.
-
inline virtual void send_if_input_changed()
Actually send the command and controls via the network, See MotorInterface for more information.
-
virtual Ptr<const ScalarTimeseries> get_measurement(const int &index = 0) const
Getters.
Get the measurements
- Parameters:
index – is the kind of measurement we are instersted in. see MotorInterface::MeasurementIndex.
- Returns:
Ptr<const ScalarTimeseries> The history of the measurement
-
virtual Ptr<const ScalarTimeseries> get_current_target() const
Get the current target to be sent.
- Returns:
Ptr<const ScalarTimeseries> the list of current values to be sent.
-
virtual Ptr<const ScalarTimeseries> get_sent_current_target() const
Get the already sent current target values.
- Returns:
Ptr<const ScalarTimeseries>
-
virtual void set_current_target(const double ¤t_target)
Setters.
Set the current (Ampere) target. See MotorInterface for more information.
- Parameters:
current_target – in Ampere
-
inline virtual void set_command(const MotorBoardCommand &command)
Set the command.
See MotorInterface for more information.
- Parameters:
command –
-
virtual void print() const
Print the motor status and state.
-
Motor(Ptr<MotorBoardInterface> board, bool motor_id)¶