Hotwheels-Cluster 1.2
Creation of Cluster APP for SEA:ME project.
 
Loading...
Searching...
No Matches
MockPeripheralController.hpp
Go to the documentation of this file.
1
14
15#ifndef MOCKPERIPHERALCONTROLLER_HPP
16#define MOCKPERIPHERALCONTROLLER_HPP
17
19#include <gmock/gmock.h>
20
27public:
30 (int file, uint8_t command, uint8_t value), (override));
32 MOCK_METHOD(int, i2c_smbus_read_byte_data, (int file, uint8_t command),
33 (override));
34
36 MOCK_METHOD(void, write_byte_data, (int fd, int reg, int value), (override));
38 MOCK_METHOD(int, read_byte_data, (int fd, int reg), (override));
39
41 MOCK_METHOD(void, set_servo_pwm, (int channel, int on_value, int off_value),
42 (override));
44 MOCK_METHOD(void, set_motor_pwm, (int channel, int value), (override));
45
47 MOCK_METHOD(void, init_servo, (), (override));
49 MOCK_METHOD(void, init_motors, (), (override));
50};
51
52#endif // MOCKPERIPHERALCONTROLLER_HPP
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.