blob: 788aebd549dc50ab96421c4896f3741698feb126 [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:
Patrick Williams8c051122023-05-10 07:50:59 -050013 ReadOnly() : WriteInterface(0, 0) {}
Patrick Venture863b9242018-03-08 08:29:23 -080014
Patrick Ventureda4a5dd2018-08-31 09:42:48 -070015 void write(double value) override;
Patrick Venture863b9242018-03-08 08:29:23 -080016};
17
Patrick Ventureda4a5dd2018-08-31 09:42:48 -070018class ReadOnlyNoExcept : public WriteInterface
Patrick Venture863b9242018-03-08 08:29:23 -080019{
Patrick Ventureda4a5dd2018-08-31 09:42:48 -070020 public:
Patrick Williams8c051122023-05-10 07:50:59 -050021 ReadOnlyNoExcept() : WriteInterface(0, 0) {}
Patrick Venture863b9242018-03-08 08:29:23 -080022
Patrick Ventureda4a5dd2018-08-31 09:42:48 -070023 void write(double value) override;
Patrick Venture863b9242018-03-08 08:29:23 -080024};
Patrick Venturea0764872020-08-08 07:48:43 -070025
26} // namespace pid_control