Skip to content

Commit 9fef994

Browse files
chore: add hvac system context
1 parent ead6111 commit 9fef994

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

room_control_unit/src/config/ContextProvider.h

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "PinList.h"
1313
#include "RoomId.h"
1414
#include "../utils/List.h"
15+
#include "../config/ActuatorId.h"
1516
#include "../app/logic/baseio/equipment/RoomEquipment.h"
1617
#include "../app/logic/baseio/TemperatureSensor.h"
1718
#include "../app/io/environment/TemperatureHumiditySensor.h"
@@ -20,6 +21,9 @@
2021
#include "../app/io/tracking/PersonTrackerImpl.h"
2122
#include "../app/io/tracking/ImplantableMedicalDeviceTrackerImpl.h"
2223
#include "../app/io/stretcher/StretcherPressureSensor.h"
24+
#include "../app/io/environment/CoolingModule.h"
25+
#include "../app/io/environment/HeatingModule.h"
26+
#include "../app/io/environment/VentilationSystem.h"
2327
#include "../app/logic/baseio/HumiditySensor.h"
2428
#include "../app/logic/baseio/PresenceSensor.h"
2529
#include "../app/model/event/Event.h"
@@ -30,6 +34,7 @@
3034
#include "../app/logic/fsm/peopletracking/PeopleTracking.h"
3135
#include "../app/logic/fsm/oradvancedmonitoring/ORAdvancedMonitoring.h"
3236
#include "../app/logic/fsm/commandlistener/CommandListener.h"
37+
#include "../app/logic/fsm/hvacsystem/HvacSystem.h"
3338

3439

3540

@@ -113,10 +118,32 @@ ORAdvancedMonitoringContext* getORAdvancedMonitoringContext(List<Event*>* eventL
113118
};
114119
}
115120

116-
CommandListenerContext* getCommandListenerContext(DataProvider* dataProvider) {
121+
CommandListenerContext* getCommandListenerContext(DataProvider* dataProvider, Command** currentCommand) {
117122
return new CommandListenerContext {
118123
dataProvider,
119-
nullptr
124+
currentCommand
125+
};
126+
}
127+
128+
HvacSystemContext* getHvacSystemContextOperatingRoom(List<Event*>* eventList, Command** currentCommand) {
129+
return new HvacSystemContext {
130+
eventList,
131+
currentCommand,
132+
Room(OPERATING_ROOM_ID),
133+
new VentilationSystem(VENTILATION_OR_ID, VENTILATION_OR_PIN),
134+
new HeatingModule(HEATING_OR_ID, HEATING_OR_PIN),
135+
new CoolingModule(COOLING_OR_ID, COOLING_OR_PIN)
136+
};
137+
}
138+
139+
HvacSystemContext* getHvacSystemContextPreOperatingRoom(List<Event*>* eventList, Command** currentCommand) {
140+
return new HvacSystemContext {
141+
eventList,
142+
currentCommand,
143+
Room(PRE_OPERATING_ROOM_ID),
144+
new VentilationSystem(VENTILATION_PRE_ID, VENTILATION_PRE_PIN),
145+
new HeatingModule(HEATING_PRE_ID, HEATING_PRE_PIN),
146+
new CoolingModule(COOLING_PRE_ID, COOLING_PRE_PIN)
120147
};
121148
}
122149

0 commit comments

Comments
 (0)