File tree Expand file tree Collapse file tree
room_control_unit/src/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616#include "../app/logic/baseio/TemperatureSensor.h"
1717#include "../app/io/environment/TemperatureHumiditySensor.h"
1818#include "../app/io/environment/EnvironmentLuminositySensor.h"
19+ #include "../app/io/environment/PeoplePresenceSensor.h"
1920#include "../app/logic/baseio/HumiditySensor.h"
21+ #include "../app/logic/baseio/PresenceSensor.h"
2022#include "../app/model/event/Event.h"
2123#include "../app/logic/fsm/thmonitoring/TemperatureHumidityMonitoring.h"
2224#include "../app/logic/fsm/gatewayexporter/GatewayExporter.h"
2325#include "../app/logic/fsm/luminositymonitoring/LuminosityMonitoring.h"
26+ #include "../app/logic/fsm/presencemonitoring/PresenceMonitoring.h"
2427
2528
2629
@@ -66,4 +69,20 @@ LuminosityMonitoringContext* getLuminosityMonitoringContext(List<Event*>* eventL
6669 };
6770}
6871
72+ PresenceMonitoringContext * getPresenceMonitoringContext (List < Event * > * eventList ) {
73+ PresenceSensor * pOR = new PeoplePresenceSensor (PRESENCE_SENSOR_OR );
74+ PresenceSensor * pPRE = new PeoplePresenceSensor (PRESENCE_SENSOR_PRE );
75+
76+ RoomEquipment < PresenceSensor * > * * presenceSensors = new RoomEquipment < PresenceSensor * > * [2 ] {
77+ new RoomEquipment < PresenceSensor * > (pOR , Room (OPERATING_ROOM_ID )),
78+ new RoomEquipment < PresenceSensor * > (pPRE , Room (PRE_OPERATING_ROOM_ID ))
79+ };
80+
81+ return new PresenceMonitoringContext {
82+ eventList ,
83+ 2 ,
84+ presenceSensors
85+ };
86+ }
87+
6988#endif
You can’t perform that action at this time.
0 commit comments