blob: 201615622326296ae0428d4f1347f1d780058f5b [file] [log] [blame]
Patrick Venture98055432018-06-08 14:04:43 -07001#pragma once
2
Patrick Venture98055432018-06-08 14:04:43 -07003#include "interfaces.hpp"
4#include "sensors/sensor.hpp"
5
Ed Tanousf8b6e552025-06-27 13:27:50 -07006#include <cstdint>
7#include <string>
8
Patrick Ventureda4a5dd2018-08-31 09:42:48 -07009#include <gmock/gmock.h>
10
Patrick Venturea0764872020-08-08 07:48:43 -070011namespace pid_control
12{
13
Patrick Venture98055432018-06-08 14:04:43 -070014class SensorMock : public Sensor
15{
Patrick Ventureda4a5dd2018-08-31 09:42:48 -070016 public:
Ed Tanousd2768c52025-06-26 11:42:57 -070017 ~SensorMock() override = default;
Patrick Venture98055432018-06-08 14:04:43 -070018
Patrick Ventureda4a5dd2018-08-31 09:42:48 -070019 SensorMock(const std::string& name, int64_t timeout) : Sensor(name, timeout)
Patrick Venturea83a3ec2020-08-04 09:52:05 -070020 {}
Patrick Venture98055432018-06-08 14:04:43 -070021
Patrick Ventureda4a5dd2018-08-31 09:42:48 -070022 MOCK_METHOD0(read, ReadReturn());
23 MOCK_METHOD1(write, void(double));
Josh Lehana4146eb2020-10-01 11:49:09 -070024 MOCK_METHOD3(write, void(double, bool, int64_t*));
Patrick Venture98055432018-06-08 14:04:43 -070025};
Patrick Venturea0764872020-08-08 07:48:43 -070026
27} // namespace pid_control