Hotwheels-Cluster 1.2
Creation of Cluster APP for SEA:ME project.
 
Loading...
Searching...
No Matches
MockPeripheralController Class Reference

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.
 
- Public Member Functions inherited from IPeripheralController
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
 

Detailed Description

Class to emulate the behavior of the peripheral controller.

Definition at line 26 of file MockPeripheralController.hpp.

Member Function Documentation

◆ MOCK_METHOD() [1/8]

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.

Here is the call graph for this function:

◆ MOCK_METHOD() [2/8]

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.

Here is the call graph for this function:

◆ MOCK_METHOD() [3/8]

MockPeripheralController::MOCK_METHOD ( int ,
read_byte_data ,
(int fd, int reg) ,
(override)  )

Mocked method to read a byte of data from a specific register.

Here is the call graph for this function:

◆ MOCK_METHOD() [4/8]

MockPeripheralController::MOCK_METHOD ( void ,
init_motors ,
() ,
(override)  )

Mocked method to initialize the motors.

Here is the call graph for this function:

◆ MOCK_METHOD() [5/8]

MockPeripheralController::MOCK_METHOD ( void ,
init_servo ,
() ,
(override)  )

Mocked method to initialize the servo motors.

Here is the call graph for this function:

◆ MOCK_METHOD() [6/8]

MockPeripheralController::MOCK_METHOD ( void ,
set_motor_pwm ,
(int channel, int value) ,
(override)  )

Mocked method to set the PWM of a motor.

Here is the call graph for this function:

◆ MOCK_METHOD() [7/8]

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.

Here is the call graph for this function:

◆ MOCK_METHOD() [8/8]

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.

Here is the call graph for this function:

The documentation for this class was generated from the following file: