-
Notifications
You must be signed in to change notification settings - Fork 0
/
outlet.h
46 lines (37 loc) · 1.06 KB
/
outlet.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
/**************************************************************************/
/*!
File Name: outlet.h
Author: Jordan Baxter
Group: Blue(1) "Reverse Biased"
Group Members: Jordan Baxter, Suyang Liu, Trenton Kilgore
Description: This file contains the function prototypes for the outlet class.
*/
/**************************************************************************/
#ifndef _OUTLET_H_
#define _OUTLET_H_
#include <string.h>
#include <stdint.h>
#include <Arduino.h>
class Outlet
{
protected:
char* _name;
bool _onOff;
bool _timerOnOff;
int _timerSeconds;
float _avgCurrent;
unsigned long _timerStart;
int _onOffPin;
int _currentPin;
public:
Outlet(char* name, int onOffPin, int currentPin);
void switchOnOff();
bool getOnOff();
void timerCancel();
bool getTimerOnOff();
void setTimer(uint16_t seconds);
uint16_t getTimeRemaining();
uint16_t getCurrent();
void timerRun();
};
#endif /*_OUTLET_H_*/