Class to emulate the behavior of the peripheral controller. More...
#include <MockPeripheralController.hpp>
Public Member Functions | |
MOCK_METHOD (int, i2c_smbus_write_byte_data,(int file, uint8_t command, uint8_t value),(override)) | |
Mocked method to write a byte of data to the I2C bus. | |
MOCK_METHOD (int, i2c_smbus_read_byte_data,(int file, uint8_t command),(override)) | |
Mocked method to read a byte of data from the I2C bus. | |
MOCK_METHOD (void, write_byte_data,(int fd, int reg, int value),(override)) | |
Mocked method to write a byte of data to a specific register. | |
MOCK_METHOD (int, read_byte_data,(int fd, int reg),(override)) | |
Mocked method to read a byte of data from a specific register. | |
MOCK_METHOD (void, set_servo_pwm,(int channel, int on_value, int off_value),(override)) | |
Mocked method to set the PWM of a servo motor. | |
MOCK_METHOD (void, set_motor_pwm,(int channel, int value),(override)) | |
Mocked method to set the PWM of a motor. | |
MOCK_METHOD (void, init_servo,(),(override)) | |
Mocked method to initialize the servo motors. | |
MOCK_METHOD (void, init_motors,(),(override)) | |
Mocked method to initialize the motors. | |
![]() | |
virtual | ~IPeripheralController ()=default |
virtual int | i2c_smbus_write_byte_data (int file, uint8_t command, uint8_t value)=0 |
virtual int | i2c_smbus_read_byte_data (int file, uint8_t command)=0 |
virtual void | write_byte_data (int fd, int reg, int value)=0 |
virtual int | read_byte_data (int fd, int reg)=0 |
virtual void | set_servo_pwm (int channel, int on_value, int off_value)=0 |
virtual void | set_motor_pwm (int channel, int value)=0 |
virtual void | init_servo ()=0 |
virtual void | init_motors ()=0 |
Class to emulate the behavior of the peripheral controller.
Definition at line 26 of file MockPeripheralController.hpp.
MockPeripheralController::MOCK_METHOD | ( | int | , |
i2c_smbus_read_byte_data | , | ||
(int file, uint8_t command) | , | ||
(override) | ) |
Mocked method to read a byte of data from the I2C bus.
MockPeripheralController::MOCK_METHOD | ( | int | , |
i2c_smbus_write_byte_data | , | ||
(int file, uint8_t command, uint8_t value) | , | ||
(override) | ) |
Mocked method to write a byte of data to the I2C bus.
MockPeripheralController::MOCK_METHOD | ( | int | , |
read_byte_data | , | ||
(int fd, int reg) | , | ||
(override) | ) |
Mocked method to read a byte of data from a specific register.
MockPeripheralController::MOCK_METHOD | ( | void | , |
init_motors | , | ||
() | , | ||
(override) | ) |
Mocked method to initialize the motors.
MockPeripheralController::MOCK_METHOD | ( | void | , |
init_servo | , | ||
() | , | ||
(override) | ) |
Mocked method to initialize the servo motors.
MockPeripheralController::MOCK_METHOD | ( | void | , |
set_motor_pwm | , | ||
(int channel, int value) | , | ||
(override) | ) |
Mocked method to set the PWM of a motor.
MockPeripheralController::MOCK_METHOD | ( | void | , |
set_servo_pwm | , | ||
(int channel, int on_value, int off_value) | , | ||
(override) | ) |
Mocked method to set the PWM of a servo motor.
MockPeripheralController::MOCK_METHOD | ( | void | , |
write_byte_data | , | ||
(int fd, int reg, int value) | , | ||
(override) | ) |
Mocked method to write a byte of data to a specific register.