BusManager.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 // std
4 #include <memory>
5 #include <mutex>
6 
8 #include <rokubimini/setup/Rokubimini.hpp>
10 
11 namespace rokubimini
12 {
24 {
25 public:
37  {
39  };
40  virtual ~RokubiminiBusManager() = default;
41 
56  virtual bool loadSetup(std::vector<std::shared_ptr<rokubimini::Rokubimini>>& rokubiminis) = 0;
57 
76  const std::shared_ptr<setup::Rokubimini>& rokubiminiSetup) const;
77 
89  virtual void addRokubiminiSetupToList(const std::shared_ptr<setup::Rokubimini>& rokubiminiSetup);
90 
101  virtual bool startupCommunication()
102  {
103  return true;
104  };
105 
116  virtual void shutdownAllBuses(){};
117 
128  virtual void writeToAllBuses(){};
129 
139  virtual void readAllBuses(){};
140 
151  virtual void setConfigMode(){};
152 
163  virtual void setRunMode(){};
164 
175  std::vector<std::shared_ptr<setup::Rokubimini>> getRokubiminiSetups()
176  {
178  };
179 
180 protected:
188  std::vector<std::shared_ptr<setup::Rokubimini>> attachedRokubiminiSetups_;
189 };
190 
191 } // namespace rokubimini
virtual void writeToAllBuses()
Writes to all the buses.
Definition: BusManager.hpp:128
virtual ~RokubiminiBusManager()=default
std::vector< std::shared_ptr< setup::Rokubimini > > getRokubiminiSetups()
Gets all the Rokubimini Setup instances from the BusManager.
Definition: BusManager.hpp:175
RokubiminiBusManager()
Default constructor.
Definition: BusManager.hpp:36
virtual bool addRokubiminiToBus(Rokubimini *rokubimini, const std::shared_ptr< setup::Rokubimini > &rokubiminiSetup) const
Adds a Rokubimini to Bus.
Definition: BusManager.cpp:8
virtual void addRokubiminiSetupToList(const std::shared_ptr< setup::Rokubimini > &rokubiminiSetup)
Adds a RokubiminiSetup to the internal list.
Definition: BusManager.cpp:13
virtual bool loadSetup(std::vector< std::shared_ptr< rokubimini::Rokubimini >> &rokubiminis)=0
Loads the Rokubimini Setups.
virtual bool startupCommunication()
Starts the communication through the bus.
Definition: BusManager.hpp:101
virtual void setConfigMode()
Sets the devices controlled from the BusManager to config mode.
Definition: BusManager.hpp:151
virtual void readAllBuses()
Reads all the buses.
Definition: BusManager.hpp:139
std::vector< std::shared_ptr< setup::Rokubimini > > attachedRokubiminiSetups_
Definition: BusManager.hpp:188
virtual void shutdownAllBuses()
Shuts down all the buses.
Definition: BusManager.hpp:116
The Rokubimini Bus Manager class.
Definition: BusManager.hpp:23
virtual void setRunMode()
Sets the devices controlled from the BusManager to run mode.
Definition: BusManager.hpp:163


rokubimini_bus_manager
Author(s):
autogenerated on Wed Mar 3 2021 03:09:14