blob: 3a2c806b1c468efc327403e1e88846a16c0c440d [file] [log] [blame]
Patrick Venture863b9242018-03-08 08:29:23 -08001#pragma once
2
3/* Interface that implements an exception throwing read method. */
4
5#include "interfaces.hpp"
6
Patrick Venturea0764872020-08-08 07:48:43 -07007namespace pid_control
8{
9
Patrick Ventureda4a5dd2018-08-31 09:42:48 -070010class ReadOnly : public WriteInterface
Patrick Venture863b9242018-03-08 08:29:23 -080011{
Patrick Ventureda4a5dd2018-08-31 09:42:48 -070012 public:
13 ReadOnly() : WriteInterface(0, 0)
Patrick Venturea83a3ec2020-08-04 09:52:05 -070014 {}
Patrick Venture863b9242018-03-08 08:29:23 -080015
Patrick Ventureda4a5dd2018-08-31 09:42:48 -070016 void write(double value) override;
Patrick Venture863b9242018-03-08 08:29:23 -080017};
18
Patrick Ventureda4a5dd2018-08-31 09:42:48 -070019class ReadOnlyNoExcept : public WriteInterface
Patrick Venture863b9242018-03-08 08:29:23 -080020{
Patrick Ventureda4a5dd2018-08-31 09:42:48 -070021 public:
22 ReadOnlyNoExcept() : WriteInterface(0, 0)
Patrick Venturea83a3ec2020-08-04 09:52:05 -070023 {}
Patrick Venture863b9242018-03-08 08:29:23 -080024
Patrick Ventureda4a5dd2018-08-31 09:42:48 -070025 void write(double value) override;
Patrick Venture863b9242018-03-08 08:29:23 -080026};
Patrick Venturea0764872020-08-08 07:48:43 -070027
28} // namespace pid_control