Class blmc_drivers::MotorBoardStatus

class MotorBoardStatus

This class represent a 8 bits message that describe the state (enable/disabled) of the card and the two motors.

Public Types

enum ErrorCodes

This is the list of the error codes.

Values:

enumerator NONE

No error.

enumerator ENCODER

Encoder error too high.

enumerator CAN_RECV_TIMEOUT

Timeout for receiving current references exceeded.

enumerator CRIT_TEMP

Motor temperature reached critical value.

Note

This is currently unused as no temperature sensing is done.

enumerator POSCONV

Some error in the SpinTAC Position Convert module.

enumerator POS_ROLLOVER

Position Rollover occured.

enumerator OTHER

Some other error.

enumerator NONE

No error.

enumerator ENCODER

Encoder error too high.

enumerator CAN_RECV_TIMEOUT

Timeout for receiving current references exceeded.

enumerator CRIT_TEMP

Motor temperature reached critical value.

Note

This is currently unused as no temperature sensing is done.

enumerator POSCONV

Some error in the SpinTAC Position Convert module.

enumerator POS_ROLLOVER

Position Rollover occured.

enumerator OTHER

Some other error.

enum ErrorCodes

This is the list of the error codes.

Values:

enumerator NONE

No error.

enumerator ENCODER

Encoder error too high.

enumerator CAN_RECV_TIMEOUT

Timeout for receiving current references exceeded.

enumerator CRIT_TEMP

Motor temperature reached critical value.

Note

This is currently unused as no temperature sensing is done.

enumerator POSCONV

Some error in the SpinTAC Position Convert module.

enumerator POS_ROLLOVER

Position Rollover occured.

enumerator OTHER

Some other error.

enumerator NONE

No error.

enumerator ENCODER

Encoder error too high.

enumerator CAN_RECV_TIMEOUT

Timeout for receiving current references exceeded.

enumerator CRIT_TEMP

Motor temperature reached critical value.

Note

This is currently unused as no temperature sensing is done.

enumerator POSCONV

Some error in the SpinTAC Position Convert module.

enumerator POS_ROLLOVER

Position Rollover occured.

enumerator OTHER

Some other error.

Public Functions

inline void print() const

Simply print the status of the motor board.

inline bool is_ready() const

Check if the all status are green.

inline std::string_view get_error_description() const

Get a human-readable description of the error code.

inline void print() const

Simply print the status of the motor board.

inline bool is_ready() const

Check if the all status are green.

inline std::string_view get_error_description() const

Get a human-readable description of the error code.

Public Members

uint8_t system_enabled

These are the list of bits of the message.

Bits 0 enables/disable of the system (motor board).

uint8_t motor1_enabled

Bits 1 enables/disable of the motor 1.

uint8_t motor1_ready

Bits 2 checks if the motor 1 is ready or not.

uint8_t motor2_enabled

Bits 3 enables/disable of the motor 2.

uint8_t motor2_ready

Bits 4 checks if the motor 2 is ready or not.

uint8_t error_code

This encodes the error codes.

See “ErrorCodes” for more details.

Public Static Functions

static inline constexpr std::string_view get_error_description(uint8_t error_code)
static inline constexpr std::string_view get_error_description(uint8_t error_code)