blmc_drivers
|
MotorBoardInterface declares an API to inacte with a MotorBoard. More...
#include <motor_board.hpp>
Public Types | |
enum | MeasurementIndex { current_0, current_1, position_0, position_1, velocity_0, velocity_1, analog_0, analog_1, encoder_index_0, encoder_index_1, measurement_count } |
This is the list of the measurement we can access. | |
enum | ControlIndex { current_target_0, current_target_1, control_count } |
This is the list of the controls we can send. | |
typedef real_time_tools::ThreadsafeTimeseries< double > | ScalarTimeseries |
A useful shortcut. | |
typedef ScalarTimeseries::Index | Index |
A useful shortcut. | |
typedef real_time_tools::ThreadsafeTimeseries< Index > | IndexTimeseries |
A useful shortcut. | |
typedef real_time_tools::ThreadsafeTimeseries< MotorBoardStatus > | StatusTimeseries |
A useful shortcut. | |
typedef real_time_tools::ThreadsafeTimeseries< MotorBoardCommand > | CommandTimeseries |
A useful shortcut. | |
template<typename Type > | |
using | Ptr = std::shared_ptr< Type > |
A useful shortcut. | |
template<typename Type > | |
using | Vector = std::vector< Type > |
A useful shortcut. | |
Public Member Functions | |
virtual | ~MotorBoardInterface () |
Destroy the MotorBoardInterface object. | |
virtual Ptr< const ScalarTimeseries > | get_measurement (const int &index) const =0 |
Getters. More... | |
virtual Ptr< const StatusTimeseries > | get_status () const =0 |
Get the status of the motor board. More... | |
virtual Ptr< const ScalarTimeseries > | get_control (const int &index) const =0 |
input logs More... | |
virtual Ptr< const CommandTimeseries > | get_command () const =0 |
Get the commands to be send. More... | |
virtual Ptr< const ScalarTimeseries > | get_sent_control (const int &index) const =0 |
Get the sent controls. More... | |
virtual Ptr< const CommandTimeseries > | get_sent_command () const =0 |
Get the sent commands. More... | |
virtual void | set_control (const double &control, const int &index)=0 |
Setters. More... | |
virtual void | set_command (const MotorBoardCommand &command)=0 |
set_command save the command internally. More... | |
virtual void | send_if_input_changed ()=0 |
Actually send the commands and the controls. | |
MotorBoardInterface declares an API to inacte with a MotorBoard.
|
pure virtual |
Get the commands to be send.
Implemented in blmc_drivers::CanBusMotorBoard, and blmc_drivers::SpiMotorBoard.
|
pure virtual |
input logs
Get the controls to be send.
index | define the kind of control we are looking for. |
Implemented in blmc_drivers::CanBusMotorBoard, and blmc_drivers::SpiMotorBoard.
|
pure virtual |
Getters.
Get the measurements
index | is the kind of measurement we are looking for. |
Implemented in blmc_drivers::CanBusMotorBoard, and blmc_drivers::SpiMotorBoard.
|
pure virtual |
Get the sent commands.
Implemented in blmc_drivers::CanBusMotorBoard, and blmc_drivers::SpiMotorBoard.
|
pure virtual |
Get the sent controls.
index | define the kind of control we are looking for. |
Implemented in blmc_drivers::CanBusMotorBoard, and blmc_drivers::SpiMotorBoard.
|
pure virtual |
Get the status of the motor board.
Implemented in blmc_drivers::CanBusMotorBoard, and blmc_drivers::SpiMotorBoard.
|
pure virtual |
set_command save the command internally.
In order to actaully send the controls to the network please call "send_if_input_changed"
command | is the command to be sent. |
Implemented in blmc_drivers::CanBusMotorBoard, and blmc_drivers::SpiMotorBoard.
|
pure virtual |
Setters.
set_control save the control internally. In order to actaully send the controls to the network please call "send_if_input_changed"
control | is the value of the control. |
index | define the kind of control we want to send. |
Implemented in blmc_drivers::CanBusMotorBoard, and blmc_drivers::SpiMotorBoard.