demandHandler working
This commit is contained in:
@@ -1,16 +1,27 @@
|
||||
#ifndef DEMAND_HANDLER_H
|
||||
#define DEMAND_HANDLER_H
|
||||
|
||||
#include "FeedbackHandler.h"
|
||||
#include "PressureCalculator.h"
|
||||
#include <functional>
|
||||
#include "EventBus.h"
|
||||
#include <string>
|
||||
#include <variant>
|
||||
|
||||
class DemandHandler {
|
||||
private:
|
||||
std::string path;
|
||||
std::reference_wrapper<FeedbackHandler> feedbackHandler;
|
||||
std::reference_wrapper<PressureCalculator> pressureCalculator;
|
||||
EventBus &eventBus;
|
||||
|
||||
enum class EventType {
|
||||
MINIMAL_PRESSURE,
|
||||
MAXIMAL_PRESSURE,
|
||||
CONSTANTE_1,
|
||||
CONSTANTE_2,
|
||||
PRESSURE_CONTROL_MODE
|
||||
};
|
||||
|
||||
struct Event {
|
||||
EventType type;
|
||||
std::variant<float, bool> value;
|
||||
};
|
||||
|
||||
void pullMinimalPressure();
|
||||
void pullMaximalPressure();
|
||||
@@ -19,10 +30,7 @@ class DemandHandler {
|
||||
void pullPressureControlMode();
|
||||
|
||||
public:
|
||||
DemandHandler(
|
||||
std::string equipmentName,
|
||||
std::reference_wrapper<FeedbackHandler> feedbackHandler,
|
||||
std::reference_wrapper<PressureCalculator> pressureCalculator);
|
||||
DemandHandler(EventBus &eventBusReference, std::string equipmentName);
|
||||
/*
|
||||
@brief Manualy get all the value, and update owned objects
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user