Orion
high-rate readout
controller.hpp
Go to the documentation of this file.
1 
5 #pragma once
6 
7 #include "itk/logger.hpp"
8 #include "itk/factory.hpp"
9 
10 #include "hwc/txcore.hpp"
11 #include "hwc/rxcore.hpp"
12 
13 
14 namespace hwc {
15 
16 extern itk::Logger log;
17 extern itk::Logger rxlog;
18 extern itk::Logger txlog;
19 
24 class Controller {
25 public:
26 
27  struct Factory : itk::Factory<Controller> {
28  virtual Controller* operator()() = 0;
29  };
30 
32  virtual ~Controller() = default;
33 
35  virtual void init() = 0;
36 
38 
41  virtual RxCore* get_rxcore() = 0;
42 
45  virtual TxCore* get_txcore() = 0;
46 
50  virtual std::string get_property(const std::string& key) = 0;
51 
55  virtual void set_property(const std::string& key, const std::string& value) = 0;
56 
57 }; // Controller
58 
59 } // hwc
60 
Controller common interface.
Definition: controller.hpp:24
virtual TxCore * get_txcore()=0
Transmitter controller.
virtual void init()=0
Initialize controller.
virtual std::string get_property(const std::string &key)=0
Get controller property.
virtual ~Controller()=default
Default destructor.
virtual RxCore * get_rxcore()=0
Properties.
virtual void set_property(const std::string &key, const std::string &value)=0
Set controller property.
Receiver Core interface.
Definition: rxcore.hpp:23
Transmitter Core interface.
Definition: txcore.hpp:21
Templated implementation of Factory class.
Definition: factory.hpp:35
Logger class definition, wrapper around CoreLogger, adds templated methods for different logging leve...
Definition: logger.hpp:108
Factory framework.
Logger definitions.
Receiver Core.
Definition: controller.hpp:27
Transmitter Core.