1#ifndef BITSIM_BOARDS_DC_MOTOR_BOARD_BASE_H
2#define BITSIM_BOARDS_DC_MOTOR_BOARD_BASE_H
The basic types of bitsim. Code outside this file names Eigen's matrix and vector types only through ...
virtual void set_target_speed(uint_t channel, real_t speed)=0
Set the target speed of the output shaft of a motor [rad/s].
virtual void connect()=0
Connect to the board.
virtual bool is_alive() const =0
virtual void update()=0
Exchange messages with the board: send the targets when it is time and read what has arrived....
virtual uint_t n_motors() const noexcept=0
virtual std::optional< MotorChannelState > motor_state(uint_t channel) const =0
virtual ~DCMotorBoardBase()=default
DCMotorBoardBase()=default
Definition arduino_connector_base.h:15
Definition dc_motor_backend_base.h:9
std::size_t uint_t
uint_t
Definition bitsim_types.h:40
double real_t
real_t
Definition bitsim_types.h:20
What a board last reported about one of its motors.
Definition dc_motor_board_base.h:18
real_t angle
The angle of the output shaft [rad], since the board started.
Definition dc_motor_board_base.h:22
real_t speed
The speed of the output shaft [rad/s].
Definition dc_motor_board_base.h:27
std::chrono::steady_clock::time_point received_at
When the report arrived.
Definition dc_motor_board_base.h:32