Hotwheels-Cluster 1.2
Creation of Cluster APP for SEA:ME project.
 
Loading...
Searching...
No Matches
MockMCP2515Controller.hpp
Go to the documentation of this file.
1
18
19#ifndef MOCKMCP2515CONTROLLER_HPP
20#define MOCKMCP2515CONTROLLER_HPP
21
23#include <QDebug>
24#include <gmock/gmock.h>
25
31 Q_OBJECT
32
33public:
35 MOCK_METHOD(bool, init, (), (override));
37 MOCK_METHOD(void, processReading, (), (override));
39 MOCK_METHOD(void, stopReading, (), (override));
41 MOCK_METHOD(bool, isStopReadingFlagSet, (), (const, override));
42
43signals:
48 void speedUpdated(float newSpeed);
53 void rpmUpdated(int newRpm);
54};
55
56#endif // MOCKMCP2515CONTROLLER_HPP
Definition of the IMCP2515Controller class.
Interface for the MCP2515 CAN controller. QObject.
virtual bool init()=0
virtual void stopReading()=0
virtual bool isStopReadingFlagSet() const =0
virtual void processReading()=0
Class to emulate the behavior of the MCP2515 controller.
MOCK_METHOD(bool, isStopReadingFlagSet,(),(const, override))
Mocked method to check if the stop reading flag is set.
MOCK_METHOD(void, stopReading,(),(override))
Mocked method to stop the reading of the MCP2515 controller.
void rpmUpdated(int newRpm)
Rotation per minute updated signal.
MOCK_METHOD(void, processReading,(),(override))
Mocked method to process the reading of the MCP2515 controller.
MOCK_METHOD(bool, init,(),(override))
Mocked method to initialize the MCP2515 controller.
void speedUpdated(float newSpeed)
Speed updated signal.