RokubiminiSerialBusManager.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 // std
4 #include <memory>
5 #include <mutex>
6 
7 // rokubimini
8 #include <rokubimini/setup/Rokubimini.hpp>
12 
14 namespace rokubimini
15 {
16 namespace serial
17 {
31 {
32 public:
39  RokubiminiSerialBusManager() = default;
40  ~RokubiminiSerialBusManager() override = default;
41 
60  bool loadSetup(std::vector<std::shared_ptr<rokubimini::Rokubimini>>& rokubiminis) override;
61 
82  const std::shared_ptr<setup::RokubiminiSerial>& rokubiminiSerialSetup) const;
83 
90  void setConfigMode() override;
91 
98  void setRunMode() override;
99 
107  bool startupCommunication() override;
108 
109  std::vector<std::shared_ptr<RokubiminiSerial>> attachedRokubiminiSerials_;
110 };
111 
112 using RokubiminiSerialBusManagerPtr = std::shared_ptr<RokubiminiSerialBusManager>;
113 
114 } // namespace serial
115 } // namespace rokubimini
virtual bool addRokubiminiToBus(Rokubimini *rokubimini, const std::shared_ptr< setup::Rokubimini > &rokubiminiSetup) const
bool startupCommunication() override
Initializes the communication with the serial devices.
std::vector< std::shared_ptr< RokubiminiSerial > > attachedRokubiminiSerials_
The Rokubimini Serial class.
bool addRokubiminiToBus(RokubiminiSerial *rokubimini, const std::shared_ptr< setup::RokubiminiSerial > &rokubiminiSerialSetup) const
Creates a RokubiminiSerial Implementation object for the.
Inherits from RokubiminiBusManager. It&#39;s used for managing the serial bus.
RokubiminiSerialBusManager()=default
Default constructor of RokubiminiSerialBusManager.
std::shared_ptr< RokubiminiSerialBusManager > RokubiminiSerialBusManagerPtr
void setConfigMode() override
Sets all the serial devices in config mode.
void setRunMode() override
Sets all the serial devices in run mode.
bool loadSetup(std::vector< std::shared_ptr< rokubimini::Rokubimini >> &rokubiminis) override
Checks for non-empty serial port names and calls the addRokubiminiToBus() method. ...
System dependencies.


rokubimini_serial
Author(s):
autogenerated on Wed Mar 3 2021 03:09:18