-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCorridor.h
executable file
·58 lines (48 loc) · 1.11 KB
/
Corridor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef _CORRIDOR_H_
#define _CORRIDOR_H_
#include <iostream>
#include "constants.h"
#include "Command.h"
#include <ConcreateCommand.h>
#include "Controller.h"
class Corridor
{
public:
Corridor(int lights, int acs, corrType type) : noOfLights(lights), noOfACs(acs), cType(type)
{
powerConsumption = 0;
controller = NULL;
lightOn = NULL;
lightOff = NULL;
acOn = NULL;
acOff = NULL;
}
void initializeCorridorInsturments();
int powerConsumptionAtPresent();
void switchOnLights();
void switchOnACs();
void switchOffLights();
void switchOffACs();
void getStatus();
private:
void initializeLights();
void initializeAirConditioner();
int powerConsumptionByLights();
int powerConsumptionByAC();
void getLightsStatus();
void getACsStatus();
private:
int noOfLights;
int noOfACs;
int powerConsumption;
corrType cType;
vector <Light *> lights;
vector <AirConditioner *> airCons;
public:
PowerControl * controller;
LightOnCommand *lightOn;
LightOffCommand *lightOff;
AirConditionerOnCommand *acOn;
AirConditionerOffCommand *acOff;
};
#endif