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

Class to emulate the behavior of the SPI controller. (Overrided the Can0) More...

#include <MockSPIController.hpp>

Public Member Functions

 MOCK_METHOD (bool, openDevice,(const std::string &device),(override))
 Mocked method to open the SPI device.
 
 MOCK_METHOD (void, configure,(uint8_t mode, uint8_t bits, uint32_t speed),(override))
 Mocked method to configure the SPI device.
 
 MOCK_METHOD (void, writeByte,(uint8_t address, uint8_t data),(override))
 Mocked method to write a byte of data to the SPI device.
 
 MOCK_METHOD (uint8_t, readByte,(uint8_t address),(override))
 Mocked method to read a byte of data from the SPI device.
 
 MOCK_METHOD (void, spiTransfer,(const uint8_t *tx, uint8_t *rx, size_t length),(override))
 Mocked method to transfer data to the SPI device.
 
 MOCK_METHOD (void, closeDevice,(),(override))
 Mocked method to close the SPI device.
 
- Public Member Functions inherited from ISPIController
virtual ~ISPIController ()=default
 
virtual bool openDevice (const std::string &device)=0
 
virtual void configure (uint8_t mode, uint8_t bits, uint32_t speed)=0
 
virtual void writeByte (uint8_t address, uint8_t data)=0
 
virtual uint8_t readByte (uint8_t address)=0
 
virtual void spiTransfer (const uint8_t *tx, uint8_t *rx, size_t length)=0
 
virtual void closeDevice ()=0
 

Detailed Description

Class to emulate the behavior of the SPI controller. (Overrided the Can0)

Definition at line 31 of file MockSPIController.hpp.

Member Function Documentation

◆ MOCK_METHOD() [1/6]

MockSPIController::MOCK_METHOD ( bool ,
openDevice ,
(const std::string &device) ,
(override)  )

Mocked method to open the SPI device.

Here is the call graph for this function:

◆ MOCK_METHOD() [2/6]

MockSPIController::MOCK_METHOD ( uint8_t ,
readByte ,
(uint8_t address) ,
(override)  )

Mocked method to read a byte of data from the SPI device.

Here is the call graph for this function:

◆ MOCK_METHOD() [3/6]

MockSPIController::MOCK_METHOD ( void ,
closeDevice ,
() ,
(override)  )

Mocked method to close the SPI device.

Here is the call graph for this function:

◆ MOCK_METHOD() [4/6]

MockSPIController::MOCK_METHOD ( void ,
configure ,
(uint8_t mode, uint8_t bits, uint32_t speed) ,
(override)  )

Mocked method to configure the SPI device.

Here is the call graph for this function:

◆ MOCK_METHOD() [5/6]

MockSPIController::MOCK_METHOD ( void ,
spiTransfer ,
(const uint8_t *tx, uint8_t *rx, size_t length) ,
(override)  )

Mocked method to transfer data to the SPI device.

Here is the call graph for this function:

◆ MOCK_METHOD() [6/6]

MockSPIController::MOCK_METHOD ( void ,
writeByte ,
(uint8_t address, uint8_t data) ,
(override)  )

Mocked method to write a byte of data to the SPI device.

Here is the call graph for this function:

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