15#ifndef MOCKPERIPHERALCONTROLLER_HPP
16#define MOCKPERIPHERALCONTROLLER_HPP
19#include <gmock/gmock.h>
30 (
int file, uint8_t command, uint8_t value), (
override));
Definition of the IPeripheralController interface.
Interface for the peripheral controller.
virtual void set_servo_pwm(int channel, int on_value, int off_value)=0
virtual void write_byte_data(int fd, int reg, int value)=0
virtual int i2c_smbus_write_byte_data(int file, uint8_t command, uint8_t value)=0
virtual void init_servo()=0
virtual void set_motor_pwm(int channel, int value)=0
virtual int read_byte_data(int fd, int reg)=0
virtual int i2c_smbus_read_byte_data(int file, uint8_t command)=0
virtual void init_motors()=0
Class to emulate the behavior of the peripheral controller.
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, write_byte_data,(int fd, int reg, int value),(override))
Mocked method to write a byte of data to a specific register.
MOCK_METHOD(void, init_motors,(),(override))
Mocked method to initialize the motors.
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(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_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(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.