IOControl/include/IO/Custom/Controller.h
Go to the documentation of this file.
1 
20 #pragma once
21 
22 #include <IO/Controller.h>
23 
24 namespace IO::Custom
25 {
26 DECLARE_FSTR(CONTROLLER_CLASSNAME)
27 
28 class Device;
29 class Request;
30 
34 class Controller : public IO::Controller
35 {
36  friend class Device;
37 
38 public:
39  Controller(uint8_t instance) : IO::Controller(instance)
40  {
41  }
42 
43  const FlashString& classname() const override
44  {
45  return CONTROLLER_CLASSNAME;
46  }
47 
48  void handleEvent(IO::Request* request, Event event) override;
49 };
50 
51 } // namespace IO::Custom
describes a counted string stored in flash memory
Definition: String.hpp:174
A Controller is responsible for serialising requests for a physical bus.
Definition: IOControl/include/IO/Controller.h:42
Controller for PWM output.
Definition: IOControl/include/IO/Custom/Controller.h:35
const FlashString & classname() const override
Get the class name for this Controller.
Definition: IOControl/include/IO/Custom/Controller.h:43
Controller(uint8_t instance)
Definition: IOControl/include/IO/Custom/Controller.h:39
void handleEvent(IO::Request *request, Event event) override
Implementations override this method to process events as they pass through the stack.
Definition: Libraries/IOControl/include/IO/Custom/Device.h:30
Definition: IOControl/include/IO/Custom/Request.h:30
Request represents a single user request/response over a bus.
Definition: IOControl/include/IO/Request.h:80
#define DECLARE_FSTR(name)
Declare a global FSTR::String& reference.
Definition: String.hpp:63
Definition: IOControl/include/IO/Custom/Controller.h:25
Definition: IOControl/include/IO/Controller.h:26
Event
Definition: Event.h:36